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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,841 次查看
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,545 次查看
Babycat
Contributor III

You saved my day.

Thank alot for sharing, it is really helpful

Regards,

0 项奖励
回复

1,662 次查看
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 项奖励
回复