John Adriaan

Managed to "brick" your i.MX RT1010 EVK?

Discussion created by John Adriaan on Dec 26, 2019
Latest reply on Dec 30, 2019 by Kerry Zhou

I uploaded a program to my board, and it instantly Bus Faulted. I quickly found out what I'd done wrong - but when I fixed the code, I could no longer upload new code to the board!


I always got Wire Ack Fault - target connected? in one form or another:

Server OK but no connection to probe 1 core 0 (after 3 attempts) - Ee(42). Could not connect to core.
============= SCRIPT: RT1010_connect.scp =============
RT1010 Connect Script
Error: Wire Ack Fault - target connected?
Error: Wire not connected
Error: Wire not connected
Disabling MPU
Error: Wire not connected
Error: Wire not connected
Configure FlexRAM for 64KB OC RAM, 32KB I-TCM, 32KB D-TCM
Error: Wire not connected
Error: Wire not connected
Error: Wire not connected
============= END SCRIPT =============================
Failed on connect: Ee(42). Could not connect to core.
No connection to chip's debug port


According to various posts, all I needed to do was mass-erase the flash, which made sense: no bad code, no bus fault. Only, Catch-22: I couldn't connect to the chip to erase the flash! My code was so bad that it not only faulted, it Hard Faulted, and locked out the USB Link completely.


That's where the Boot Mode switches helped me. The NXP-supplied boot ROM code checks those switches to find out what to boot. On delivery, the board is configured to boot from the Flash. The ROM checks the Flash, and if it looks like there's a program there, it jumps to that code. I needed the ROM to not jump there, so I chose another Boot Mode: Serial Download. I wasn't going to serial download anything, I just wanted the internal ROM to ignore the Flash.


There are four DIP switches near the two pushbuttons that are set to OFF, OFF, ON, OFF. That means "Execute program in Flash". The position OFF, OFF, OFF, OFF effectively means the same thing. The only other valid position is OFF, OFF, OFF, ON. That means "Download a program from the USB port, and execute that". To change a switch, just use a sharp pointy metal thing (sewing needle, tweezers, knife point) to carefully slide it to the other position.


So I set the switches to the new position (note that it's also given on the board's silkscreen), and tried to program the board again. It worked! I couldn't actually debug the program - I had to set the switches back to their as-delivered state. At least I didn't have to mass-erase the flash...


But in case you need to, then you can use the MCUXpresso GUI Flash Tool. On a default install, that's on the toolbar: the black Chip Icon to the left of the green MCUX "X":

GUI Flash Tool

If it's greyed out, select various files in your project until it goes black.


The first thing it asks is which board to Flash. (If you've got more than one attached, I'm sure you know which one to use!) Click "OK". Then choose the "Erase" tab:

Flash Erase tab


Make sure "Mass erase" is selected, then click "Run...".


This should erase the Flash, since your deadly program isn't running. But before you can continue your development, you'll need to set the DIP switches back to the standard OFF OFF ON OFF setting.


Phew! I didn't need to throw my board away...


Happy programming!