Failed to initialize RAMCode when flashing with JLink

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

Failed to initialize RAMCode when flashing with JLink

跳至解决方案
3,405 次查看
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

标签 (1)
0 项奖励
回复
1 解答
3,316 次查看
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 项奖励
回复
5 回复数
3,387 次查看
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 项奖励
回复
3,339 次查看
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 项奖励
回复
3,320 次查看
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 项奖励
回复
3,317 次查看
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 项奖励
回复
3,348 次查看
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 项奖励
回复