ESP_EARLY_LOG during interrupt and critical section in new CAN driver leads to Guru Meditation
Posted: Mon Aug 20, 2018 2:46 pm
Testing the CAN driver in the latest ESP IDF, I enabled CAN_ALERT_AND_LOG and various CAN_ALERT_ types and provoked various error situations to test the handling of them. The problem is that after a series of about 40 consecutive CAN: Alert 1024 (deliberately over-running the receive buffer to test), there is a Guru Meditation error.
The only thing that fixes it is not showing the alerts or making sure they are infrequent. However, CAN bus errors can be at high frequency so there is a lot of load from ESP_EARLY_LOGx calls in interrupts when something goes wrong, and I want to see that rather than have a Guru Meditation as well.
I could not find info about whether ESP_EARLY_LOGx are interrupt safe. I'm assuming they are not.
The only thing that fixes it is not showing the alerts or making sure they are infrequent. However, CAN bus errors can be at high frequency so there is a lot of load from ESP_EARLY_LOGx calls in interrupts when something goes wrong, and I want to see that rather than have a Guru Meditation as well.
I could not find info about whether ESP_EARLY_LOGx are interrupt safe. I'm assuming they are not.