STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
RTC Timestamp and Tamper functions. More...
RTC Timestamp and Tamper functions.
=============================================================================== ##### RTC Timestamp and Tamper functions ##### =============================================================================== [..] This section provides functions allowing to configure Timestamp feature
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp | ( | RTC_HandleTypeDef * | hrtc, |
uint32_t | RTC_TimeStampEdge, | ||
uint32_t | RTC_TimeStampPin ) |
#include <stm32f4xx_hal_rtc_ex.h>
Sets Timestamp.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
RTC_TimeStampEdge | Specifies the pin edge on which the Timestamp is activated. This parameter can be one of the following values:
|
RTC_TimeStampPin | Specifies the RTC Timestamp Pin. This parameter can be one of the following values:
|
HAL | status |
Definition at line 186 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_RTC_TIMESTAMP_CLEAR_FLAG, __HAL_RTC_TIMESTAMP_ENABLE, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, assert_param, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, IS_RTC_TIMESTAMP_PIN, IS_TIMESTAMP_EDGE, RTC_FLAG_TSF, RTC_FLAG_TSOVF, and RTC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT | ( | RTC_HandleTypeDef * | hrtc, |
uint32_t | RTC_TimeStampEdge, | ||
uint32_t | RTC_TimeStampPin ) |
#include <stm32f4xx_hal_rtc_ex.h>
Sets Timestamp with Interrupt.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
RTC_TimeStampEdge | Specifies the pin edge on which the Timestamp is activated. This parameter can be one of the following values:
|
RTC_TimeStampPin | Specifies the RTC Timestamp Pin. This parameter can be one of the following values:
|
HAL | status |
Definition at line 258 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT, __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE, __HAL_RTC_TIMESTAMP_CLEAR_FLAG, __HAL_RTC_TIMESTAMP_ENABLE, __HAL_RTC_TIMESTAMP_ENABLE_IT, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, assert_param, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, IS_RTC_TIMESTAMP_PIN, IS_TIMESTAMP_EDGE, RTC_FLAG_TSF, RTC_FLAG_TSOVF, RTC_IT_TS, and RTC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp | ( | RTC_HandleTypeDef * | hrtc | ) |
#include <stm32f4xx_hal_rtc_ex.h>
Deactivates Timestamp.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
HAL | status |
Definition at line 321 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_RTC_TIMESTAMP_DISABLE_IT, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, RTC_IT_TS, and RTC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp | ( | RTC_HandleTypeDef * | hrtc, |
RTC_TimeTypeDef * | sTimeStamp, | ||
RTC_DateTypeDef * | sTimeStampDate, | ||
uint32_t | Format ) |
#include <stm32f4xx_hal_rtc_ex.h>
Gets the RTC Timestamp value.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sTimeStamp | Pointer to Time structure |
sTimeStampDate | Pointer to Date structure |
Format | specifies the format of the entered parameters. This parameter can be one of the following values:
|
HAL | status |
Definition at line 365 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_RTC_TIMESTAMP_CLEAR_FLAG, assert_param, RTC_DateTypeDef::Date, HAL_OK, RTC_TimeTypeDef::Hours, RTC_HandleTypeDef::Instance, IS_RTC_FORMAT, RTC_TimeTypeDef::Minutes, RTC_DateTypeDef::Month, RTC_Bcd2ToByte(), RTC_DR_RESERVED_MASK, RTC_FLAG_TSF, RTC_FORMAT_BIN, RTC_TR_RESERVED_MASK, RTC_TimeTypeDef::Seconds, RTC_TimeTypeDef::SubSeconds, RTC_TimeTypeDef::TimeFormat, RTC_DateTypeDef::WeekDay, and RTC_DateTypeDef::Year.
HAL_StatusTypeDef HAL_RTCEx_SetTamper | ( | RTC_HandleTypeDef * | hrtc, |
RTC_TamperTypeDef * | sTamper ) |
#include <stm32f4xx_hal_rtc_ex.h>
Sets Tamper.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sTamper | Pointer to Tamper Structure. |
HAL | status |
Definition at line 418 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_UNLOCK, assert_param, RTC_TamperTypeDef::Filter, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, IS_RTC_TAMPER, IS_RTC_TAMPER_FILTER, IS_RTC_TAMPER_FILTER_CONFIG_CORRECT, IS_RTC_TAMPER_PIN, IS_RTC_TAMPER_PRECHARGE_DURATION, IS_RTC_TAMPER_PULLUP_STATE, IS_RTC_TAMPER_SAMPLING_FREQ, IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION, IS_RTC_TAMPER_TRIGGER, RTC_TamperTypeDef::PinSelection, RTC_TamperTypeDef::PrechargeDuration, RTC_TAMPER_PULLUP_MASK, RTC_TAMPERFILTER_MASK, RTC_TAMPERPRECHARGEDURATION_MASK, RTC_TAMPERSAMPLINGFREQ_RTCCLK_MASK, RTC_TAMPERTRIGGER_FALLINGEDGE, RTC_TIMESTAMPONTAMPERDETECTION_MASK, RTC_TamperTypeDef::SamplingFrequency, RTC_HandleTypeDef::State, RTC_TamperTypeDef::Tamper, RTC_TamperTypeDef::TamperPullUp, RTC_TamperTypeDef::TimeStampOnTamperDetection, and RTC_TamperTypeDef::Trigger.
HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT | ( | RTC_HandleTypeDef * | hrtc, |
RTC_TamperTypeDef * | sTamper ) |
#include <stm32f4xx_hal_rtc_ex.h>
Sets Tamper with interrupt.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sTamper | Pointer to RTC Tamper. |
HAL | status |
Definition at line 495 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT, __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE, __HAL_UNLOCK, assert_param, RTC_TamperTypeDef::Filter, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, IS_RTC_TAMPER, IS_RTC_TAMPER_FILTER, IS_RTC_TAMPER_FILTER_CONFIG_CORRECT, IS_RTC_TAMPER_PIN, IS_RTC_TAMPER_PRECHARGE_DURATION, IS_RTC_TAMPER_PULLUP_STATE, IS_RTC_TAMPER_SAMPLING_FREQ, IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION, IS_RTC_TAMPER_TRIGGER, RTC_TamperTypeDef::PinSelection, RTC_TamperTypeDef::PrechargeDuration, RTC_TAMPER_PULLUP_MASK, RTC_TAMPERFILTER_MASK, RTC_TAMPERPRECHARGEDURATION_MASK, RTC_TAMPERSAMPLINGFREQ_RTCCLK_MASK, RTC_TAMPERTRIGGER_FALLINGEDGE, RTC_TIMESTAMPONTAMPERDETECTION_MASK, RTC_TamperTypeDef::SamplingFrequency, RTC_HandleTypeDef::State, RTC_TamperTypeDef::Tamper, RTC_TamperTypeDef::TamperPullUp, RTC_TamperTypeDef::TimeStampOnTamperDetection, and RTC_TamperTypeDef::Trigger.
HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper | ( | RTC_HandleTypeDef * | hrtc, |
uint32_t | Tamper ) |
#include <stm32f4xx_hal_rtc_ex.h>
Deactivates Tamper.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
Tamper | Selected tamper pin. This parameter can be any combination of the following values:
|
HAL | status |
Definition at line 580 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_LOCK, __HAL_UNLOCK, assert_param, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, IS_RTC_TAMPER, and RTC_HandleTypeDef::State.
void HAL_RTCEx_TamperTimeStampIRQHandler | ( | RTC_HandleTypeDef * | hrtc | ) |
#include <stm32f4xx_hal_rtc_ex.h>
Handles Timestamp and Tamper interrupt request.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
None |
Definition at line 606 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_RTC_TAMPER_CLEAR_FLAG, __HAL_RTC_TAMPER_GET_FLAG, __HAL_RTC_TAMPER_GET_IT_SOURCE, __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG, __HAL_RTC_TIMESTAMP_CLEAR_FLAG, __HAL_RTC_TIMESTAMP_GET_FLAG, __HAL_RTC_TIMESTAMP_GET_IT_SOURCE, HAL_RTC_STATE_READY, HAL_RTCEx_Tamper1EventCallback(), HAL_RTCEx_TimeStampEventCallback(), RTC_FLAG_TAMP1F, RTC_FLAG_TSF, RTC_IT_TAMP, RTC_IT_TS, and RTC_HandleTypeDef::State.
__weak void HAL_RTCEx_Tamper1EventCallback | ( | RTC_HandleTypeDef * | hrtc | ) |
#include <stm32f4xx_hal_rtc_ex.h>
Tamper 1 callback.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
None |
Definition at line 694 of file stm32f4xx_hal_rtc_ex.c.
References UNUSED.
Referenced by HAL_RTC_Init(), and HAL_RTCEx_TamperTimeStampIRQHandler().
__weak void HAL_RTCEx_TimeStampEventCallback | ( | RTC_HandleTypeDef * | hrtc | ) |
#include <stm32f4xx_hal_rtc_ex.h>
Timestamp callback.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
None |
Definition at line 678 of file stm32f4xx_hal_rtc_ex.c.
References UNUSED.
Referenced by HAL_RTC_Init(), and HAL_RTCEx_TamperTimeStampIRQHandler().
HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent | ( | RTC_HandleTypeDef * | hrtc, |
uint32_t | Timeout ) |
#include <stm32f4xx_hal_rtc_ex.h>
Handles Timestamp polling request.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
Timeout | Timeout duration |
HAL | status |
Definition at line 729 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_RTC_TIMESTAMP_CLEAR_FLAG, __HAL_RTC_TIMESTAMP_GET_FLAG, HAL_ERROR, HAL_GetTick(), HAL_MAX_DELAY, HAL_OK, HAL_RTC_STATE_ERROR, HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, HAL_TIMEOUT, RTC_FLAG_TSF, RTC_FLAG_TSOVF, and RTC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event | ( | RTC_HandleTypeDef * | hrtc, |
uint32_t | Timeout ) |
#include <stm32f4xx_hal_rtc_ex.h>
Handles Tamper 1 Polling.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
Timeout | Timeout duration |
HAL | status |
Definition at line 772 of file stm32f4xx_hal_rtc_ex.c.
References __HAL_RTC_TAMPER_CLEAR_FLAG, __HAL_RTC_TAMPER_GET_FLAG, HAL_GetTick(), HAL_MAX_DELAY, HAL_OK, HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, HAL_TIMEOUT, RTC_FLAG_TAMP1F, and RTC_HandleTypeDef::State.