Page 1 of 2

ESP32 and internal CAN

Posted: Tue Feb 16, 2021 2:35 pm
by kennethnilsen69
The Internal CAN component will not work and gives me an error message during compilation.

External CAN via SPI work as it should but not the internal CAN

ninja: build stopped: subcommand failed.
Executing action: all (aliases: build)
Running ninja in directory c:\ev-power-norway\esp_test\build
Executing "ninja all"...
ninja failed with exit code 1

Build Failed
.


Autoclose turned off

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 8:51 am
by LeighM
Thanks for letting us know.
The fix update should be available soon via the update system.

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 10:30 am
by kennethnilsen69
i just got a CAN update but it did not fix the issue. maybe more will come and I'm just a little too impatient :-)))

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 10:59 am
by LeighM
You still get errors?
Could you post the msg.txt file please?

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 11:23 am
by kennethnilsen69
Sure :-) also attach the test file

cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
Executing action: all (aliases: build)
Running ninja in directory c:\ev-power-norway\esp_test\build
Executing "ninja all"...
ninja failed with exit code 1

Build Failed
.

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_build.bat reported error code 0x1

Autoclose turned off


FINISHED

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 12:01 pm
by LeighM
Thanks.
That caught some (potential) errors in the CAN component.
(Due to ESP compiler default error level setting)
Updated CAN component on its way ... :D

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 3:04 pm
by kennethnilsen69
With the latest update, the compilation now works without problems. :-)
However, the internal CAN bus will not work and the external CAN bus is stop working when the internal one is activated

CAN 1 = External
CAN2 = Internal

CAN1 works fine on its own
CAN2 does not work alone

When CAN1 and CAN2 are active at the same time, CAN1 only sends error messages on the CAN bus. and CAN2 sends nothing

Re: ESP32 and internal CAN

Posted: Thu Feb 18, 2021 4:22 pm
by LeighM
OK, thanks.
I will look further into it.

Re: ESP32 and internal CAN

Posted: Fri Feb 19, 2021 4:20 pm
by LeighM
I've now done some updates to the CAN components.
Hopefully this will improve things.

Re: ESP32 and internal CAN

Posted: Sat Feb 20, 2021 2:36 pm
by kennethnilsen69
Yes without a doubt, It improve things :-)

I can now send CAN messages with the internal bus but it does not behave normally.

When I use SetTXIdent it sends as an extended message even if the ID is lower than 2047.
if I use SetTXIDSimple it sends the message as type Standard but then the ID number is wrong. (ID1 becomes ID 40 and ID2 becomes ID 60)
I imagine that there may then be problems with receiving a message when it arrives as extended instead of Standard ID even though it is Standard ID.

It will also not use the pre-defined 3 buffers Data. I have to define Data myself with SetTXData which is ok for me because I only use this anyway :-)
CANtest1.PNG
CANtest1.PNG (200.33 KiB) Viewed 8899 times
CANtest1.1.PNG
CANtest1.1.PNG (45.15 KiB) Viewed 8899 times