esp_ota_begin() hangs
Posted: Fri Jan 28, 2022 9:42 pm
I am attempting write to a .BIN to an OTA partition. If I call esp_ota_begin() with the actual size of the .BIN, it never returns. I would assume that the erase internal to esp_ota_begin() hangs. If I call esp_ota_begin() with OTA_WITH_SEQUENTIAL_WRITES, esp_ota_begin() returns, but a after a few calls to esp_ota_write(), eventually esp_ota_write() does not return.
I would suspect that internally the call to spi_bus_lock_acquire_start() is where the code is actually hanging.
I would suspect that I am not using the API correctly. For example, the task performing the OTA update needs to be pinned to a core and I have not done that. Another example would be, during an OTA update you can't access the I2C bus, I have not limited I2C access.
I am using ESP-IDF 4.3 with a WROVER-IB 4MB flash, processor revision 1.
Strangely enough, the watch dog timers don't kick in and restart the processor. So, I suspect the processor is still alive enough to keep hitting the watch dog.
Any thoughts as to what I should try?
I would suspect that internally the call to spi_bus_lock_acquire_start() is where the code is actually hanging.
I would suspect that I am not using the API correctly. For example, the task performing the OTA update needs to be pinned to a core and I have not done that. Another example would be, during an OTA update you can't access the I2C bus, I have not limited I2C access.
I am using ESP-IDF 4.3 with a WROVER-IB 4MB flash, processor revision 1.
Strangely enough, the watch dog timers don't kick in and restart the processor. So, I suspect the processor is still alive enough to keep hitting the watch dog.
Any thoughts as to what I should try?