RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR , ENABLE); PWR_BackupAccessCmd(ENABLE); //RCC_LSICmd(ENABLE); RCC_LSEConfig(RCC_LSE_ON); while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET) { } RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); SynchPrediv = 0xFF; AsynchPrediv = 0x7F; RCC_RTC...
int drv_pm_hw_init(void) { static const struct rt_pm_ops _ops = { stm32_sleep, stm32_run, stm32_pm_timer_start, stm32_pm_timer_stop, stm32_pm_timer_get_tick }; rt_uint8_t timer_mask = 0; /* Enable Power Clock */ __HAL_RCC_PWR_CLK_ENABLE(); /* initialize timer mask...