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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,847件の閲覧回数
johnadriaan
Contributor III

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
Finished
============= 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.png

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.png

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!

ラベル(1)
2 返答(返信)

1,551件の閲覧回数
Babycat
Contributor III

You saved my day.

Thank alot for sharing, it is really helpful

Regards,

0 件の賞賛
返信

1,668件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi John Adriaan ,

   Thanks for your experience sharing.

    About the mass erase, you also can enter the serial download mode and use the MCUBootutility tools, which can be downloaded from this link:

https://github.com/JayHeng/NXP-MCUBootUtility/archive/v2.2.0.zip
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信