Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to communicate STM32f103 vs ESP32 via CAN BUS #62

Open
thangduc131199 opened this issue Dec 28, 2023 · 2 comments
Open

Unable to communicate STM32f103 vs ESP32 via CAN BUS #62

thangduc131199 opened this issue Dec 28, 2023 · 2 comments

Comments

@thangduc131199
Copy link

thangduc131199 commented Dec 28, 2023

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
PXL_20231228_032903166

@thangduc131199
Copy link
Author

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).

@nopnop2002
Copy link
Owner

nopnop2002 commented Dec 28, 2023

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.

cpu_start-2

See below for details.

https://www.esp32.com/viewtopic.php?t=15581


I added a note about ESP32 bitrate to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants