Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
Alarms configuration functions
[RTC_Private_Functions]
Alarms (Alarm A and Alarm B) configuration functions. More...
Functions | |
| void | RTC_SetAlarm (uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef *RTC_AlarmStruct) |
| Set the specified RTC Alarm. | |
| void | RTC_AlarmStructInit (RTC_AlarmTypeDef *RTC_AlarmStruct) |
| Fills each RTC_AlarmStruct member with its default value (Time = 00h:00mn:00sec / Date = 1st day of the month/Mask = all fields are masked). | |
| void | RTC_GetAlarm (uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef *RTC_AlarmStruct) |
| Get the RTC Alarm value and masks. | |
| ErrorStatus | RTC_AlarmCmd (uint32_t RTC_Alarm, FunctionalState NewState) |
| Enables or disables the specified RTC Alarm. | |
| void | RTC_AlarmSubSecondConfig (uint32_t RTC_Alarm, uint32_t RTC_AlarmSubSecondValue, uint32_t RTC_AlarmSubSecondMask) |
| Configures the RTC AlarmA/B Subseconds value and mask. | |
| uint32_t | RTC_GetAlarmSubSecond (uint32_t RTC_Alarm) |
| Gets the RTC Alarm Subseconds value. | |
Detailed Description
Alarms (Alarm A and Alarm B) configuration functions.
===============================================================================
##### Alarms (Alarm A and Alarm B) configuration functions #####
===============================================================================
[..] This section provides functions allowing to program and read the RTC Alarms.
Function Documentation
| ErrorStatus RTC_AlarmCmd | ( | uint32_t | RTC_Alarm, |
| FunctionalState | NewState | ||
| ) |
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 1272 of file stm32f30x_rtc.c.
| void RTC_AlarmStructInit | ( | RTC_AlarmTypeDef * | RTC_AlarmStruct ) |
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:
-
None
Definition at line 1188 of file stm32f30x_rtc.c.
| void RTC_AlarmSubSecondConfig | ( | uint32_t | RTC_Alarm, |
| uint32_t | RTC_AlarmSubSecondValue, | ||
| uint32_t | RTC_AlarmSubSecondMask | ||
| ) |
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 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:
-
None
Definition at line 1366 of file stm32f30x_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:
-
None
Definition at line 1218 of file stm32f30x_rtc.c.
| uint32_t RTC_GetAlarmSubSecond | ( | uint32_t | RTC_Alarm ) |
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 Subseconds value.
Definition at line 1407 of file stm32f30x_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:
-
None
Definition at line 1077 of file stm32f30x_rtc.c.
Generated on Tue Jul 12 2022 17:34:46 by
1.7.2