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
已解决! 转到解答。
I have the same problem, I used the flex_spi_nor_polling_transfer example to set the QE bit, the code below was executing.
but the hello world is still not executed in xip mode, here's my problem
the data in the QSPI flash (see disassembly) don't make any sense.
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.