|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
This file contains all the function prototypes for the rtc.c file. More...
#include "main.h"Go to the source code of this file.
Functions | |
| void | MX_RTC_Init (void) |
| Initialise the RTC peripheral with settings generated by STM32CubeMX. Configures the prescalers, calendar format, and wakeup clock source. Called once from main(); subsequent wakeup timers are set with RTC_SetWakeupTimer_10Minutes(). | |
| HAL_StatusTypeDef | RTC_SetWakeupTimer_10Minutes (void) |
| Configure the RTC periodic wakeup timer. | |
Variables | |
| RTC_HandleTypeDef | hrtc |
This file contains all the function prototypes for the rtc.c file.
Copyright (c) 2026 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file rtc.h.
| void MX_RTC_Init | ( | void | ) |
Initialise the RTC peripheral with settings generated by STM32CubeMX. Configures the prescalers, calendar format, and wakeup clock source. Called once from main(); subsequent wakeup timers are set with RTC_SetWakeupTimer_10Minutes().
Initialize RTC Only
Initialize RTC and set the Time and Date
Enable the Alarm A
Definition at line 30 of file rtc.c.
References Error_Handler(), hrtc, and RTC_PREDIV_A.
Referenced by main(), and TIMER_IF_Init().
| HAL_StatusTypeDef RTC_SetWakeupTimer_10Minutes | ( | void | ) |
Configure the RTC periodic wakeup timer.
Uses RTC_WAKEUPCLOCK_CK_SPRE_16BITS (1 Hz ck_spre derived from the RTC prescalers) so that the counter value directly represents seconds minus 1. The wakeup interrupt wakes the CPU from STOP / standby mode and triggers the next sensor measurement cycle.
Configure the RTC periodic wakeup timer.
Calculation for 10 minutes (600 seconds):
Definition at line 152 of file rtc.c.
References hrtc.
|
extern |
Definition at line 27 of file rtc.c.
Referenced by getBackUpRegister(), HAL_RTC_AlarmAEventCallback(), HAL_RTCEx_SSRUEventCallback(), MX_RTC_Init(), PWR_EnterOffMode(), RTC_Alarm_IRQHandler(), RTC_SetWakeupTimer_10Minutes(), setBackUpRegister(), TIMER_IF_BkUp_Read_MSBticks(), TIMER_IF_BkUp_Read_Seconds(), TIMER_IF_BkUp_Read_SubSeconds(), TIMER_IF_BkUp_Write_MSBticks(), TIMER_IF_BkUp_Write_Seconds(), TIMER_IF_BkUp_Write_SubSeconds(), TIMER_IF_Init(), TIMER_IF_StartTimer(), and TIMER_IF_StopTimer().