|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Initializes HW and SW system entities (not related to the radio). More...
#include <stdio.h>#include "platform.h"#include "sys_app.h"#include "adc_if.h"#include "stm32_seq.h"#include "stm32_systime.h"#include "stm32_lpm.h"#include "timer_if.h"#include "utilities_def.h"#include "sys_debug.h"#include "sys_sensors.h"Go to the source code of this file.
Macros | |
| #define | MAX_TS_SIZE (int) 16 |
| #define | LORAWAN_MAX_BAT 254 |
Functions | |
| static void | TimestampNow (uint8_t *buff, uint16_t *size) |
| Returns sec and msec based on the systime in use. | |
| static void | tiny_snprintf_like (char *buf, uint32_t maxsize, const char *strFormat,...) |
| it calls UTIL_ADV_TRACE_VSNPRINTF | |
| void | SystemApp_Init (void) |
| initialize the system (dbg pins, trace, mbmux, sys timer, LPM, ...) | |
| void | UTIL_SEQ_Idle (void) |
| redefines __weak function in stm32_seq.c such to enter low power | |
| uint8_t | GetBatteryLevel (void) |
| callback to get the battery level in % of full charge (254 full charge, 0 no charge) | |
| int16_t | GetTemperatureLevel (void) |
| callback to get the current temperature in the MCU | |
| void | GetUniqueId (uint8_t *id) |
| callback to get the board 64 bits unique ID | |
| void | GetDevAddr (uint32_t *devAddr) |
| callback to get the board 32 bits unique ID (LSB) | |
| void | UTIL_ADV_TRACE_PreSendHook (void) |
| void | UTIL_ADV_TRACE_PostSendHook (void) |
| HAL_StatusTypeDef | HAL_InitTick (uint32_t TickPriority) |
| uint32_t | HAL_GetTick (void) |
| void | HAL_Delay (__IO uint32_t Delay) |
Variables | |
| static uint8_t | SYS_TimerInitialisedFlag = 0 |
Initializes HW and SW system entities (not related to the radio).
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 sys_app.c.
| #define LORAWAN_MAX_BAT 254 |
Defines the maximum battery level
Definition at line 54 of file sys_app.c.
Referenced by GetBatteryLevel().
| #define MAX_TS_SIZE (int) 16 |
Definition at line 49 of file sys_app.c.
Referenced by TimestampNow().
| uint8_t GetBatteryLevel | ( | void | ) |
callback to get the battery level in % of full charge (254 full charge, 0 no charge)
| battery | level |
Definition at line 152 of file sys_app.c.
References LORAWAN_MAX_BAT, SYS_GetBatteryLevel(), VDD_BAT, and VDD_MIN.
Referenced by mems_WriteToSystemParams(), and sensors_CayennelFromBckData().
| void GetDevAddr | ( | uint32_t * | devAddr | ) |
callback to get the board 32 bits unique ID (LSB)
| devAddr | Device Address |
Definition at line 239 of file sys_app.c.
Referenced by systemParams_getAppDevEUI().
| int16_t GetTemperatureLevel | ( | void | ) |
callback to get the current temperature in the MCU
| temperature | level |
Definition at line 184 of file sys_app.c.
References EnvSensors_Read(), and sensor_t::temperature.
| void GetUniqueId | ( | uint8_t * | id | ) |
| void HAL_Delay | ( | __IO uint32_t | Delay | ) |
Definition at line 369 of file sys_app.c.
References TIMER_IF_DelayMs().
Referenced by Error_Handler(), I2C_IsDeviceReadyMT(), I2C_Scan(), main(), nfc_st25dv16kc_Init(), nfc_st25dv16kc_WriteEEPROM(), nfc_st25dv16kc_WriteGPO(), scd41_Init(), scd41_IsDataReady(), scd41_Read(), sps30_Init(), sps30_Off(), sps30_On(), and tmphm_sht45_Read().
| uint32_t HAL_GetTick | ( | void | ) |
Definition at line 337 of file sys_app.c.
References SYS_TimerInitialisedFlag, and TIMER_IF_GetTimerValue().
Referenced by main(), sensorsBase_StartTimerToOff(), sensorsBase_StopTimerToOff(), sleeper_IsElapsed(), and sleeper_Next().
| HAL_StatusTypeDef HAL_InitTick | ( | uint32_t | TickPriority | ) |
| void SystemApp_Init | ( | void | ) |
initialize the system (dbg pins, trace, mbmux, sys timer, LPM, ...)
Definition at line 90 of file sys_app.c.
References CFG_LPM_APPLI_Id, DBG_Init(), EnvSensors_Init(), SYS_InitMeasurement(), SYS_TimerInitialisedFlag, TimestampNow(), and VERBOSE_LEVEL.
Referenced by main(), and MX_LoRaWAN_Init().
|
static |
Returns sec and msec based on the systime in use.
| buff | to update with timestamp |
| size | of updated buffer |
Definition at line 262 of file sys_app.c.
References MAX_TS_SIZE, and tiny_snprintf_like().
Referenced by SystemApp_Init().
|
static |
it calls UTIL_ADV_TRACE_VSNPRINTF
Definition at line 299 of file sys_app.c.
References UTIL_ADV_TRACE_VSNPRINTF.
Referenced by TimestampNow().
| void UTIL_ADV_TRACE_PostSendHook | ( | void | ) |
Definition at line 287 of file sys_app.c.
References CFG_LPM_UART_TX_Id.
| void UTIL_ADV_TRACE_PreSendHook | ( | void | ) |
Definition at line 276 of file sys_app.c.
References CFG_LPM_UART_TX_Id.
| void UTIL_SEQ_Idle | ( | void | ) |
|
static |
Definition at line 66 of file sys_app.c.
Referenced by HAL_GetTick(), and SystemApp_Init().