XIP through OTFAD problems on RT1011

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

XIP through OTFAD problems on RT1011

4,875 Views
TheUncle
Contributor III

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.

Labels (1)
Tags (1)
24 Replies

1,079 Views
TheUncle
Contributor III

Hi kerryzhou,

I confirm that indeed the image is encrypted and it is stored correctly (i.e., encrypted) in the FLASH.

Looking forward for updates.

Best regards,

Stefano

0 Kudos

814 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Stefano Voulaz,

  Thanks for your confirmation.

  Do you enable the HAB?

  Which MCUBootUtility version you are using? 

  How many secure regions you are using? I just used 2 regions.

Best Regards,

Kerry

0 Kudos

520 Views
TheUncle
Contributor III

Hi kerryzhou,

just one region, no HAB, MCUBootUtility 2.3.0 - but we don't use it any longer, we use automated scripts that were derived from MCUBootUtility.

Best regards,

Stefano

0 Kudos

520 Views
TheUncle
Contributor III

Hi Kerry Zou,

we use OTFAD encrypted image boot and yes, we use MCUBootUtility - indirectly. We derived a set of scripts from MCUBootUtility workflow to automate the process. The scripts are used to store the keys and burn the fuses on the target processor, then to store the image in flash. 

I can confirm that the encryption procedure works fine, since I verified that the encrypted image boots correctly. However, it crashes as soon as clocks are initialized in BOARD_BootClockRUN. Same with iled_blinky sample project.

Best regards,

Stefano

0 Kudos