Skip to main content
Associate III
April 23, 2025
Solved

STM32H7RS MCE

  • April 23, 2025
  • 13 replies
  • 1145 views

Hello,

I have a question about the usage of the MCE in the STM32H7RS

I have the STM32H7S78-DK board

I'm starting with a project that show images to LTDC with images on the flash (copy with DMA2D) and the framebuffer is on the PSRAM.

My project works with this tuto to get the flash running : https://github.com/ST-TOMAS-Workshop/stm32h7s_workshop/tree/main/1_external_memory

And this one to have MCE working : https://github.com/ST-TOMAS-Workshop/stm32h7s_workshop/tree/main/3_external_memory_encryption

The project seems to run well beacause my led blink like it should but !

defining my images in "const uint16_t ecran_start" now (since MCE is enable) gives me black images (in debug session i see the variable in Expressions correctly) .
Removing the const the images shows but by internal ram will be filled very quick
Putting the image in my PSRAM section it is glitched on the screen
My framebuffer is in PSRAM and works because DMA2D show a red rectangle that i programmed (DMA2D R2M)
Putting framebuffer into internal RAM doesn't fix issues
Is there special things to setup about memory usage with MCE ?

Thanks




Best answer by Hamady

For info i found the ISSUE 

Put this in the boot file 
pConfig.PrivilegedAccess=MCE_REGION_NPRIV; 

In the tutorial if you put the default line in the boot all peripheral will be disabled 

pConfig.PrivilegedAccess=MCE_REGION_PRIV //wrong line

13 replies

HamadyAuthor
Associate III
May 14, 2025

hello @KDJEM.1 

This is normal that i dont use memory mapped mode 

my flash is configured as the workshop (XIP and after MCE ) of the H7S7 suggested so no memory mapped.

And my PSRAM doesn't need MCE as we just need the flash to be encrypted 

Tell me if you need more info 

Thanks 

HamadyAuthor
Associate III
May 20, 2025

Hello,  @KDJEM.1 

Do you have any news about the issue.

Thanks

HamadyAuthorBest answer
Associate III
July 6, 2025

For info i found the ISSUE 

Put this in the boot file 
pConfig.PrivilegedAccess=MCE_REGION_NPRIV; 

In the tutorial if you put the default line in the boot all peripheral will be disabled 

pConfig.PrivilegedAccess=MCE_REGION_PRIV //wrong line