Open 10mann opened 3 weeks ago
Yes that seems like the same issue, it didn't show up when I searched for the problem. Do you know if there is an official fix coming soon? This doesn't just happen if you short the pins, but also if the bus is busy for any reason.
Ok I see, thanks for the information
Answers checklist.
IDF version.
v5.2.2
Espressif SoC revision.
ESP32-s3
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.1
Power Supply used.
USB
What is the expected behavior?
It should only report an error with the transmission, i.e. I2C_TIMEOUT or something similar.
What is the actual behavior?
When the I2C fails it sometimes crashes with an interrupt watchdog timeout.
Steps to reproduce.
This is reliably reproduced by updating the examples/peripheral/i2c/i2c_simple to use i2c master instead of the legacy driver. I used an sht31 for this test. If you short the pins while communicating, the chip almost always crashes with interrupt watchdog timeout.
There is a line in i2c_master.c:566 where there is a while(i2c_ll_is_bus_busy(hal->dev)){} running in an ISR context. This will trigger the interrupt watchdog if the device is busy. I think this should return an error / set an error flag instead of waiting forever.
Debug Logs.
More Information.
This is reproducible for all ESP32-S3s I have tested. It happens for IDF v5.2.1 and v5.2.2