ESP32 I2s stalling processor
Posted: Fri Aug 16, 2019 2:04 pm
Hello,
We have a very peculiar problem that we are not able to solve.
We have a custom ESP32 board with the ESP32 wrover module. We are using the arduino framework along with platformio as a build system.
I mention the platformio only to provide complete information, it is really the same as a regular arduino esp32 installation.
The firmware does some job, makes a couple of https requests.. sleeps for a minute.. Wakes up and repeats the process ad infinitum.
If for any number of foreseeable reasons, the esp32 is unable to continue the job then the firmware calls the ESP.restart() to reboot the processor. And the peripherals we use are I2c, UART and I2S for various sensors.
The issues we are seeing is this. The firmware during one of these forced reboots stalls at the I2s_driver_install function invocation.
It is always at the same place irrespective of the prototype board we are using. To diagnose the firmware further we tried the same firmware on the ESP32-dev-kit and tried stepping the code in gdb to verify the source of the problem. No surprise, we are able to step through the code till the i2s_driver_install and the processor soon stalls and the debug session breaks.
This happens roughly about 30-40% of the time.. A manual reboot usually fixes the problem. But we would like to identify why this happens and what we can do to fix it.
I can post the relevant parts of the firmware if required.
Is there anything we can do to further isolate the issue and fix it ? Has anyone else faced a similar issue with the I2s device?
Thank you in advance for any help!!
We have a very peculiar problem that we are not able to solve.
We have a custom ESP32 board with the ESP32 wrover module. We are using the arduino framework along with platformio as a build system.
I mention the platformio only to provide complete information, it is really the same as a regular arduino esp32 installation.
The firmware does some job, makes a couple of https requests.. sleeps for a minute.. Wakes up and repeats the process ad infinitum.
If for any number of foreseeable reasons, the esp32 is unable to continue the job then the firmware calls the ESP.restart() to reboot the processor. And the peripherals we use are I2c, UART and I2S for various sensors.
The issues we are seeing is this. The firmware during one of these forced reboots stalls at the I2s_driver_install function invocation.
It is always at the same place irrespective of the prototype board we are using. To diagnose the firmware further we tried the same firmware on the ESP32-dev-kit and tried stepping the code in gdb to verify the source of the problem. No surprise, we are able to step through the code till the i2s_driver_install and the processor soon stalls and the debug session breaks.
This happens roughly about 30-40% of the time.. A manual reboot usually fixes the problem. But we would like to identify why this happens and what we can do to fix it.
I can post the relevant parts of the firmware if required.
Is there anything we can do to further isolate the issue and fix it ? Has anyone else faced a similar issue with the I2s device?
Thank you in advance for any help!!