cancel
Showing results for 
Search instead for 
Did you mean: 

The question about Sleep mode

XZou.1
Associate II

​I want to let STM32L552CC into sleep mode.

I add

HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);

Build is OK,

but when Debug ,the error appeared,

0693W000008vsgHQAQ.png Why?

2 REPLIES 2
KnarfB
Principal III

Looks like a problem with programming (flashing) your binary code, unrelated to HAL_PWR_EnterSLEEPMode.

Suggestions:

  • update to the lastest STM32CubeIDE release (if not done already)
  • Try STM32Programmer as an independent tool for programming (flashing). STM32Programmer cannot really debug, but if is works, it prooves that your electrical setup is okay
  • Double-check that the correct chip is selected (flash size etc..)

hth

KnarfB

MM..1
Chief II

When you activate some sleep modes your mcu stop react to debug. You need connect under reset and debug low power modes checkbox enabled in debuger config...