Page 1 of 1

ESP32 CAN driver multiframe not working

Posted: Wed Jul 27, 2022 4:34 am
by raviranjan
Hi,

I am working on ESP32 WROOM CAN driver.
Single CAN frame is working but if data is more than 60 byte then I am receiving only 48 byte after that can_receive interface is not giving data with expected ID. Please help.

Multiple ID Filter Configuration is also not working.
If I change acceptance mask and acceptance code then its not receiving can data.
if I change acceptance mask to 0xFFFFFFFF and acceptance code to 0 then it is receiving data from all IDs. but I want to receive data from single CAN ID, how can I configure this?

I am using below github example code.
https://github.com/espressif/esp-idf/tr ... an_network

Please help.

Thanks.

Re: ESP32 CAN driver multiframe not working

Posted: Tue Aug 02, 2022 12:02 pm
by dmaxben
Im not sure what you're asking...

Classical CAN only allows 8 bytes max payload per message.

For messages with >8 bytes payload, you need to use CAN-FD (which is not supported by the ESP32's internal CAN controller).

Regarding the filtering, you dont have to use the hardware filters...you can just have the CAN controller receive everything, and then filter which ID's you need in software (using a switch statement or something).

The default filter/mask config for the ESP32 CAN controller is to just allow everything, so you dont have to explicitly define the mask/filter settings if you just want to receive all messages.