STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Macros | Functions | Variables
stm32f7xx_hal_timebase_rtc_alarm_template.c File Reference

HAL time base based on the hardware RTC_ALARM Template. More...

#include "stm32f7xx_hal.h"

Go to the source code of this file.

Macros

#define RTC_CLOCK_SOURCE_HSE
 
#define RTC_ASYNCH_PREDIV   99U
 
#define RTC_SYNCH_PREDIV   9U
 
#define RCC_RTCCLKSOURCE_1MHZ   ((uint32_t)((uint32_t)RCC_BDCR_RTCSEL | (uint32_t)((HSE_VALUE/1000000U) << 16U)))
 

Functions

void RTC_Alarm_IRQHandler (void)
 This function handles RTC ALARM interrupt request. More...
 
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
 This function configures the RTC_ALARMA as a time base source. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. More...
 
void HAL_SuspendTick (void)
 Suspend Tick increment. More...
 
void HAL_ResumeTick (void)
 Resume Tick increment. More...
 
void HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *hrtc)
 ALARM A Event Callback in non blocking mode. More...
 

Variables

RTC_HandleTypeDef hRTC_Handle
 

Detailed Description

HAL time base based on the hardware RTC_ALARM Template.

Author
MCD Application Team
Version
V1.1.0
Date
22-April-2016 This file override the native HAL time base functions (defined as weak) to use the RTC ALARM for time base generation:
  • Intializes the RTC peripheral to increment the seconds registers each 1ms
  • The alarm is configured to assert an interrupt when the RTC reaches 1ms
  • HAL_IncTick is called at each Alarm event and the time is reset to 00:00:00
  • HSE (default), LSE or LSI can be selected as RTC clock source
     ==============================================================================
                           ##### How to use this driver #####
     ==============================================================================
       [..]
       This file must be copied to the application folder and modified as follows:
       (#) Rename it to 'stm32f7xx_hal_timebase_rtc_alarm.c'
       (#) Add this file and the RTC HAL drivers to your project and uncomment
          HAL_RTC_MODULE_ENABLED define in stm32f7xx_hal_conf.h 
    
       [..]
       (@) HAL RTC alarm and HAL RTC wakeup drivers can’t be used with low power modes:
           The wake up capability of the RTC may be intrusive in case of prior low power mode
           configuration requiring different wake up sources.
           Application/Example behavior is no more guaranteed 
       (@) The stm32f7xx_hal_timebase_tim use is recommended for the Applications/Examples
             requiring low power modes
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.

Definition in file stm32f7xx_hal_timebase_rtc_alarm_template.c.