Closed thangduc131199 closed 1 month ago
I had an unexpected discovery. When I set the Bitrate of ESP32 to 1000kbs and STM32 to 500kbs, the two circuits can communicate with each other via CAN bus. However, checking that there are still incorrect messages and the CAN controler sends them again (I sent the message at 10hz and only received it at 3hz).
In ESP32 whose chip version is Rev2 or higher, the role of register bits related to CAN communication has been changed to mean "halve the communication speed". This is to support slower bitrates below 25K. This fuature can be controlled by CONFIG_ESP32_REV_MIN. This fuature is enabled when CONFIG_ESP32_REV_MIN >= 2.
See below for details.
https://www.esp32.com/viewtopic.php?t=15581
I added a note about ESP32 bitrate to the README.
I have 1 circuit STM32F103 Blue Pill and ESP32, 2 SN65HVD23x CAN Transceiver, I changed the resistor to 120 ohm -> 150 ohm but still cannot communicate via CAN bus. For STM32 I use the HAL library, and for ESP32 I use the CAN library https://github.com/sandeepmistry/arduino-CAN. Hope you can give me some suggestions to solve the problem. Thanks