STM32L443xx HAL User Manual
Functions
Extended RTC Tamper functions
RTCEx Exported Functions

Extended RTC Tamper functions. More...

Functions

HAL_StatusTypeDef HAL_RTCEx_SetTamper (RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper)
 Set Tamper.
HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT (RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper)
 Set Tamper with interrupt.
HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper (RTC_HandleTypeDef *hrtc, uint32_t Tamper)
 Deactivate Tamper.
HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event (RTC_HandleTypeDef *hrtc, uint32_t Timeout)
 Handle Tamper 1 Polling.
HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event (RTC_HandleTypeDef *hrtc, uint32_t Timeout)
 Handle Tamper 2 Polling.
HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event (RTC_HandleTypeDef *hrtc, uint32_t Timeout)
 Handle Tamper 3 Polling.
__weak void HAL_RTCEx_Tamper1EventCallback (RTC_HandleTypeDef *hrtc)
 Tamper 1 callback.
__weak void HAL_RTCEx_Tamper2EventCallback (RTC_HandleTypeDef *hrtc)
 Tamper 2 callback.
__weak void HAL_RTCEx_Tamper3EventCallback (RTC_HandleTypeDef *hrtc)
 Tamper 3 callback.

Detailed Description

Extended RTC Tamper functions.

  ==============================================================================
                         ##### Tamper functions #####
  ==============================================================================
  [..]
   (+) Before calling any tamper or internal tamper function, you have to call first
       HAL_RTC_Init() function.
   (+) In that ine you can select to output tamper event on RTC pin.
  [..]
   (+) Enable the Tamper and configure the Tamper filter count, trigger Edge
       or Level according to the Tamper filter (if equal to 0 Edge else Level)
       value, sampling frequency, NoErase, MaskFlag, precharge or discharge and
       Pull-UP, timestamp using the HAL_RTCEx_SetTamper() function.
       You can configure Tamper with interrupt mode using HAL_RTCEx_SetTamper_IT() function.
   (+) The default configuration of the Tamper erases the backup registers. To avoid
       erase, enable the NoErase field on the TAMP_TAMPCR register.
  [..]
   (+) Enable Internal Tamper and configure it with interrupt, timestamp using
       the HAL_RTCEx_SetInternalTamper() function.


Function Documentation

HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper ( RTC_HandleTypeDef hrtc,
uint32_t  Tamper 
)

Deactivate Tamper.

Parameters:
hrtcRTC handle
TamperSelected tamper pin. This parameter can be any combination of the following values:
  • RTC_TAMPER_1
  • RTC_TAMPER_2
  • RTC_TAMPER_3
Return values:
HALstatus

Definition at line 2113 of file stm32l4xx_hal_rtc_ex.c.

References assert_param, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, __RTC_HandleTypeDef::Instance, IS_RTC_TAMPER, RTC_IT_TAMP, RTC_IT_TAMP1, RTC_IT_TAMP2, RTC_IT_TAMP3, and __RTC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event ( RTC_HandleTypeDef hrtc,
uint32_t  Timeout 
)

Handle Tamper 1 Polling.

Parameters:
hrtcRTC handle
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 2162 of file stm32l4xx_hal_rtc_ex.c.

References __HAL_RTC_TAMPER_CLEAR_FLAG, __HAL_RTC_TAMPER_GET_FLAG, HAL_GetTick(), HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, RTC_FLAG_TAMP1F, and __RTC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event ( RTC_HandleTypeDef hrtc,
uint32_t  Timeout 
)

Handle Tamper 2 Polling.

Parameters:
hrtcRTC handle
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 2195 of file stm32l4xx_hal_rtc_ex.c.

References __HAL_RTC_TAMPER_CLEAR_FLAG, __HAL_RTC_TAMPER_GET_FLAG, HAL_GetTick(), HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, RTC_FLAG_TAMP2F, and __RTC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event ( RTC_HandleTypeDef hrtc,
uint32_t  Timeout 
)

Handle Tamper 3 Polling.

Parameters:
hrtcRTC handle
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 2228 of file stm32l4xx_hal_rtc_ex.c.

References __HAL_RTC_TAMPER_CLEAR_FLAG, __HAL_RTC_TAMPER_GET_FLAG, HAL_GetTick(), HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, RTC_FLAG_TAMP3F, and __RTC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RTCEx_SetTamper ( RTC_HandleTypeDef hrtc,
RTC_TamperTypeDef sTamper 
)
HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT ( RTC_HandleTypeDef hrtc,
RTC_TamperTypeDef sTamper 
)

Tamper 1 callback.

Parameters:
hrtcRTC handle
Return values:
None

Definition at line 2263 of file stm32l4xx_hal_rtc_ex.c.

Referenced by HAL_RTC_Init(), HAL_RTC_UnRegisterCallback(), and HAL_RTCEx_TamperTimeStampIRQHandler().

Tamper 2 callback.

Parameters:
hrtcRTC handle
Return values:
None

Definition at line 2279 of file stm32l4xx_hal_rtc_ex.c.

Referenced by HAL_RTC_Init(), HAL_RTC_UnRegisterCallback(), and HAL_RTCEx_TamperTimeStampIRQHandler().

Tamper 3 callback.

Parameters:
hrtcRTC handle
Return values:
None

Definition at line 2295 of file stm32l4xx_hal_rtc_ex.c.

Referenced by HAL_RTC_Init(), HAL_RTC_UnRegisterCallback(), and HAL_RTCEx_TamperTimeStampIRQHandler().