cancel
Showing results for 
Search instead for 
Did you mean: 

F0 RTC Alarm matching - documentation typo?

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

 

 

4 REPLIES 4
STTwo-32
ST Employee

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

"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

 


@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.

 


@waclawek.jan wrote:

"date" here means "date-of-month", and "day" here means "day-of-week".


I think those terms are generally used poorly & confusingly throughout.

Good Naming Is Key!