2020-10-05 11:44 PM
Hello I am using these lines in order to put my STM32F10x to sleep mode:
void enter_LPSleep (void)
{
//Suspend SYS Tick
HAL_SuspendTick();
//Enable Power Control Clock
__HAL_RCC_PWR_CLK_ENABLE();
//Put regulator to low power mode
HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON,PWR_SLEEPENTRY_WFI);
HAL_ResumeTick();
HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_RED_Pin,GPIO_PIN_RESET);
}
But how can I know if it entered to sleep mode correctly? I am not planning to wake it up after sleep mode. So it will be sleeping till the power is off.
Edit: Also I am usin FreeRTOS, would FreeRTOS task switching wake up the device?
2020-10-06 02:04 AM
measure supply current?