AnsweredAssumed Answered

How to update the programmable alarm

Question asked by khastar.mehdi on Aug 20, 2017
Latest reply on Sep 3, 2017 by khastar.mehdi

Hi every one 

I want update the programmable alarm in stm32f4 series .

according to reference manual :
Programming the alarm
A similar procedure must be followed to program or update the programmable alarm (Alarm
A 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 alarm
registers is allowed. This takes 1 to 2 RTCCLK clock cycles (due to clock
synchronization).
3. Program the Alarm A or Alarm B registers (RTC_ALRMASSR/RTC_ALRMAR or
RTC_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 cycles
due 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. 

Outcomes