cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to go into, then out of sleep mode. Two problems.

PAngl.14
Associate II

Problem 1)  current draw does not change after entering sleep mode.

Problem 2)  not sure if program should resume where it stopped or from the beginning of main. Also any difference between waking by NRST or by A0 set to PWR_WKUP0?

Mcu is 'H747 operating on core M7

/* USER CODE BEGIN 2 */

HAL_Delay(100);

HAL_UART_Transmit(&huart1, "Before Sleep\r\n", sizeof("Before Sleep\r\n") , 0xFF);

HAL_PWR_EnableWakeUpPin (PWR_WAKEUP_PIN1);

HAL_SuspendTick();

HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);

HAL_ResumeTick();

HAL_UART_Transmit(&huart1, "After Sleep\r\n", sizeof("After Sleep\r\n") , 0xFF);

HAL_Delay(100);

/* USER CODE END 2 */

2 REPLIES 2
TDK
Guru

Program will resume from where it went to sleep. Toggling NRST wont cause it to wake from sleep mode, it will reset the chip. Which I guess technically will end sleep mode but not in the wake up way.

If you feel a post has answered your question, please click "Accept as Solution".
PAngl.14
Associate II

​Has anyone been able to actually reduce power consumption on the stm32h747 using standby or sleep?