I tried flash another "import SDK project" for MaaXBoard-RT (related to input GPIO interrupt).
It has bricked the board.
What happened?
When I tried to flash the FW for this new project - it has complained with errors on accessing board, to flash etc.
I got "Wire ACK fault in DAP access" during flashing for debug.
And: Now all my other projects cannot be flashed anymore. All projects show the same error and I cannot flash board anymore (with any project, which were working before).
I assume:
Something is wrong with this project, e.g. the Flash scripts, memory regions... (even I have used the same patches needed for MaaxBoard-RT board).
The old, recently flashed and running project, is ripped out, nothing done anymore by the board. Debugger access is broken.
Also the "GUI Flash" tool does not work (e.g. erase entire flash).
I can imagine:
The Flash was erased (all with 0xFFFF now), but not written with new FW code image.
If SP is set to 0xFFFFFFFF or ResetHandler vector entry is 0xFFFFFFFF - and the MCU released from reset (or after a power cycle) runs "crazy".
It seems to get into a lockup state, executing wrong code which seems to disable also the debugger.
(I found: when SP is set as 0xFFFFFFFF - MCU is locked up, also PC for ResetHandler as 0xFFFFFFFF cannot be right, even it is thumb code, but outside available memory)
How to fix?
Luckily I found a way to fix and to recover.
The MaaXBoard-RT has a jumper for "Internal Boot" vs. "Serial Download" (default).
This was working for me. - Have an *.AXF or *.BIN file ready from a working project:
- unplug the board
- set the jumper to "Internal Boot" (the other option)
- plugin again
- use the "GUI Flash" tool
- select to flash the FW for a working project (therefore have one "golden FW" ready)
BTW: even erasing entire flash works - but it does not help - it should flash w/o error (but it does not reboot to it automatically)
- unplug board
- change jumper back to "Serial Download" (the default option)
- plugin again: now your "golden FW" should be running (e.g. see the debug terminal)
Now I could also flash again other projects, the debugger was working again.
Conclusion:
It can happen (for a still unknown reason) that a project taken from SDK, clean on compile, but "bricks" the board.
Have a "golden FW BIN" file ready to recover.
Use the jumper to recover and use the "GUI Flash" tool (to flash a working FW again).
Erasing entire flash with "GUI Flash" tool does not fix, just a working FW flashed seems to recover.