SparkFun_BQ27441_Arduino_Library icon indicating copy to clipboard operation
SparkFun_BQ27441_Arduino_Library copied to clipboard

setSOC1Thresholds(SOCI_SET, SOCI_CLR) fail

Open Kabron287 opened this issue 4 years ago • 2 comments

Hi there! I arize the problem again. This problem still exists in both libraris: SparkFun_BQ27441_Arduino_Library and Battery_Babysitter To reproduce, just run BQ27441_GPOUT_BAT_LOW.ino You'll see that SOC1SetThreshold() funtion allways return 64(0x40).

I observe this on three bq27441 chips.

My uC ATSAMD51 in WIO Terminal.

Kabron287 avatar Apr 09 '21 07:04 Kabron287

Update Just test it with Arduino Pro Micro with the same result. SOC1SetThreshold() funtion allways return 64.

Kabron287 avatar Apr 09 '21 07:04 Kabron287

the datasheet indicates that 66us is needed between i2c transactions. On faster processors this does not seem to be met with this library.

add delayMicroseconds(66); before the return in i2cWriteBytes and i2cReadBytes.

that fixed the problem for me.

wystewart avatar Feb 10 '25 04:02 wystewart