Author Topic: BQ24257 ready state?  (Read 1501 times)

0 Members and 1 Guest are viewing this topic.

Offline rexxarTopic starter

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
BQ24257 ready state?
« on: September 12, 2014, 05:08:38 am »
Hi all, I'm using the BQ24257 Li-Ion charge controller in my project, but it's not working, and it's driving me crazy!

What's going on is that when I query the device over I2C for the charging status, it reports "ready". Thing is, the ready status isn't documented in any datasheet I can find. I seem to recall reading somewhere that "ready" means the device is powered up and waiting for a battery to be connected, but I don't remember where I saw that, and I can't find it again.

Weird thing is, I've gotten it to work a couple times. Last time it worked completely reliably, but once I uploaded some new code, it broke again. Of course it didn't work when I uploaded the old code... I did stick a logic analyzer on the I2C bus just to make sure my code isn't interpreting the data wrong, but that looks fine.

Anyone have any ideas?
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8413
Re: BQ24257 ready state?
« Reply #1 on: September 12, 2014, 12:29:27 pm »
What do the rest of the status registers say?

To me "ready" also means it's waiting to charge a battery.
 

Offline rexxarTopic starter

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
Re: BQ24257 ready state?
« Reply #2 on: September 14, 2014, 05:11:55 am »
Here's the registers as I've got them configured:

0
00100000
01111011
0
00000010
00101000
00011000
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8413
Re: BQ24257 ready state?
« Reply #3 on: September 14, 2014, 12:59:27 pm »
Register 3 says "Apple/TT or non-standard adaptor detected". What do you have it plugged into? Try setting bit 4 in register #5 to tell it to re-detect. If it still won't charge, set bit 3 of reg #7 to force a battery detection and check the status in reg #1.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf