Alarms (Alarm A and Alarm B) configuration functions.
More...
Alarms (Alarm A and Alarm B) configuration functions.
===============================================================================
##### Alarms A and B configuration functions #####
===============================================================================
[..] This section provide functions allowing to program and read the RTC Alarms.
===============================================================================
##### Alarms (Alarm A and Alarm B) configuration functions #####
===============================================================================
[..] This section provides functions allowing to program and read the RTC Alarms.
Enables or disables the specified RTC Alarm.
- Parameters
-
RTC_Alarm | specifies the alarm to be configured. This parameter can be any combination of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
NewState | new state of the specified alarm. This parameter can be: ENABLE or DISABLE. |
- Return values
-
An | ErrorStatus enumeration value:
- SUCCESS: RTC Alarm is enabled/disabled
- ERROR: RTC Alarm is not enabled/disabled
|
Definition at line 1310 of file stm32f4xx_rtc.c.
Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked).
- Parameters
-
RTC_AlarmStruct | pointer to a RTC_AlarmTypeDef structure which will be initialized. |
- Return values
-
Definition at line 1226 of file stm32f4xx_rtc.c.
void RTC_AlarmSubSecondConfig |
( |
uint32_t |
RTC_Alarm, |
|
|
uint32_t |
RTC_AlarmSubSecondValue, |
|
|
uint32_t |
RTC_AlarmSubSecondMask |
|
) |
| |
Configure the RTC AlarmA/B Sub seconds value and mask.*.
Configures the RTC AlarmA/B Subseconds value and mask.
- Note
- This function is performed only when the Alarm is disabled.
- Parameters
-
RTC_Alarm | specifies the alarm to be configured. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmSubSecondValue | specifies the Sub seconds value. This parameter can be a value from 0 to 0x00007FFF. |
RTC_AlarmSubSecondMask | specifies the Sub seconds Mask. This parameter can be any combination of the following values:
- RTC_AlarmSubSecondMask_All : All Alarm SS fields are masked. There is no comparison on sub seconds for Alarm.
- RTC_AlarmSubSecondMask_SS14_1 : SS[14:1] are don't care in Alarm comparison. Only SS[0] is compared
- RTC_AlarmSubSecondMask_SS14_2 : SS[14:2] are don't care in Alarm comparison. Only SS[1:0] are compared
- RTC_AlarmSubSecondMask_SS14_3 : SS[14:3] are don't care in Alarm comparison. Only SS[2:0] are compared
- RTC_AlarmSubSecondMask_SS14_4 : SS[14:4] are don't care in Alarm comparison. Only SS[3:0] are compared
- RTC_AlarmSubSecondMask_SS14_5 : SS[14:5] are don't care in Alarm comparison. Only SS[4:0] are compared
- RTC_AlarmSubSecondMask_SS14_6 : SS[14:6] are don't care in Alarm comparison. Only SS[5:0] are compared
- RTC_AlarmSubSecondMask_SS14_7 : SS[14:7] are don't care in Alarm comparison. Only SS[6:0] are compared
- RTC_AlarmSubSecondMask_SS14_8 : SS[14:8] are don't care in Alarm comparison. Only SS[7:0] are compared
- RTC_AlarmSubSecondMask_SS14_9 : SS[14:9] are don't care in Alarm comparison. Only SS[8:0] are compared
- RTC_AlarmSubSecondMask_SS14_10: SS[14:10] are don't care in Alarm comparison. Only SS[9:0] are compared
- RTC_AlarmSubSecondMask_SS14_11: SS[14:11] are don't care in Alarm comparison. Only SS[10:0] are compared
- RTC_AlarmSubSecondMask_SS14_12: SS[14:12] are don't care in Alarm comparison. Only SS[11:0] are compared
- RTC_AlarmSubSecondMask_SS14_13: SS[14:13] are don't care in Alarm comparison. Only SS[12:0] are compared
- RTC_AlarmSubSecondMask_SS14 : SS[14] is don't care in Alarm comparison. Only SS[13:0] are compared
- RTC_AlarmSubSecondMask_None : SS[14:0] are compared and must match to activate alarm
|
- Return values
-
- Note
- This function is performed only when the Alarm is disabled.
- Parameters
-
RTC_Alarm | specifies the alarm to be configured. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmSubSecondValue | specifies the Subseconds value. This parameter can be a value from 0 to 0x00007FFF. |
RTC_AlarmSubSecondMask | specifies the Subseconds Mask. This parameter can be any combination of the following values:
- RTC_AlarmSubSecondMask_All : All Alarm SS fields are masked. There is no comparison on sub seconds for Alarm.
- RTC_AlarmSubSecondMask_SS14_1 : SS[14:1] are don't care in Alarm comparison. Only SS[0] is compared
- RTC_AlarmSubSecondMask_SS14_2 : SS[14:2] are don't care in Alarm comparison. Only SS[1:0] are compared
- RTC_AlarmSubSecondMask_SS14_3 : SS[14:3] are don't care in Alarm comparison. Only SS[2:0] are compared
- RTC_AlarmSubSecondMask_SS14_4 : SS[14:4] are don't care in Alarm comparison. Only SS[3:0] are compared
- RTC_AlarmSubSecondMask_SS14_5 : SS[14:5] are don't care in Alarm comparison. Only SS[4:0] are compared
- RTC_AlarmSubSecondMask_SS14_6 : SS[14:6] are don't care in Alarm comparison. Only SS[5:0] are compared
- RTC_AlarmSubSecondMask_SS14_7 : SS[14:7] are don't care in Alarm comparison. Only SS[6:0] are compared
- RTC_AlarmSubSecondMask_SS14_8 : SS[14:8] are don't care in Alarm comparison. Only SS[7:0] are compared
- RTC_AlarmSubSecondMask_SS14_9 : SS[14:9] are don't care in Alarm comparison. Only SS[8:0] are compared
- RTC_AlarmSubSecondMask_SS14_10: SS[14:10] are don't care in Alarm comparison. Only SS[9:0] are compared
- RTC_AlarmSubSecondMask_SS14_11: SS[14:11] are don't care in Alarm comparison. Only SS[10:0] are compared
- RTC_AlarmSubSecondMask_SS14_12: SS[14:12] are don't care in Alarm comparison. Only SS[11:0] are compared
- RTC_AlarmSubSecondMask_SS14_13: SS[14:13] are don't care in Alarm comparison. Only SS[12:0] are compared
- RTC_AlarmSubSecondMask_SS14 : SS[14] is don't care in Alarm comparison. Only SS[13:0] are compared
- RTC_AlarmSubSecondMask_None : SS[14:0] are compared and must match to activate alarm
|
- Return values
-
Definition at line 1404 of file stm32f4xx_rtc.c.
void RTC_GetAlarm |
( |
uint32_t |
RTC_Format, |
|
|
uint32_t |
RTC_Alarm, |
|
|
RTC_AlarmTypeDef * |
RTC_AlarmStruct |
|
) |
| |
Get the RTC Alarm value and masks.
- Parameters
-
RTC_Format | specifies the format of the output parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_Alarm | specifies the alarm to be read. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmStruct | pointer to a RTC_AlarmTypeDef structure that will contains the output alarm configuration values. |
- Return values
-
Definition at line 1256 of file stm32f4xx_rtc.c.
uint32_t RTC_GetAlarmSubSecond |
( |
uint32_t |
RTC_Alarm | ) |
|
Gets the RTC Alarm Sub seconds value.
Gets the RTC Alarm Subseconds value.
- Parameters
-
RTC_Alarm | specifies the alarm to be read. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
None | |
- Return values
-
RTC | Alarm Sub seconds value. |
- Parameters
-
RTC_Alarm | specifies the alarm to be read. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
None | |
- Return values
-
RTC | Alarm Subseconds value. |
Definition at line 1445 of file stm32f4xx_rtc.c.
void RTC_SetAlarm |
( |
uint32_t |
RTC_Format, |
|
|
uint32_t |
RTC_Alarm, |
|
|
RTC_AlarmTypeDef * |
RTC_AlarmStruct |
|
) |
| |
Set the specified RTC Alarm.
- Note
- The Alarm register can only be written when the corresponding Alarm is disabled (Use the RTC_AlarmCmd(DISABLE)).
- Parameters
-
RTC_Format | specifies the format of the returned parameters. This parameter can be one of the following values:
- RTC_Format_BIN: Binary data format
- RTC_Format_BCD: BCD data format
|
RTC_Alarm | specifies the alarm to be configured. This parameter can be one of the following values:
- RTC_Alarm_A: to select Alarm A
- RTC_Alarm_B: to select Alarm B
|
RTC_AlarmStruct | pointer to a RTC_AlarmTypeDef structure that contains the alarm configuration parameters. |
- Return values
-
Definition at line 1115 of file stm32f4xx_rtc.c.