ESP32 CANbus automatic bus speed detection

AutomotiveCK
Posts: 1
Joined: Thu Nov 12, 2020 10:21 am

ESP32 CANbus automatic bus speed detection

Postby AutomotiveCK » Thu Nov 12, 2020 10:32 am

Hi all,

I'm working on a project where I'm using the ESP32 with the ESP-IDF provided CAN bus library.

Currently, I'm thinking of implementing a function in which the CAN bus speed of the device connected to is automatically being detected and accordingly set in the can_timing_config_t parameter.

While working on the configuration I started wondering how to do this. Normally the CAN mode is set to Listen Only.
Next, the device would listen on the bus and concurrently find the correct bus speed in a loop of which the different bus speeds have been tried.

Now my problem is, some vehicles do not transmit messages on the CAN bus without requests being received. If the ESP32 is configured to be in Listen Only mode I would never find the correct bus speed.

Could someone help me out and point me in the right direction?

Kind regards!

Who is online

Users browsing this forum: Bing [Bot] and 131 guests