CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
adc_vbat_monitor.c File Reference
#include "obc_systems/adc_vbat_monitor.h"
#include "stm32l4xx_hal.h"
#include "stm32l4xx_hal_adc.h"
#include "main.h"
#include <stdint.h>
Include dependency graph for adc_vbat_monitor.c:

Functions

static double OBC_read_vbat_monitor_with_adc_mV ()
 Read the voltage reported by the ADC at the VBAT_MONITOR pin.
 
int16_t OBC_read_vbat_with_adc_mV ()
 Read the battery voltage using the ADC.
 

Function Documentation

◆ OBC_read_vbat_monitor_with_adc_mV()

static double OBC_read_vbat_monitor_with_adc_mV ( )
static

Read the voltage reported by the ADC at the VBAT_MONITOR pin.

Returns
The voltage in mV. -9999 if error.
Note
This does not apply the voltage divider factor. The voltage divider is 11:1, so the actual battery voltage is 11 times this value.
Here is the caller graph for this function:

◆ OBC_read_vbat_with_adc_mV()

int16_t OBC_read_vbat_with_adc_mV ( )

Read the battery voltage using the ADC.

Returns
The battery voltage in mV. -9999 if error.
Note
This applies the voltage divider factor (11:1) to the voltage read from the ADC.
Here is the call graph for this function:
Here is the caller graph for this function: