Hi all !
I use ESP32 with SN65VHD230 transceiver to hack CAN bus in my car. I already developed working code which was tested with Arduino + MCP2515. But after switch to ESP32, code started to act weird. It sometimes worked properly and sometimes didn't work at all(without any changes in code). So i investigated alert flags and i realised that ESP32 see errors at CAN bus and in result it go to "error passive" state and into "bus-off" state in the end.
My app send my own prepared text to the car's display, so at once there can be 2 nodes sending message with same ID - original display and ESP32. So my theory is that i get bit errors, because when car's display and esp32 are sending message at once with same ID then ESP32 is checking transmited bits and if it will get message from car's display with opposite bit state then it has sent then it produce error flag.
The weird thing is that, sometimes (very rarely) i still got errors but ESP32 is not going to bus-off state even after long time. Today i got 1000+ errors count at the bus and it still was working well. My theory is that original display in my car is getting errors too and it just got bus-off state before ESP32.
So here is my question - as i can't prevent original display from sending its own messages is there any way to prevent ESP32 going into passive error and bus-off states ? Or maybe to implement error counter clear in main loop() ? Please help me, i'm already out of ideas and don't know what i can do next.
TWAI\CAN controller - how to prevent going bus-off
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 3 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.
Information
Espressif ESP32 ... Available now!