ESP32 and internal CAN

Any bugs you encounter with Flowcode should be discussed here.
kennethnilsen69
Posts: 35
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

ESP32 and internal CAN

Post 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
Attachments
ESP_test.fcfx
(15.33 KiB) Downloaded 147 times

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: ESP32 and internal CAN

Post by LeighM »

Thanks for letting us know.
The fix update should be available soon via the update system.

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: ESP32 and internal CAN

Post 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 :-)))

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: ESP32 and internal CAN

Post by LeighM »

You still get errors?
Could you post the msg.txt file please?

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: ESP32 and internal CAN

Post 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
Attachments
ESP_test.fcfx
(18.1 KiB) Downloaded 143 times

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: ESP32 and internal CAN

Post 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

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: ESP32 and internal CAN

Post 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

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: ESP32 and internal CAN

Post by LeighM »

OK, thanks.
I will look further into it.

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 217 times

Re: ESP32 and internal CAN

Post by LeighM »

I've now done some updates to the CAN components.
Hopefully this will improve things.

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: ESP32 and internal CAN

Post 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 4374 times
CANtest1.1.PNG
CANtest1.1.PNG (45.15 KiB) Viewed 4374 times

Post Reply