How binani-tech/bms-module works
Main System Components
a) Hardware Layer (Bottom Level):
• STM32L431RC Microcontroller
• ISL78600 Analog Front End
• External Components (ADC, I2C, SPI peripherals)
b) Driver Layer (Lower Middle):
• HAL Drivers (STM32L4xx_HAL)
• Custom Drivers (in SPARK_BMS/DRIVER):
• ADC, CAN, DMA, GPIO, I2C, SPI, UART
c) Module Layer (Upper Middle):
• AFE Interface
• Battery Management
• Communication Protocols
• Storage (SD Card, EEPROM)
d) Application Layer (Top Level):
• Balancing
• Fault Monitoring
• State of Charge
• System Configuration
Component Relationships
• Data flow between layers
• Control signals
• Communication protocols
• Interrupt paths
Specific Features to Highlight
a) Safety Systems:
• Fault monitoring
• Short circuit protection
• Watchdog timers
• With red highlights or borders
b) Communication Interfaces:
• CAN bus
• UART
• I2C
• SPI
• Use different line styles for each protocol
c) Storage Systems:
• FATFS
• SD Card interface
• EEPROM
Key Design Elements
• Battery Management (balancing, monitoring)
• Communication (CAN, UART)
• Protection (fault handling)
• Data Storage (SD card, EEPROM)
• System Control (RTC, timers)
Additional Details
Callouts for:
• Voltage/current monitoring paths
• Cell balancing control
• Fault detection paths
• External communication interfaces
System States
• Initialization
• Normal operation
• Fault handling
• Sleep/low power modes
Remember to add version information and any relevant notes about critical timing or safety requirements.
This will provide a comprehensive view of the BMS architecture while maintaining clarity and showing the relationships between all major components.