Skip to content

Commit

Permalink
Merge pull request #15446 from mak22223/master
Browse files Browse the repository at this point in the history
Add fix for STM32G4 hardfault in sleep mode
  • Loading branch information
0xc0170 committed Aug 16, 2023
2 parents 3c1f0d5 + 5558225 commit dba734f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
{
/* Request Wait For Interrupt */
__WFI();
__ISB(); // Workaround for STM32G4 errata
// see chapter 2.2.8 - Wrong instruction fetches from flash memory upon wakeup from Sleep or Stop mode when debug in low-power mode is enabled
// https://www.st.com/resource/en/errata_sheet/es0430-stm32g471xx473xx474xx483xx484xx-device-errata-stmicroelectronics.pdf
}
else
{
Expand Down

0 comments on commit dba734f

Please sign in to comment.