Question
How to update the programmable alarm
Posted on August 20, 2017 at 19:15
Hi every one
I want update the programmable alarm in stm32f4 series .
according to reference manual :
Programming the alarmA similar procedure must be followed to program or update the programmable alarm (AlarmA or Alarm B):1. Clear ALRAE or ALRBIE in RTC_CR to disable Alarm A or Alarm B.2. Poll ALRAWF or ALRBWF in RTC_ISR until it is set to make sure the access to alarmregisters is allowed. This takes 1 to 2 RTCCLK clock cycles (due to clocksynchronization).3. Program the Alarm A or Alarm B registers (RTC_ALRMASSR/RTC_ALRMAR orRTC_ALRMBSSR/RTC_ALRMBR).4. Set ALRAE or ALRBIE in the RTC_CR register to enable Alarm A or Alarm B again.Note: Each change of the RTC_CR register is taken into account after 1 to 2 RTCCLK clock cyclesdue to clock synchronization.problem is here that RTC_CR values do not change .
so I can not update the alarm .
please help me .
thank you.
#programable #alarm #rtc #update-alarm #alarm-b #alarm-a