STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Extended Peripheral Control functions

Extended Peripheral Control functions. More...

Collaboration diagram for Extended Peripheral Control functions:

Functions

void HAL_RTCEx_BKUPWrite (RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data)
 Writes a data in a specified RTC Backup data register.
 
uint32_t HAL_RTCEx_BKUPRead (RTC_HandleTypeDef *hrtc, uint32_t BackupRegister)
 Reads data from the specified RTC Backup data Register.
 
HAL_StatusTypeDef HAL_RTCEx_SetCoarseCalib (RTC_HandleTypeDef *hrtc, uint32_t CalibSign, uint32_t Value)
 Sets the Coarse calibration parameters.
 
HAL_StatusTypeDef HAL_RTCEx_DeactivateCoarseCalib (RTC_HandleTypeDef *hrtc)
 Deactivates the Coarse calibration parameters.
 
HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib (RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmoothCalibMinusPulsesValue)
 Sets the Smooth calibration parameters.
 
HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift (RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS)
 Configures the Synchronization Shift Control Settings.
 
HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut (RTC_HandleTypeDef *hrtc, uint32_t CalibOutput)
 Configures the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).
 
HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut (RTC_HandleTypeDef *hrtc)
 Deactivates the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).
 
HAL_StatusTypeDef HAL_RTCEx_SetRefClock (RTC_HandleTypeDef *hrtc)
 Enables the RTC reference clock detection.
 
HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock (RTC_HandleTypeDef *hrtc)
 Disable the RTC reference clock detection.
 
HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow (RTC_HandleTypeDef *hrtc)
 Enables the Bypass Shadow feature.
 
HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow (RTC_HandleTypeDef *hrtc)
 Disables the Bypass Shadow feature.
 

Detailed Description

Extended Peripheral Control functions.

 ===============================================================================
              ##### Extended Peripheral Control functions #####
 ===============================================================================
    [..]
    This subsection provides functions allowing to
      (+) Write a data in a specified RTC Backup data register
      (+) Read a data in a specified RTC Backup data register
      (+) Set the Coarse calibration parameters.
      (+) Deactivate the Coarse calibration parameters
      (+) Set the Smooth calibration parameters.
      (+) Configure the Synchronization Shift Control Settings.
      (+) Configure the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).
      (+) Deactivate the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).
      (+) Enable the RTC reference clock detection.
      (+) Disable the RTC reference clock detection.
      (+) Enable the Bypass Shadow feature.
      (+) Disable the Bypass Shadow feature.

Function Documentation

◆ HAL_RTCEx_BKUPWrite()

void HAL_RTCEx_BKUPWrite ( RTC_HandleTypeDef * hrtc,
uint32_t BackupRegister,
uint32_t Data )

#include <stm32f4xx_hal_rtc_ex.h>

Writes a data in a specified RTC Backup data register.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
BackupRegisterRTC Backup data Register number. This parameter can be: RTC_BKP_DRx (where x can be from 0 to 19) to specify the register.
DataData to be written in the specified RTC Backup data register.
Return values
None

Definition at line 1248 of file stm32f4xx_hal_rtc_ex.c.

References assert_param, RTC_HandleTypeDef::Instance, and IS_RTC_BKP.

◆ HAL_RTCEx_BKUPRead()

uint32_t HAL_RTCEx_BKUPRead ( RTC_HandleTypeDef * hrtc,
uint32_t BackupRegister )

#include <stm32f4xx_hal_rtc_ex.h>

Reads data from the specified RTC Backup data Register.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
BackupRegisterRTC Backup data Register number. This parameter can be: RTC_BKP_DRx (where x can be from 0 to 19) to specify the register.
Return values
Readvalue

Definition at line 1271 of file stm32f4xx_hal_rtc_ex.c.

References assert_param, RTC_HandleTypeDef::Instance, and IS_RTC_BKP.

◆ HAL_RTCEx_SetCoarseCalib()

HAL_StatusTypeDef HAL_RTCEx_SetCoarseCalib ( RTC_HandleTypeDef * hrtc,
uint32_t CalibSign,
uint32_t Value )

#include <stm32f4xx_hal_rtc_ex.h>

Sets the Coarse calibration parameters.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
CalibSignSpecifies the sign of the coarse calibration value. This parameter can be one of the following values:
  • RTC_CALIBSIGN_POSITIVE: The value sign is positive
  • RTC_CALIBSIGN_NEGATIVE: The value sign is negative
Valuevalue of coarse calibration expressed in ppm (coded on 5 bits).
Note
This Calibration value should be between 0 and 63 when using negative sign with a 2-ppm step.
This Calibration value should be between 0 and 126 when using positive sign with a 4-ppm step.
Return values
HALstatus

Definition at line 1302 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_COARSE_CALIB_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_CALIB_SIGN, IS_RTC_CALIB_VALUE, RTC_EnterInitMode(), RTC_ExitInitMode(), and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_DeactivateCoarseCalib()

HAL_StatusTypeDef HAL_RTCEx_DeactivateCoarseCalib ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Deactivates the Coarse calibration parameters.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1353 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_COARSE_CALIB_DISABLE, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_EnterInitMode(), RTC_ExitInitMode(), and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_SetSmoothCalib()

HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib ( RTC_HandleTypeDef * hrtc,
uint32_t SmoothCalibPeriod,
uint32_t SmoothCalibPlusPulses,
uint32_t SmoothCalibMinusPulsesValue )

#include <stm32f4xx_hal_rtc_ex.h>

Sets the Smooth calibration parameters.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
SmoothCalibPeriodSelect the Smooth Calibration Period. This parameter can be can be one of the following values:
  • RTC_SMOOTHCALIB_PERIOD_32SEC: The smooth calibration period is 32s.
  • RTC_SMOOTHCALIB_PERIOD_16SEC: The smooth calibration period is 16s.
  • RTC_SMOOTHCALIB_PERIOD_8SEC: The smooth calibration period is 8s.
SmoothCalibPlusPulsesSelect to Set or reset the CALP bit. This parameter can be one of the following values:
  • RTC_SMOOTHCALIB_PLUSPULSES_SET: Add one RTCCLK pulse every 2*11 pulses.
  • RTC_SMOOTHCALIB_PLUSPULSES_RESET: No RTCCLK pulses are added.
SmoothCalibMinusPulsesValueSelect the value of CALM[8:0] bits. This parameter can be one any value from 0 to 0x000001FF.
Note
To deactivate the smooth calibration, the field SmoothCalibPlusPulses must be equal to SMOOTHCALIB_PLUSPULSES_RESET and the field SmoothCalibMinusPulsesValue must be equal to 0.
Return values
HALstatus

Definition at line 1411 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, assert_param, HAL_GetTick(), HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, HAL_TIMEOUT, RTC_HandleTypeDef::Instance, IS_RTC_SMOOTH_CALIB_MINUS, IS_RTC_SMOOTH_CALIB_PERIOD, IS_RTC_SMOOTH_CALIB_PLUS, RTC_TIMEOUT_VALUE, and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_SetSynchroShift()

HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift ( RTC_HandleTypeDef * hrtc,
uint32_t ShiftAdd1S,
uint32_t ShiftSubFS )

#include <stm32f4xx_hal_rtc_ex.h>

Configures the Synchronization Shift Control Settings.

Note
When REFCKON is set, firmware must not write to Shift control register.
Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
ShiftAdd1SSelect to add or not 1 second to the time calendar. This parameter can be one of the following values:
  • RTC_SHIFTADD1S_SET: Add one second to the clock calendar.
  • RTC_SHIFTADD1S_RESET: No effect.
ShiftSubFSSelect the number of Second Fractions to substitute. This parameter can be one any value from 0 to 0x7FFF.
Return values
HALstatus

Definition at line 1483 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, assert_param, HAL_ERROR, HAL_GetTick(), HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_ERROR, HAL_RTC_STATE_READY, HAL_RTC_STATE_TIMEOUT, HAL_RTC_WaitForSynchro(), HAL_TIMEOUT, RTC_HandleTypeDef::Instance, IS_RTC_SHIFT_ADD1S, IS_RTC_SHIFT_SUBFS, RTC_TIMEOUT_VALUE, and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_SetCalibrationOutPut()

HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut ( RTC_HandleTypeDef * hrtc,
uint32_t CalibOutput )

#include <stm32f4xx_hal_rtc_ex.h>

Configures the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
CalibOutputSelect the Calibration output Selection. This parameter can be one of the following values:
  • RTC_CALIBOUTPUT_512HZ: A signal has a regular waveform at 512Hz.
  • RTC_CALIBOUTPUT_1HZ: A signal has a regular waveform at 1Hz.
Return values
HALstatus

Definition at line 1578 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_CALIBRATION_OUTPUT_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_CALIB_OUTPUT, and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_DeactivateCalibrationOutPut()

HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Deactivates the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz).

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1617 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_CALIBRATION_OUTPUT_DISABLE, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_SetRefClock()

HAL_StatusTypeDef HAL_RTCEx_SetRefClock ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Enables the RTC reference clock detection.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1647 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_CLOCKREF_DETECTION_ENABLE, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_EnterInitMode(), RTC_ExitInitMode(), and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_DeactivateRefClock()

HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Disable the RTC reference clock detection.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1691 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_CLOCKREF_DETECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_EnterInitMode(), RTC_ExitInitMode(), and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_EnableBypassShadow()

HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Enables the Bypass Shadow feature.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Note
When the Bypass Shadow is enabled the calendar value are taken directly from the Calendar counter.
Return values
HALstatus

Definition at line 1737 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, and RTC_HandleTypeDef::State.

◆ HAL_RTCEx_DisableBypassShadow()

HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc_ex.h>

Disables the Bypass Shadow feature.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Note
When the Bypass Shadow is enabled the calendar value are taken directly from the Calendar counter.
Return values
HALstatus

Definition at line 1770 of file stm32f4xx_hal_rtc_ex.c.

References __HAL_LOCK, __HAL_RTC_WRITEPROTECTION_DISABLE, __HAL_RTC_WRITEPROTECTION_ENABLE, __HAL_UNLOCK, HAL_OK, HAL_RTC_STATE_BUSY, HAL_RTC_STATE_READY, RTC_HandleTypeDef::Instance, and RTC_HandleTypeDef::State.