STM32H7Sx: unknown setting causing data corruption
We are seeing a very odd data corruption issue which is highly repeatable, and appears to be related to a configuration setting which we haven't yet identified.
In our system (running on an STM32H7S7), we're using the STiROT + OEMuROT secure bootloader to load our application. After a minute or two, the application causes a hard fault.
The issue comes down to a POP instruction. I can see in the debugger that a value is being copied from the stack to a register, but one of the bits is flipped. Subsequent instructions do some indirection which ultimately causes the hard fault.
It's always the same instruction in the same line of code. It always occurs within the first minute or two of execution.
Using the debugger, we can see that the value in the stack (stored in DTCM) is correct. The error occurs when it's copied to the register. And although the error always occurs at the same address, it doesn't appear to be a fault with that location, as when I moved the stack to elsewhere in DTCM, exactly the same issue occurred in the relocated stack too.
But here's the thing: if we run the application without the secure bootloader, the error never occurs, and we can run the application for hours with no problem.
So: is there a configuration setting that could explain this?
(See also this post from
ST: whether or not you reply privately, please also post any comments here on the forum for the benefit of other users.
