ESP32 hang
Posted: Mon Aug 28, 2023 3:51 pm
Hi,
I'm new to ESP32 and FreeRTOS but not for microcontrollers. For developing I'm using an Dev Kit and Visual Studio Code with Platformio and Arduino framework. I have a code calculating RMS values from 3 analog signals sampled using the builtin adc_digi_read_bytes() and FreeRTOS tasks taking actions based in those RMS calculations. The code works ok but it hangs after some hours. I have the DevKit connected to my PC using a USB and like "extra hardware" there is only one led attached to GPIO 23. I'm using some GPIO ports changing their states to keep watch for running tasks and using Serial.pintln() in loop() for terminal communitacions, and BluetoothSerial too.
For example, before taking the samples, GPIO25 is set HIGH and set to LOW when all samples are manipulated.
Things that I noticed when the ESP32 hangs:
All GPIO outputs are in LOW state <- Can I eliminate the possibility of an infinite loop here?
No Serial communications.
No Bluetooth.
When I'm using Visual Studio Code and its terminal to read the data from the Dev Kit and then it is closed this action reset the DevKit. Is this normal?
Thanks.
I'm new to ESP32 and FreeRTOS but not for microcontrollers. For developing I'm using an Dev Kit and Visual Studio Code with Platformio and Arduino framework. I have a code calculating RMS values from 3 analog signals sampled using the builtin adc_digi_read_bytes() and FreeRTOS tasks taking actions based in those RMS calculations. The code works ok but it hangs after some hours. I have the DevKit connected to my PC using a USB and like "extra hardware" there is only one led attached to GPIO 23. I'm using some GPIO ports changing their states to keep watch for running tasks and using Serial.pintln() in loop() for terminal communitacions, and BluetoothSerial too.
For example, before taking the samples, GPIO25 is set HIGH and set to LOW when all samples are manipulated.
Things that I noticed when the ESP32 hangs:
All GPIO outputs are in LOW state <- Can I eliminate the possibility of an infinite loop here?
No Serial communications.
No Bluetooth.
When I'm using Visual Studio Code and its terminal to read the data from the Dev Kit and then it is closed this action reset the DevKit. Is this normal?
Thanks.