2025-09-12 2:49 AM
Hi,
We've successfully implemented the use of external RAM connected via the OCTOSPI1 interface on the B-U585I-IOT02A board, using the example code provided in the CubeMX packages for read/write operations. Everything works as expected under normal conditions.
However, things get complicated when we introduce Stop2 mode. Upon exiting Stop2, the system enters the HardFault handler, suggesting a fault likely triggered during or immediately after wake-up.
According to the datasheet, the OCTOSPI interface is frozen during low-power modes, and its register values are preserved. Based on this, I assumed that reconfiguring the clocks after exiting Stop2 would be sufficient—but apparently, it's not.
Has anyone successfully implemented external RAM access with Stop2 mode? Are there additional steps or configurations required before entering or after exiting Stop2 ?
Note : the issue happens only out of the debug mode (when the debug probe is not used) !
Thanks in advance for any insights!
2025-09-12 3:49 AM
Hello @pascal38 and welcome to the community;
Which STM32U585 revision are you using (X, W, U)?
I recommend you to look at the errata sheet and check the erratum related to stop2 mode.
May How to debug a HardFault on an Arm® Cortex®-M STM32 article can help you to debug faults.
I hope this help you.
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.
2025-09-12 5:19 AM
Hi Kaouthar,
Thanks for the information and the errata sheet.
Unfortunately, I’m not sure about the silicon revision—my evaluation board just stopped working (it is my fault, I was measuring some signal with a scope and I do make a short somewhere...).
We’ve developed our own board based on the STM32U5A5 device, using the same architecture as the B-U585I-IOT02A. Sadly, we’re encountering the same issue: a hard fault handler is triggered when accessing external RAM after exiting Stop2 mode. I saw an interresting thing in the STM32U5A5 errata sheet which may linked to my issue. But my workaround does not work.
Are you sure there is nothing to do after exiting from low power (except reconfiguring clocks) on octospi side or ram configuration ?
Thanks,
pascal