ESP32 CAN driver multiframe not working

raviranjan
Posts: 1
Joined: Wed Jul 27, 2022 3:57 am

ESP32 CAN driver multiframe not working

Postby raviranjan » Wed Jul 27, 2022 4:34 am

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.
Attachments
can.c
(41.82 KiB) Downloaded 197 times

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Re: ESP32 CAN driver multiframe not working

Postby dmaxben » Tue Aug 02, 2022 12:02 pm

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.

Who is online

Users browsing this forum: Basalt, Bing [Bot] and 318 guests