From 096eefc016dc70058b3c9bc493377359da42f0b5 Mon Sep 17 00:00:00 2001 From: vrepetenko Date: Sat, 31 Jul 2021 11:08:18 +0000 Subject: [PATCH] Fixed alarm disable problem in st_lld_serve_interrupt. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14630 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/SYSTICKv2/hal_st_lld.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/os/hal/ports/STM32/LLD/SYSTICKv2/hal_st_lld.c b/os/hal/ports/STM32/LLD/SYSTICKv2/hal_st_lld.c index 409c3729f..087618ab6 100644 --- a/os/hal/ports/STM32/LLD/SYSTICKv2/hal_st_lld.c +++ b/os/hal/ports/STM32/LLD/SYSTICKv2/hal_st_lld.c @@ -103,13 +103,13 @@ void st_lld_init(void) { /* Enter initialization mode.*/ RTC->ICSR |= RTC_ICSR_INIT; - while ((RTC->ICSR & RTC_ICSR_INITF) == 0) { + while ((RTC->ICSR & RTC_ICSR_INITF) == 0U) { /* Waint for init flag.*/ } /* Activate free running Binary mode.*/ RTC->ICSR |= RTC_ICSR_BIN_0; - /* */ + /* Set RTC prescaler.*/ RTC->PRER = STM32_ST_RTC_PRER_BITS; /* Exit initialization mode.*/ @@ -143,9 +143,6 @@ void st_lld_serve_interrupt(void) { if ((isr & RTC_MISR_ALRAMF) != 0U) { - /* Disable RTC Alarm A.*/ - RTC->CR &= ~(RTC_CR_ALRAE | RTC_CR_ALRAIE); - osalSysLockFromISR(); osalOsTimerHandlerI(); osalSysUnlockFromISR();