|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Read status related to the chip (battery level, VREF, chip temperature). More...
Go to the source code of this file.
Macros | |
| #define | TEMPSENSOR_TYP_CAL1_V (( int32_t) 760) |
| #define | TEMPSENSOR_TYP_AVGSLOPE (( int32_t) 2500) |
Functions | |
| static uint32_t | ADC_ReadChannels (uint32_t channel) |
| This function reads the ADC channel. | |
| void | SYS_InitMeasurement (void) |
| Initializes the ADC input. | |
| void | SYS_DeInitMeasurement (void) |
| DeInitializes the ADC. | |
| int16_t | SYS_GetTemperatureLevel (void) |
| Get the current temperature. | |
| uint16_t | SYS_GetBatteryLevel (void) |
| Get the current battery level. | |
Variables | |
| ADC_HandleTypeDef | hadc |
| ADC handle. | |
Read status related to the chip (battery level, VREF, chip temperature).
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 adc_if.c.
| #define TEMPSENSOR_TYP_AVGSLOPE (( int32_t) 2500) |
Internal temperature sensor, parameter Avg_Slope (unit: uV/DegCelsius). Refer to device datasheet for min/typ/max values.
Definition at line 45 of file adc_if.c.
Referenced by SYS_GetTemperatureLevel().
| #define TEMPSENSOR_TYP_CAL1_V (( int32_t) 760) |
Internal temperature sensor, parameter V30 (unit: mV). Refer to device datasheet for min/typ/max values.
Definition at line 44 of file adc_if.c.
Referenced by SYS_GetTemperatureLevel().
|
static |
This function reads the ADC channel.
| channel | channel number to read |
Wait for end of conversion
Wait for end of conversion
Definition at line 181 of file adc_if.c.
References Error_Handler(), hadc, and MX_ADC_Init().
Referenced by SYS_GetBatteryLevel(), and SYS_GetTemperatureLevel().
| uint16_t SYS_GetBatteryLevel | ( | void | ) |
Get the current battery level.
Definition at line 139 of file adc_if.c.
References ADC_ReadChannels().
Referenced by GetBatteryLevel(), mems_WriteToSystemParams(), and SYS_GetTemperatureLevel().
| int16_t SYS_GetTemperatureLevel | ( | void | ) |
Get the current temperature.
< Internal temperature sensor, parameter Avg_Slope (unit: uV/DegCelsius). Refer to device datasheet for min/typ/max values.
< Internal temperature sensor, parameter V30 (unit: mV). Refer to device datasheet for min/typ/max values.
Definition at line 97 of file adc_if.c.
References ADC_ReadChannels(), SYS_GetBatteryLevel(), TEMPSENSOR_TYP_AVGSLOPE, and TEMPSENSOR_TYP_CAL1_V.
Referenced by EnvSensors_Read().
| void SYS_InitMeasurement | ( | void | ) |
Initializes the ADC input.
Definition at line 79 of file adc_if.c.
References hadc.
Referenced by SystemApp_Init().