Skip to content

Commit 4f52554

Browse files
committed
Fix to RTC reset
1 parent 33418ce commit 4f52554

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ports/stm/common-hal/alarm/__init__.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ bool common_hal_alarm_woken_from_sleep(void) {
7979
}
8080

8181
STATIC mp_obj_t _get_wake_alarm(size_t n_alarms, const mp_obj_t *alarms) {
82-
if (alarm_pin_pinalarm_woke_us_up()) {
83-
return alarm_pin_pinalarm_get_wakeup_alarm(n_alarms, alarms);
84-
}
8582
uint8_t cause = _get_wakeup_cause();
8683
switch (cause) {
8784
case STM_WAKEUP_RTC: {

ports/stm/supervisor/port.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ safe_mode_t port_init(void) {
169169
HAL_Init(); // Turns on SysTick
170170
__HAL_RCC_SYSCFG_CLK_ENABLE();
171171

172-
#if (CPY_STM32F4)
173172
__HAL_RCC_PWR_CLK_ENABLE();
174-
#endif
175173

174+
HAL_PWR_EnableBkUpAccess();
176175
__HAL_RCC_BACKUPRESET_FORCE();
177176
__HAL_RCC_BACKUPRESET_RELEASE();
178177

0 commit comments

Comments
 (0)