cancel
Showing results for 
Search instead for 
Did you mean: 

Noekeon MCE not working on OSPI

neset
Associate II

Hello, i'm trying to using mce encription for external flash. I have the stm32h7s7-dk eval board.

my mce configuration for the external memory init;

Screenshot from 2026-01-22 16-20-54.png


my mce configuration for the boot main

Screenshot from 2026-01-22 16-21-24.png

I followed the tutorial series https://www.youtube.com/watch?v=JxhKmVUB2Ws&list=PLnMKNibPkDnFQXYK0ztHV9iMVS6EAtKpD&index=10. And i tried allthing and i applied successfully at my eval board. But the mce is so different. In the tutorial the instructor used different board hence the board is using mce1. But i'm using the mce2 because the xspi2 connected mce2. And the mce2 couldnt support the aes.
My memory write and memcopy methods;

Screenshot from 2026-01-22 16-25-32.png

key and other variables

Screenshot from 2026-01-22 16-25-41.png

Decrypted result (wrong values, it must be start from ram base)

Screenshot from 2026-01-22 16-26-27.png


encripted file;

Screenshot from 2026-01-22 16-26-47.png




Could you help me ?

2 REPLIES 2
KDJEM.1
ST Employee

Hello @neset;

 

I recommend you to look at MCE_NoekeonEncryptDecryptData example may help you. This project provides a description of how to encrypt and decrypt data from external memory (NOR). The encryption/decryption of the data is performed on the fly using the MCE IP.

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

neset
Associate II

Hello KDJEM,

I tried to move the flash xspi2 -> xspi1 but it doesnt change anything in aes with mce1, and i closed the mce peripheral and i tried to write some things via these EXTMEM_MemCopy, memory_write but methods.
The methods defined as weak normally and the instuctor edited these codes for dma transfer mapped mode. (I added the codes as picture). But i saw only 0x00 at the flash when i use these methods. 

By the way i tried to all 

Screenshot from 2026-01-23 17-03-14.png

Screenshot from 2026-01-23 17-01-23.png

Screenshot from 2026-01-23 17-01-31.png

Screenshot from 2026-01-23 17-01-41.png