Skip to main content
Super User
January 7, 2025
Question

F0 RTC Alarm matching - documentation typo?

  • January 7, 2025
  • 5 replies
  • 822 views

RM0360 (STM32F030x4/x6/x8/xC and STM32F070x6/xB) says:

"The ALRAF is set to 1 if the calendar subseconds, seconds, minutes, hours, date or (sic?) day match the values programmed in the alarm registers RTC_ALRMASSR and RTC_ALRMAR"

But, surely, that should be AND - not or ?

ALRAF is set to 1 if the calendar subseconds, seconds, minutes, hours, date and day match the values programmed in the alarm registers RTC_ALRMASSR and RTC_ALRMAR

 

AndrewNeil_0-1736275066432.png

https://www.st.com/resource/en/reference_manual/rm0360-stm32f030x4x6x8xc-and-stm32f070x6xb-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=490

RM0091 (STM32F0x1/STM32F0x2/STM32F0x8) is the same:

https://www.st.com/resource/en/reference_manual/rm0091-stm32f0x1stm32f0x2stm32f0x8-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=596

 

 

    This topic has been closed for replies.

    5 replies

    Technical Moderator
    January 7, 2025

    hello @Andrew Neil 

    Thank you so much for your feedback. I Will take a look internally and i Will get back to you with an answer ASAP.

    Best Regards.

    STTwo-32

    Super User
    January 8, 2025

    "date or day" is correct, as you can select (using RTC_ALRMAR.WDSEL), whether you want to wake up say on 15th of each month, or say Wednesday on each week. In other words, "date" here means "date-of-month", and "day" here means "day-of-week".

    But I see where are you coming from: the conditions for seconds, minutes, etc. are indeed ANDed together (after being individually masked) to provide the alarm. This is IMO quite hard to formulate clearly in a narrative; perhaps something such as an equation or a schematics would be more illustrative here.

    JW

     

    Super User
    January 8, 2025

    @waclawek.jan wrote:

    "date or day" is correct, as you can select (using RTC_ALRMAR.WDSEL), whether you want to wake up say on 15th of each month, or say Wednesday on each week.


    Ah - I hadn't realised that.

    So the alarm is actually triggered on:

    (subseconds AND seconds AND minutes AND hours) AND (date OR day)

     


    @waclawek.jan wrote:

    This is IMO quite hard to formulate clearly in a narrative; perhaps something such as an equation or a schematics would be more illustrative here.


    Indeed.

     

    Super User
    January 9, 2025

    @STTwo-32  Here's another:

    AndrewNeil_0-1736423219265.png

    The description of ALRAF here omits that it also depends on RTC_ALRMSSR and, thus, RTC_SSR.

    Again, RM0091 is the same.

    Super User
    January 9, 2025

    This problem is present probably across all RMs, both RTCv2 and RTCv3 (and of course also for ALRBF where available).

    Maybe at that point, it would be more appropriate not to try to explain the mechanism leading to ALRAF in detail, but to give a pointer to the respective subchapter in the narrative

    JW

    Technical Moderator
    January 20, 2025

    Hello @Andrew Neil @waclawek.jan 

    Sorry for my late replay. I've escalated the clarifications request to our teams internally (under internal ticket 200777). They may consider it on the coming revisions of the DOCs. Thank you for your contribution.

    Best Regards.

    STTwo-32