L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
rtc.h
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file rtc.h
5 * @brief This file contains all the function prototypes for
6 * the rtc.c file
7 ******************************************************************************
8 * @attention
9 *
10 * Copyright (c) 2026 STMicroelectronics.
11 * All rights reserved.
12 *
13 * This software is licensed under terms that can be found in the LICENSE file
14 * in the root directory of this software component.
15 * If no LICENSE file comes with this software, it is provided AS-IS.
16 *
17 ******************************************************************************
18 */
19/* USER CODE END Header */
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef __RTC_H__
22#define __RTC_H__
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "main.h"
30
31/* USER CODE BEGIN Includes */
32
33/* USER CODE END Includes */
34
35extern RTC_HandleTypeDef hrtc;
36
37/* USER CODE BEGIN Private defines */
38
39/* USER CODE END Private defines */
40
41void MX_RTC_Init(void);
42
43/* USER CODE BEGIN Prototypes */
44
45/**
46 * @brief Configure the RTC periodic wakeup timer.
47 *
48 * Uses RTC_WAKEUPCLOCK_CK_SPRE_16BITS (1 Hz ck_spre derived from the RTC
49 * prescalers) so that the counter value directly represents seconds minus 1.
50 * The wakeup interrupt wakes the CPU from STOP / standby mode and triggers
51 * the next sensor measurement cycle.
52 *
53 * @note The actual wakeup period is determined by the counter value set in the
54 * implementation (currently ~60 s; original design was 600 s = 10 min).
55 * The function name is kept for backward compatibility.
56 *
57 * @return HAL_OK on success, HAL_ERROR if the timer could not be configured.
58 */
59HAL_StatusTypeDef RTC_SetWakeupTimer_10Minutes(void);
60
61/* USER CODE END Prototypes */
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* __RTC_H__ */
68
: Header for main.c file. This file contains the common defines of the application....
HAL_StatusTypeDef RTC_SetWakeupTimer_10Minutes(void)
Configure the RTC periodic wakeup timer.
Definition rtc.c:152
RTC_HandleTypeDef hrtc
Definition rtc.c:27
void MX_RTC_Init(void)
Definition rtc.c:30