AnsweredAssumed Answered

XIP through OTFAD problems on RT1011

Question asked by Stefano Voulaz on Jun 29, 2020
Latest reply on Jul 9, 2020 by Stefano Voulaz

Hello,

we are using RT1011 and we are having troubles with XIP from FLASH on FLEXSPI through OTFAD. Our application is correctrly encrypted and we can see that the startup code at the reset vector is executed correctly. However, when clocks are setup (*) the OTFAD module stops working and FLASH data is corrupted. Since our application does not fit in RAM, we need to execute code and to retrieve data from FLASH at run time. How can we avoid OTFAD to stop working - or restore it?

I've also tried to disable OTFAD for as long as the clocks are being configured, but it doesn't work - actually, resetting the GE bit of CR register produces no change (RRAE=0).

 

Thank you in advance!

Stefano Voulaz

 

(*) The project has been developed in MCUXpresso and as such it contains the usual BOARD_BootClockRUN function to configure clocks systemwide. All the relevant code, including fsl library code, has been allocated to RAM.

 

Additional information

The same happens on the RT1011 evaluation board when running the iled_blinky sample project using encrypted binary. As soon as the PERIPH_CLK MUX is switched (clock_config.c, line 166), the OTFAD module ceases working and FLASH memory readout is corrupted.

Outcomes