Other Parts Discussed in Thread: BQ27426
Hi everyone,
My customer works with BQ27426EVM-738 and faced with a problem.
They are not able to go into device configuration mode. Bit FLAG_CFGUPMODE (1<<4) is not set in CONTROL_STATUS (0x00) register.
They do the following:
- Check blocking status STATUS_SS (1<<13) in CONTROL_STATUS (0x00) register.
- Bit is set → remove the bit by writing unseal key (0x8000).
- Check STATUS_SS again → it is removed then device is unlocked.
- Execute command to go into configuration mode CONTROL_SET_CFGUPDATE (0x0013).
- Wait 2-5 seconds for FLAG_CFGUPMODE (1<<4) in CONTROL_STATUS (0x00) register. The bit is not set!
- Then anyway device configuring goes ahead - device capacity is set.
- Then device capacity is read - incorrect value is returned. We can assume that mistake occurs due to problem in p.5
The customer uses library:
- https://github.com/deondavis/lib-BQ27421/blob/master/bq27421.c
- https://github.com/sparkfun/SparkFun_BQ27441_Arduino_Library
- https://github.com/torvalds/linux/blob/master/drivers/power/supply/bq27xxx_battery.c
Entry points in libraries for device configuration functions:
1. Line 185 - bq27421_i2c_control_write( BQ27421_CONTROL_SET_CFGUPDATE );
2. Line 330 - boolBQ27441::enterConfig(bool userControl)
BQ274xx devices seem similar from registers point of view due to the followings defines:
#define bq27411_regs bq27421_regs
#define bq27425_regs bq27421_regs
#define bq27426_regs bq27421_regs
#define bq27441_regs bq27421_regs
#define bq27621_regs bq27421_regs