i.MXRT1021 FlexSPI / XiP Mode

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

i.MXRT1021 FlexSPI / XiP Mode

跳至解决方案
2,850 次查看
santosh1
Contributor III

Hello, 

I have a custom i.MXRT1021 board based on the MIMXRT1020-EVK. Flash used on this board is same as the EVK (IS25LP064A-JBLE) and is connected to the controller using exactly the same set of FlexSPI pins. 

I can load and run programs in SRAM. However, i am not able to run programs in XiP mode. In MCUxpresso using JLink+, the code seems to be loading, but the break point is not set and i get an error - break point out of code space. In IAR, the log indicates a verification error, in both cases disassembly fails. 

Using JFlash i can load and verify the NOR flash. Boot CFG/Mode is set similar to EVK. At this point i am just attempting hello world examples with all standard template code generated by the IDE or examples from SDK. 

Any pointers on where i can start to root cause the issue? 

 

thanks

标签 (1)
0 项奖励
回复
1 解答
2,836 次查看
santosh1
Contributor III

Just required setting QE bit in the flash. 

在原帖中查看解决方案

0 项奖励
回复
7 回复数
2,782 次查看
davidagraham
Contributor I

I am having a similar issue ... what is the QE bit?

0 项奖励
回复
2,837 次查看
santosh1
Contributor III

Just required setting QE bit in the flash. 

0 项奖励
回复
2,068 次查看
ingdb
Contributor III

I have the same problem, I used the flex_spi_nor_polling_transfer example to set the QE bit, the code below was executing. 

ingdb_0-1668007115361.png

but the hello world is still not executed in xip mode, here's my problem

ingdb_1-1668007413964.png

the data in the QSPI flash (see disassembly) don't make any sense.

0 项奖励
回复
2,058 次查看
hhh
Contributor III

i have the same problem on i.mxrt1176

0 项奖励
回复
2,012 次查看
ingdb
Contributor III

did you solve your problem?

0 项奖励
回复
1,892 次查看
Spaghetti
Contributor I

I had this same problem too. It ended up being that I was using pins 139 and 140 for I2C so they had pull up resistors on them so the Boot ROM read the GPIO to get the boot config and that turned on EncryptedXIP so the Boot ROM rightly rejected what was on the flash IC given that setting. The solution was to burn the BT_FUSE_SEL:

status = OCOTP_WriteFuseShadowRegister(OCOTP, 6, 0x00000010);

Then the Boot ROM launched my application and ran using my QSPI flash as expected.

To see if you have a similar check that your boot config (shadowed in SRC_SBMR1) is what you expect.

标记 (1)
0 项奖励
回复
1,876 次查看
ingdb
Contributor III

yes, I think it's similar. Our solution was to reconfigure the Boot pins, after that it worked

标记 (1)
0 项奖励
回复