mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
896ba6a83e
This commit fixes multiple bugs caused by incorrect calls to can_enter_reset_mode() and can_exit_reset_mode. Example test scripts also updated to match new runners. |
||
---|---|---|
.. | ||
main | ||
CMakeLists.txt | ||
example_test.py | ||
Makefile | ||
README.md |
CAN Alert and Recovery Example
Overview
The CAN Alert and Recovery Example demonstrates the usage of alerts and bus recovery in the CAN driver. This example requires only a single ESP32 module to run.
The CAN Alert and Recovery Example will do the following...
- Initialize and start the CAN driver on the ESP32 module
- Repeatedly transmit messages (no acknowledgement required)
- Reconfigure alerts to detect bus-off state
- Purposely trigger errors on transmissions
- Detect Bus Off condition
- Initiate bus recovery
- Deinitialize CAN driver on ESP32 module
External Transceiver and Pin Assignment
The CAN controller in the ESP32 does not contain an internal transceiver. Therefore users are responsible for providing an external transceiver compatible with the physical layer specifications of their target ISO standard (such as SN65HVD23X transceivers for ISO 11898-2 compatibility)
The CAN controller in the ESP32 represents dominant bits to the transceiver as logic low, and recessive bits as logic high. The Alert and Recovery Example utilizes the following default pin assignments
- TX Pin is routed to GPIO21
- RX Pin is routed to GPIO22