i.MXRT1021 FlexSPI / XiP Mode

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

i.MXRT1021 FlexSPI / XiP Mode

Jump to solution
2,728 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
2,714 Views
santosh1
Contributor III

Just required setting QE bit in the flash. 

View solution in original post

0 Kudos
Reply
7 Replies
2,660 Views
davidagraham
Contributor I

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

0 Kudos
Reply
2,715 Views
santosh1
Contributor III

Just required setting QE bit in the flash. 

0 Kudos
Reply
1,946 Views
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 Kudos
Reply
1,936 Views
hhh
Contributor III

i have the same problem on i.mxrt1176

0 Kudos
Reply
1,890 Views
ingdb
Contributor III

did you solve your problem?

0 Kudos
Reply
1,770 Views
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.

Tags (1)
0 Kudos
Reply
1,754 Views
ingdb
Contributor III

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

Tags (1)
0 Kudos
Reply