Hello,
I am using RT1011 chip in my project, and there is a feature where user can store their own file in the external flash.
But there is a problem where the FlexSPI cannot be used when I want to use OTFAD to decrypt the program.
I think the program failed to continue when it goes into the function FLEXSPI_Init. When I used a while(1) loop before this function Jlink can connect to the running target. But when I try to put the while(1) loop after or the first line of the FLEXSPI_Init function, Jlink failed to connect the target.
As the program is in XIP mode, so all the code related to FlexSPI operation is allocated in the ITCM. Also like the previous post and application note state the frequency adjustment code should not be encrypted, all the clock code is also allocated in the ITCM.
I use the MCUXpresso linkscripts function to allocate the code in ITCM,
data.ldt:
<#if memory.name=="SRAM_ITC">
*file_system.o(.text*)
*flash_program.o(.text*)
*fsl_flexspi.o(.text*)
*clock_config.o(.text*)
*fsl_clock.o(.text*)
*tusb_board.o(.text*)
*fsl_iomuxc.o(.text*)
</#if>
main_text.ldt:
*(EXCLUDE_FILE(*flash_program.o *fsl_flexspi.o *file_system.o *clock_config.o *fsl_clock.o *tusb_board.o *fsl_iomuxc.o) .text*)
So is that we are not allowed to use FlexSPI to operate the external flash when we using OTFAD?
Or there is some special setting for FlexSPI in order to use OTFAD at the same time?
Thanks