ESP32: Writing firmware chunks to flash for FOTA causes hard faults (using MCUBoot and wifi TCP connection) #75273
Unanswered
Ralf-Vention
asked this question in
Q&A
Replies: 2 comments
-
Check if you have a REV1 ESP32. This kind of behavior is expected. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your reply @rftafas! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
We're trying to do FOTA over Wi-Fi using an ESP32 with zephyr. The firmware chunks are received over Wi-Fi from a TCP connection. This firmware is received in messages of 512 bytes of which there are about 1300 in a firmware package.
Directly after receiving a package, the received bytes are stored into flash using the
flash_img_buffered_write()
zephyr api.What we have seen is that the system sometimes suffers from a hard-fault during this process. After a seemingly random number of messages, the hard-fault handler is triggered with an invalid program counter (PC) and invalid stack trace. This happens about every 1 in 3 times of trying to perform FOTA.
It looks like that if the 'flash_img_buffered_write' line is commented out, the downloading and processing (up until the writing to flash) the FOTA process works as it is supposed to work and finishes every time. It is however not certain this command is the problem. We're using MCUBoot to handle the firmware update.
Can somebody help us to find our issue?
Beta Was this translation helpful? Give feedback.
All reactions