Failed to initialize RAMCode when flashing with JLink

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to initialize RAMCode when flashing with JLink

Jump to solution
2,536 Views
Hon
Contributor II

I encountered this problem in which I get the error "Failed to initialize RAMCode" when I am trying to flash my firmware into MIMXRT1021. I have a few of the same custom boards with MIMXRT1021 and all others can be flashed except for this one.

Here are a few details of what I have done to all boards:

1. Setting BT_FUSE_SEL bit to 1 by flashing a small .hex to RAM and execute it from RAM by setting PC to RAM. It works for all boards.

2. The Jlink is connected via SWD

3. Custom .flm file that I downloaded from this forum is used and JLinkDevices.xml is altered accordingly

Anyone knows if this one exception that I faced can be solved in some ways, or I should just declare the controller on this board is dead and move on? Would be cool to know if there is any solution to this in case I encounter this same problem again in the future.

Thanks!

ramcode.png

Labels (1)
0 Kudos
Reply
1 Solution
2,447 Views
Hon
Contributor II

Hi @jingpan,
it is still not working. I guess I will just accept this as individual hardware problem since this is the only unit that does not work and it makes no sense to me to invest more time into this one particular unit.

Thanks for help!

Regards,
Hon

View solution in original post

0 Kudos
Reply
5 Replies
2,518 Views
jay_heng
NXP Employee
NXP Employee

Glad to see that my UFL project could help you.

Since it is not common issue. if you can attach to the CM7 core by debugger, then it is not i.MXRT issue. it might be Flash status issue. can you set boot_mode to 2'b01 and try again? Can you run SDK flexspi driver example in SRAM to see whether it work well?

0 Kudos
Reply
2,470 Views
Hon
Contributor II

I am not sure if I did it right, that I applied 3V to pin GPIO_EMC_16 to set boot_mode to 01. If that was the correct way to set boot_mode, then it is sad to say that it did not work with the boot_mode suggestion. I get the same error as mentioned when I was trying to flash the flash memory.

 

0 Kudos
Reply
2,451 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Hon ,

GPIO_EMC_16 to 1 and GPIO_EMC17 to 0. If that still can't work, I think there is hardware problem.

 

Regards,

Jing

0 Kudos
Reply
2,448 Views
Hon
Contributor II

Hi @jingpan,
it is still not working. I guess I will just accept this as individual hardware problem since this is the only unit that does not work and it makes no sense to me to invest more time into this one particular unit.

Thanks for help!

Regards,
Hon

0 Kudos
Reply
2,479 Views
Hon
Contributor II

Hi Jay, sorry for the late reply.

I have tried exchanging the flash memory that has been flashed with firmware. That worked, but once the flash memory is erased, I can't get it flashed again and the same error appeared.

I have borrowed the NXP debugger from my colleague and tried flashing using MCUXpresso IDE with LinkServer Debug. It failed to detect any valid SWD device. As I mentioned, it happened only to this one unit. The others are working completely fine.

I have not tried switching boot mode and I will try it in this week and give an update here.

0 Kudos
Reply