How vamoirid/battery-management-system-stm32-software works
This repository contains STM32 master firmware for two battery-monitoring designs: one using LTC6811 and one using LTC6803, as documented in the README. The principal workflow is firmware initialization, communicating with the monitor ICs over SPI, and processing measurements and BMS state. The excerpts show the LTC6811 application’s temperature conversion and over-temperature checks, and the LTC6803 application’s configuration and conversion loop. Driver internals and some application logic are only partially sampled, so uncertain links are omitted.
Main entry points: Src/main.c LTC6811 firmware · LT_SPI.c SPI transport · stm32f4xx_hal.h STM32 HAL · Src/main.c LTC6803 firmware
Components 13
BMS applications
- LTC6811 firmware
BMS_Code/Src/main.c - LTC6803 firmware
BMS_LTC6803/Src/main.c - Measurement and state logic
BMS_Code/Src/main.c
Monitor IC drivers
- LTC681x protocol
BMS_Code/Src/LTC681x.c - LTC6811 interface
BMS_Code/Inc/LTC6811.h - LTC6803 protocol
BMS_LTC6803/LTC6803_src/LTC6803.c
STM32 hardware access
- SPI transport
BMS_Code/Src/LT_SPI.c - STM32 HAL
BMS_Code/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h - HAL configuration
BMS_Code/Inc/stm32f4xx_hal_conf.h
Other components
- Battery system
- STM32F446RE
- LTC6811 monitor
- LTC6803 monitor
Connections 17
- Battery system → LTC6811 firmware: runs firmware
- Battery system → LTC6803 firmware: runs firmware
- LTC6811 firmware → LTC681x protocol: uses protocol
BMS_Code/Src/main.c - LTC6811 firmware → LTC6811 interface: uses interface
BMS_Code/Src/main.c - LTC6811 firmware → SPI transport: uses SPI
BMS_Code/Src/main.c - LTC6811 firmware → Measurement and state logic: processes readings
BMS_Code/Src/main.c - LTC681x protocol → LTC6811 interface: implements API
BMS_Code/Src/LTC681x.c - LTC6803 firmware → LTC6803 protocol: calls driver
BMS_LTC6803/Src/main.c - LTC6803 firmware → SPI transport: uses SPI
BMS_LTC6803/Src/main.c - LTC6803 protocol → SPI transport: uses transport
BMS_LTC6803/LTC6803_src/LTC6803.c - LTC6811 firmware → STM32 HAL: initializes peripherals
BMS_Code/Src/main.c - LTC6803 firmware → STM32 HAL: initializes MCU
BMS_LTC6803/Src/main.c - SPI transport → STM32 HAL: uses HAL
- HAL configuration → STM32 HAL: configures
BMS_Code/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h - STM32 HAL → STM32F446RE: controls peripherals
- SPI transport → LTC6811 monitor: communicates
- SPI transport → LTC6803 monitor: communicates