STSW-L9962FW
Proposal
Design Win
Software FW for L9962 evaluation board

Download databrief

Product overview

Description

The L9962 firmware driver stack (STSW-L9962FW) is a software package designed to provide a robust and portable interface to the L9962 battery management IC. It implements all device-specific logic required for cell monitoring, current sensing, balancing, diagnostics, and configuration via I2C, with STM32 HAL used as the reference platform.

The stack is composed of four main modules:

  • L9962 driver (L9962.c, L9962.h, L9962_regmap.h
  • L9962 interface (L9962_interface.c, L9962_interface.h)
  • L9962 HAL wrapper (L9962_HAL_wrapper.c, L9962_HAL_wrapper.h)
  • Utility macros (utils.h, utils.c) Contains essential macros for register and bitfield manipulation, used across driver and interface layers.
  • All features

    • Complete firmware driver stack for L9962 battery management IC
    • Layered architecture: L9962 driver (device logic) – L9962 interface (I2C + CRC + register access) – L9962 HAL wrapper (MCU abstraction layer) – Utility macros (bitfield/register helpers)
    • STM32 HAL–based reference implementation (portable to other MCUs)
    • Support for all main L9962 features: – Cell voltage monitoring (enable, filter, UV/OV thresholds, sum) – Battery voltage (VB) measurement and diagnostics – NTC temperature sensing and die temperature monitoring – Current measurement (instantaneous, overcurrent, short-circuit) – Coulomb counting (current accumulator) – Cell balancing (enable, thresholds, diagnostics) – Charge/discharge circuit breaker control (HS/LS modes) – Fuse deployment and status – Global diagnostics and event masks – NVM upload/download and upload counter – Device address, chip ID, FSM state (Shipment, Standby, Normal)
    • I2C communication with optional CRC checking • Ready-to-use example code and usage patterns