Documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/twai.html Initialise CAN Bus Handling Alerts You need to check for and handle the TWAI_ALERT_BUS_OFF and TWAI_ALERT_BUS_RECOVERED to protect against the CAN bus ceasing to function if there are bus issues. Polling for alerts twai_read_alerts() uses a ticks_to_wait value, whereby if there is no alert it will wait the specified number of FreeRTOS ticks […]