STM CMSIS
stm32f4xx_hal_rtc_ex.c File Reference

RTC HAL module driver. This file provides firmware functions to manage the following functionalities of the Real Time Clock (RTC) Extension peripheral: More...

#include "stm32f4xx_hal.h"

Detailed Description

RTC HAL module driver. This file provides firmware functions to manage the following functionalities of the Real Time Clock (RTC) Extension peripheral:

Author
MCD Application Team
Version
V1.5.0
Date
06-May-2016
  • RTC Time Stamp functions
  • RTC Tamper functions
  • RTC Wake-up functions
  • Extension Control functions
  • Extension RTC features functions
==============================================================================
                ##### How to use this driver #####
==============================================================================
[..] 
  (+) Enable the RTC domain access.
  (+) Configure the RTC Prescaler (Asynchronous and Synchronous) and RTC hour 
      format using the HAL_RTC_Init() function.

*** RTC Wake-up configuration ***
================================
[..] 
  (+) To configure the RTC Wake-up Clock source and Counter use the HAL_RTC_SetWakeUpTimer()
      function. You can also configure the RTC Wake-up timer in interrupt mode 
      using the HAL_RTC_SetWakeUpTimer_IT() function.
  (+) To read the RTC Wake-up Counter register, use the HAL_RTC_GetWakeUpTimer() 
      function.

*** TimeStamp configuration ***
===============================
[..]
  (+) Configure the RTC_AFx trigger and enable the RTC TimeStamp using the 
      HAL_RTC_SetTimeStamp() function. You can also configure the RTC TimeStamp with 
      interrupt mode using the HAL_RTC_SetTimeStamp_IT() function.
  (+) To read the RTC TimeStamp Time and Date register, use the HAL_RTC_GetTimeStamp()
      function.
  (+) The TIMESTAMP alternate function can be mapped either to RTC_AF1 (PC13)
      or RTC_AF2 (PI8 or PA0 only for STM32F446xx devices) depending on the value of TSINSEL bit in 
      RTC_TAFCR register. The corresponding pin is also selected by HAL_RTC_SetTimeStamp()
      or HAL_RTC_SetTimeStamp_IT() function.

*** Tamper configuration ***
============================
[..]
  (+) Enable the RTC 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, precharge or discharge and Pull-UP using the 
      HAL_RTC_SetTamper() function. You can configure RTC Tamper in interrupt 
      mode using HAL_RTC_SetTamper_IT() function.
  (+) The TAMPER1 alternate function can be mapped either to RTC_AF1 (PC13)
      or RTC_AF2 (PI8 or PA0 only for STM32F446xx devices) depending on the value of TAMP1INSEL bit in 
      RTC_TAFCR register. The corresponding pin is also selected by HAL_RTC_SetTamper()
      or HAL_RTC_SetTamper_IT() function.

*** Backup Data Registers configuration ***
===========================================
[..]
  (+) To write to the RTC Backup Data registers, use the HAL_RTC_BKUPWrite()
      function.  
  (+) To read the RTC Backup Data registers, use the HAL_RTC_BKUPRead()
      function.
Attention

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.