Skip to main content
Geoffrey1
Associate III
August 1, 2026
Question

Flash writes fail after exiting stop3 on stm32u375

  • August 1, 2026
  • 1 reply
  • 54 views

I have an application that uses internal flash for logging.  Unfortunately, after exiting stop3 subsequent writes to flash fail.  Here’s my exit code -- the names of the routines should give a general idea.  I don’t really have a clue what changed and the reference manual is notably sparse on details about the various stop/standby/shutdown modes

 


SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk));

__DSB();
__WFI();
__ISB();

CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk));
PWR->APCR &= ~PWR_APCR_APC;
palSetLine(LINE_testpin);

chSysLock();
tagPowerRestoreClocksAfterStop3();
tagPowerPostStop3WakeEventI();
chSysUnlock();
// Ensure Flash is awake and not stuck in low-power mode
FLASH->ACR &= ~(FLASH_ACR_SLEEP_PD);
__DSB();

 

1 reply

KDJEM.1
ST Technical Moderator
September 16, 2026

Hello ​@Geoffrey1;

 

First of all I apologize for my late reply.

Do you get the same issue when starting from an available example PWR_STOP3?

For more information about power consumption modes, I recommend you to look at RM0487 section 9.3.5 PWR power management and the datasheet.

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.