Remove 10ms delay in disableProgramming() #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
disableProgramming() is called when initializing NETSGPClient and having the delay on initialization breaks the code on ESP32-C3 and creates a bootloop:
Guru Meditation Error: Core 0 panic'ed (Store access fault). Exception was unhandled.
Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x40381990
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x91c
load:0x403ce710,len:0x25b0
entry 0x403cc710
Guru Meditation Error: Core 0 panic'ed (Store access fault). Exception was unhandled.
Core 0 register dump:
MEPC : 0x40388d66 RA : 0x4038998e SP : 0x3fcde290 GP : 0x3fc8f200
(...)
Some info I could get from the register dump leads to freertos tasks not beeing happy with the delay() for whatever reason:
riscv32-esp-elf-addr2line -pfiaC -e firmware.elf 0x40388d66 0x40388d66: prvAddCurrentTaskToDelayedList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:5977
riscv32-esp-elf-addr2line -pfiaC -e firmware.elf 0x4038998e 0x4038998e: vTaskDelay at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:1584