Analog Thread¶
The analog thread is responsible for sampling analog sensors:
measuring voltages:
VBAT: battery voltageVPACK: pack's output voltageVKEY: key voltageVDD: stm32 supply voltageVREF: internal reference voltage
measuring currents:
VI_SLOW: slow analog channel for the battery current measurementsIHS_ADC: current monitoring from the hot swap controllerI5V_ADC: current consumption in the 5v supply net
measuring temperatures interfaced through the external multiplexer:
T1: cell temperature measurementT2: cell temperature measurementT3: cell temperature measurementT4: temperature measurement near to shunt resistor on the bms boardT5: temperature measurement near to the negative cell terminal on the bms boardT6: temperature measurement near to the positive cell terminal on the bms boardT7: temperature measurement near to hot swap controller on the bms board- stm32 core temperature
Dependencies¶
Ensure the necessary nodes are defined for the ADC, multiplexer, and sensor devices in the devicetree before using the module.
The devicetree must be configured to include the following nodes. As an example, take a look at the
bms.dts file.
zephyr-user/io-channels: Defines ADC channels configured on the BMS hardware.adc1,adc2,adc3: Enables channel specific configurations and properties.tmux_1208: Defines the GPIO phandle array for the multiplexer.
Differences of TMUX1208 and TMUX1108: 1108 is an upgrade (more expensive, full compatible) TI-Link