SRAM3 clock not enabled on power up
An issue has suddenly popped up on my custom boards using a STM32U575CIT6. It manifests as the MCU appearing to not run code that was successfully flashed. Viewing the registers with CubeProgrammer seems to show it repeatedly running the reset handler. Attaching to the running process with CubeIDE shows hard faults occurring in the first instruction of `__libc_init_array` which is `push {r4, r5, r6, lr}`. The hard faults are a precise data access violation and a stacking error. That instruction is the first instruction that utilizes the stack. When attached, CubeIDE cannot read any data from SRAM3. It appears as all ?’s. I found that the RCC_AHB2ENR1->SRAM3EN bit is 0, which is the clock enable bit for SRAM3. This would explain why SRAM3 appears inaccessible. Putting a breakpoint on the first instruction of the `Reset_Handler()` shows that this bit is unset even then. All other SRAM clock enable bits are set. According to the Reference Manual, that bit’s reset value is 1.
All that is to say, how is it possible that that bit is unset seemingly upon power up when it’s reset value is 1?
Some further context: This is not solved by a reset or power cycle. It does not matter what code is put on the board. Even old, definitively working, code does this. It does not matter how it is flashed, CubeProgrammer or IDE. Strangest of all, this issue seems to just “happen” to our boards and once it does we cannot fix it. It has not happened to all of our boards and we have not nailed down exactly what seems to start this issue on our boards.

