[riot-users] MCU recover mode
kaspar at schleiser.de
Wed Dec 19 16:26:11 CET 2018
On 12/19/18 8:07 AM, Olivier Fauchon wrote:
> I spent a lot of time trying to save these dead MCUs.
Did you manage to recover them?
I was in that situation a couple of times.
It sometimes helps to just retry flashing, hammering the reset button.
The idea is that you want to hit reset so that the debugger tries to
stop the MCU in the (possibly very short) timespan between power-up and
going to sleep.
$ BOARD=xxx make all (to create the binary)
$ while true; do BOARD=xxx make flash-only; done
This will fail on its own. Then just start pushing the reset button/pin
often, like a couple of times per second. At this point you don't care
if flashing succeeds, just the initial flash erase starts so on the next
reboot, the board hard-faults but "grabbable" by the debugger.
Once you see that the flasher didn't fail right away but managed to get
hold of the mcu and start erasing, you can stop, reset once more and
hopefully flash a proper image.
Depending on the user programmer (tool), replacing "make flash-only"
with a faster-executing flash erase command speeds up the process.
Hope this helps,
More information about the users