2026-03-25 8:05 AM - last edited on 2026-05-08 1:49 AM by mƎALLEm
Hi everyone,
We are encountering a XSPI Deadlock on our STM32H7S7-Discovery board (STM32H7S78-DK).
To provide some context, our system is configured as follows:
External FLASH: Connected to XSPI1. Swapped through XSPIM to port 2 and operates in memory mapped mode. MCE1 is activated across the entire address range using the AES-STREAM Cipher.
External PSRAM: Connected to XSPI2. Swapped through XSPIM to port 1 and operates in memory mapped mode. MCE2 is activated across the entire address range using the NOEKEON-BLOCK Cipher.
The issue occurs when running an LZO decompression algorithm. The algorithm reads compressed data from the PSRAM and writes the decompressed output back to the PSRAM, while the code is being executed on External FLASH.
At some point during decompression, the core completely freezes, no HardFault or BusFault is triggered, and the debugger permanently loses its connection to the core.
We have tried multiple approaches to resolve, including the official errata workarounds. Yet, none of them helped so far. Here is what we have tried:
After further investigation, we resolved the issue by modifying the MCE2 configuration for the PSRAM.
Specifically, turning off MCE2 or switching it to the NOEKEON-FAST-BLOCK cipher eliminates the core freeze.
The issue only occurs when the MCE2 - NOEKEON-BLOCK Cipher mode is actively used.
At this point, we suspect there are two possible explanations for this behavior:
We appreciate any advices or insights regarding this behaviour. Thank you in advance.
2026-05-08 1:31 AM - edited 2026-05-08 1:31 AM