Spurious ( False Positive ) factory / test boot condition detection
Posted: Thu May 30, 2024 6:36 pm
In case of application problems, I want the user to be able to boot to a factory application, where application firmware can be updated.
I thought I may as well re-use the button already on IO0, but have been getting spurious detection. I first tried the factory configuration, and now switched to the test configuration. Both configurations I occasionally get false detections and the system boots into factory.
I've had the same symptoms on my custom board based on ESP32E, and the NodeMCU devkits with ESP32E. I am using IDF4.4.7.
I seemed to get it regularly when there's an exception / panic reset in the application, it always falsely detects. I've even watched the boot info logs, and it really is pausing as if its seeing the button pressed when it isn't, and then get the false detection:
Since I got it consistently on the exceptions, thought I better check if that's an undocumented "feature", but peeking at the code, looks like it's strictly the button.
Is there some reason IO0 can't be used for this, or any thoughts what could cause this?
I thought I may as well re-use the button already on IO0, but have been getting spurious detection. I first tried the factory configuration, and now switched to the test configuration. Both configurations I occasionally get false detections and the system boots into factory.
I've had the same symptoms on my custom board based on ESP32E, and the NodeMCU devkits with ESP32E. I am using IDF4.4.7.
I seemed to get it regularly when there's an exception / panic reset in the application, it always falsely detects. I've even watched the boot info logs, and it really is pausing as if its seeing the button pressed when it isn't, and then get the false detection:
Code: Select all
I (52) boot: ESP-IDF v4.4.7-dirty 2nd stage bootloader
I (52) boot: compile time 14:34:23
I (52) boot: Multicore bootloader
I (56) boot: chip revision: v3.1
I (60) qio_mode: Enabling default flash chip QIO
I (66) boot.esp32: SPI Speed : 80MHz
I (70) boot.esp32: SPI Mode : QIO
I (75) boot.esp32: SPI Flash Size : 4MB
I (79) boot: Enabling RNG early entropy source...
I (85) boot: Partition Table:
I (88) boot: ## Label Usage Type ST Offset Length
I (96) boot: 0 nvs WiFi data 01 02 0000f000 00004000
I (103) boot: 1 otadata OTA data 01 00 00013000 00002000
I (111) boot: 2 coredump Unknown data 01 03 00015000 00010000
I (118) boot: 3 factory test app 00 20 00030000 00100000
I (126) boot: 4 app0 OTA app 00 10 00130000 002b0000
I (133) boot: 5 spiffs Unknown data 01 82 003e0000 00020000
I (141) boot: End of partition table
I (3145) boot: Detect a boot condition of the test firmware
Is there some reason IO0 can't be used for this, or any thoughts what could cause this?