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
This commit is contained in:
vrepetenko 2021-07-31 11:08:18 +00:00
parent a3e8ab79bb
commit 096eefc016
1 changed files with 2 additions and 5 deletions

View File

@ -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();