This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ25887: Sometimes the A/D readings no longer update what is the reason

Part Number: BQ25887

We have been using the BQ25887 in our system for a year or so.  A new problem has cropped up:  sometimes the A/D readings from BQ25887 "freeze" and won't change regardless of what we do.   The basics are as follows:

- BQ25887 operating and powered with Vbus

- Remove the device being charged/monitored

- When a device is removed, we turn off the charger with the "EN_CHG" bit in "Charger Control 2".  We also have the "CD" pin pulled high.  

- Put in a new device to be charged/monitored.  

- We detect if a device is present or not using the BOT and TOP A/D values from the BQ25887

- We never remove Vbus

- A very small percentage of the time (< 1%) the BQ25887 seems to "freeze" and the A/D values no longer change, regardless of what value is on VBAT and VMID.

- Using a scope, I have decoded the I2C lines between the BQ25887 and our micro.  The attached spreadsheet shows the good and bad values.  Best I can tell, none of the configuration registers are different between a "Good" and a "Bad" read or in the "Bad" case, between a device not plugged in or plugged in.

So the question becomes - is there something obvious I am doing wrong or something I am missing.

Thanks!

BQ25887 not reading AD.xlsx 

  • I forgot to mention -

    - If we power cycle the BQ25887 with the device to charge removed, the problem goes away.

    - If we power cycle the BQ25887 with the device to charge still in place, the problem persists.

    Maybe that will help figure out what is going on.

    Ideally, we will be able to fix this problem without having to power cycle the BQ25887.  

    Thank you.

  • More information.  Here is the schematic on the BQ25887 circuit on our PCB.  The control lines (SDA ... STAT) on the lower left go to a micro.  The BAT and MID lines on the right go to a connector that our device to be charged can slide in and out of.


    ALSO.  . .  I had a system in the "bad A/D reading" state and I shorted "CD" to ground while the system was running.  The A/D values immediately started working again.  Maybe the answer is to just keep CD low.  However, that seems to not conform to the datasheet then:




  • Hi David,

    This is an odd issue.  If you toggle the ADC enable on and off or if you can change from one shot to continuous, does that fix the issue?   Also, how fast is your I2C bus trying to read the ADC?  Are you waiting for the ADC done bit (assuming continuous read)?  If you toggle EN_HiZ bit instead of using CD pin, does that fix the issue as well?

    I will try to recreate in the lab but with such a low failure rate, it may be difficult.  Can you summarize the steps, in the exact order (disable charge, remove battery, reattach battery, read ADC, etc.) including battery voltage(s), when this occurs? 

    Regards,

    Jeff

  • Paul - 

    Thanks for your response.  Answers below.

    If you toggle the ADC enable on and off  . . . . <SNIP> . . . . If you toggle EN_HiZ bit instead of using CD pin, does that fix the issue as well?

    Unfortunately, I have not been able to recreate the issue when I had an emulator running with the micro controlling the BQ25887.  If I am able to recreate it with an emulator running I will try both of these.

    or if you can change from one shot to continuous, does that fix the issue?   

    I have not tried this, but it seems unlikely - I am running in continuous mode.  As the previously attached spreadsheet shows, the ADC control register is set to 0xB0 which has bit 6 low which is a continuous conversion.

    Also, how fast is your I2C bus trying to read the ADC? 

    Once every 50ms with a 200kHz clock rate

    Are you waiting for the ADC done bit (assuming continuous read)?  

    No.  However, I would assume a 50ms sample rate would give enough time for the ADC conversions.  I can't find a conversion rate time in the datasheet - maybe I am missing it.

    In addition, the datasheet mentions an ADC_DONE_FLAG bit, but states it does not work in Continuous mode, and for the bq25887 that bit does not appear to be defined in the register set

    I will try to recreate in the lab but with such a low failure rate, it may be difficult. 

    Exactly.  It is pretty frustrating.

    Can you summarize the steps, in the exact order (disable charge, remove battery, reattach battery, read ADC, etc.) including battery voltage(s), when this occurs? 


    The steps are:

    - Charge Enabled

    - Pull a devices from a running/charging bq25887

    - Micro sees a device is gone and disables the bq25887 by setting Control_Register2.EN_CHG low AND setting the hardware I/O CD high.

    - Some very small percentage of the time the bq25887 "locks up" and the A/Ds no longer reads/updates the ADC of the battery inputs.

    I understand that I don't have a full detailed list there - however, I have only been able to recreate it twice in the lab - so I don't have a good, methodical way to do this.  I had hoped it was an obvious, "oh we have seen this before, you are doing XYZ."  Unfortunately, that does not appear to be the case.

    It SEEMS like the answer is in this part of the datasheet, but I can't figure out why it is applying to our systems . . . 

     

     

    FURTHER INFO


    Here is one more piece of information that may help.  When a device is seen as absent, as a test I shorted CD to ground and the A/D started to work.  So I modified the FW so that when disabling the charger, instead of setting CD high, I left it low (thereby only turning the charger off with the EN_CHG bit).  Since then, I have not been able to recreate the problem and have done 1000s of the process I detailed above.  Unfortunately, I am running into the "absence of evidence is not evidence of absence" problem - I don't have a definitive cause so I don't have a definitive solution.  

    Thanks for your help.

     

     

     

  • Hi David,

    I tested on EVM on the bench and, not surprisingly, was not no able to recreate the problem.  I suspect the issue is related to the datasheet statement below:

    If the charger changes mode (for example, if adapter is connected, EN_HIZ goes to '1', or CD goes high,) while an ADC conversion is running, the conversion is interrupted. Once the mode change is complete, the ADC resumes conversion, starting with the channel where it was interrupted.

    I suspect you are pulling CD high at some point during a conversion and the ADC is not resuming after interruption. 

    Since the issue is related to the CD pin, if you don't use CD pin to enter HiZ, I think you will be okay.

    If you still want to use CD pin, I recommend changing to one shot and using ADC complete bit to trigger ADC read instead of continuous.

    Regards,

    Jeff 

  • OK.  Thanks for checking.  We will just forego HiZ mode.