cancel
Showing results for 
Search instead for 
Did you mean: 

OTFDEC in STM32L562QE-DK . Creating a simple project out of https://www.youtube.com/watch?v=MUGte7qx9CU example . Any leads ?!

VNara.1
Associate II

I am a starter with respect to high end controllers.

I am having STM32L562QE-DK. I downloaded the OTFDEC_ExecutingCryptedInstruction project out of STMCube. It works as it is.

What I tried ?! :

  1. I wrote a small code for subtracting two numbers and had it in a separate .c file.
  2. From main after OSPI in memory mapped mode and OTFDEC init (mode, nonce, key init), called the above function. Parallely I have specified in my linker file that the above .o file has to be placed in the external memory (from 0x90003000 address).
  3. From the built output hex I splitted the external flash part with the hex editor.
  4. As in the youtube link shared, I gave the bin of the external flash part to this batch file for encryption. I got an output encrypted file as specified in the video.
  5. I loaded this file into the external flash and the other part of the hex into internal flash and restarted the device.
  6. I had written a LED indication upon success but it didn't happen.
  7. Without encryption and OTFDEC, just by placing the code in the external flash with memory mapped mode it is getting executed with success.

What am I missing. I saw examples which loads a set of instructions or a separate project into external flash. But I want few functions out of a set of .o files to be placed in the external flash and to be executed seamlessly from the internal flash.

Please guide me on this. Many thanks already !!

0 REPLIES 0