8051-mcu-debug
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures
Use when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA faults, and SOC jumps
$ npx -y skills add easyzoom/aix-skills --skill battery-charger-fuel-gauge-integration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/battery-charger-fuel-gauge-integrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA faults, and SOC jumps
name: battery-charger-fuel-gauge-integration description: Use when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA faults, and SOC jumps
Use this skill to bring up a Li-ion/LiPo charger IC (TI `BQ24xxx`/`BQ25xxx`) and a fuel gauge (TI `BQ27xxx` Impedance Track, or Maxim/Analog `MAX1704x` ModelGauge, e.g. `MAX17048`) over I2C. The hard parts are keeping the charger in host mode past its watchdog, and getting an accurate SOC before the gauge has a matching battery profile.
Use this skill when:
Do not use this skill when the I2C bus itself is dead (no ACK on any address) or the board rails are wrong; debug the bus and power tree first with `hardware-interface-debug`.
Ask for:
1. Confirm the device on the bus. ACK the charger and gauge 7-bit addresses; read a known register (charger `REG0A` Vendor/Part/Revision, or gauge `Control()` `DEVICE_TYPE` subcommand) before writing anything.
1. Take and hold host mode on the charger. Set `IINLIM` in `REG00[2:0]`, clear `EN_HIZ` (`REG00[7]`), enable charging via `CE`/`CHG_CONFIG` (`REG01[4]`), then feed the I2C watchdog (write `REG01[6]`) on a timer, or disable it (`WATCHDOG` = `REG05[5:4]` = 00), so registers do not reset to default and drop charging.
1. Configure charge parameters and protection. Program fast-charge current (`ICHG`, `REG02`), pre-charge/termination current (`REG03`), charge voltage (`VREG`, `REG04`), and enable NTC/JEITA limits; confirm the thermistor scaling (e.g. `103AT`) on the `TS` pin.
1. Load the fuel gauge battery profile. For `BQ27441`: `UNSEAL` via `Control()`, enter `CFGUPDATE`, poll `Flags()` until bit 4 is set, write `Design Capacity`/`Design Energy`/`Terminate Voltage`/`Taper Rate` in the data-memory block, fix `BlockDataChecksum` (`255 - x`, where `x` is the byte-wise sum of the block), then `SOFT_RESET`. For `MAX17048`: load a custom model / set `RCOMP0` (`CONFIG` default `0x97`) or accept EZ defaults.
1. Calibrate SOC at first power-up. Let the pack rest for a valid OCV read, then issue `MAX17048` `QuickStart` (`MODE` = `0x4000`) or check `BQ27441` `Flags()` `ITPOR` cleared; do not `QuickStart` under load.
1. Run temperature compensation and status polling. Update `MAX17048` `RCOMP` from measured temperature at least once/minute; on `BQ27441` feed `Temperature()` if host-reported. Poll charger `CHRG_STAT` (`REG08[5:4]`) and read `REG09` twice to get fresh faults (it latches, clears on read).
Before claiming charging and gauging work:
User:
BQ24295 一充电就每隔几十秒重启,SOC 还老是乱跳,怎么查?
Agent:
1. Asks for I2C address, adapter/`IINLIM` setting, whether the watchdog is fed, NTC network, and whether a `BQ27441` profile was loaded. 1. Reads `REG00`/`REG08`/`REG09`; if registers reverted to defaults, enables watchdog feeding (write `REG01[6]`) or disables `WATCHDOG` to hold host mode. 1. Checks the gauge: `UNSEAL`, verifies `Design Capacity` and `BlockDataChecksum`, clears `ITPOR`, then `QuickStart`/rest-OCV calibrates SOC and re-tests across a charge cycle.
AIX Skills is a public collection of Agent Skills, templates, and references for building repeatable AI workflows.
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures
Use when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers, middleware, or application…
Use when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications, pairing, connection parameters,…
Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image validation, rollback, or boot…
Use when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing, filters, or embedded automotive…
Use when integrating, configuring, or debugging CANopen nodes, object dictionaries, NMT, SDO, PDO, heartbeat, SYNC, EMCY, EDS/DCF files, or CANopenNode-style…