Fix to RTC reset

This commit is contained in:
Lucian Copeland 2021-04-01 20:53:25 -04:00
parent 33418ce826
commit 4f52554eb3
2 changed files with 1 additions and 5 deletions

View File

@ -79,9 +79,6 @@ bool common_hal_alarm_woken_from_sleep(void) {
}
STATIC mp_obj_t _get_wake_alarm(size_t n_alarms, const mp_obj_t *alarms) {
if (alarm_pin_pinalarm_woke_us_up()) {
return alarm_pin_pinalarm_get_wakeup_alarm(n_alarms, alarms);
}
uint8_t cause = _get_wakeup_cause();
switch (cause) {
case STM_WAKEUP_RTC: {

View File

@ -169,10 +169,9 @@ safe_mode_t port_init(void) {
HAL_Init(); // Turns on SysTick
__HAL_RCC_SYSCFG_CLK_ENABLE();
#if (CPY_STM32F4)
__HAL_RCC_PWR_CLK_ENABLE();
#endif
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_BACKUPRESET_FORCE();
__HAL_RCC_BACKUPRESET_RELEASE();