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.

HDQ Data incorrect from bq34z100

Other Parts Discussed in Thread: BQ34Z100, MSP430F5308

Hi 

I have a problem with reading data from a bq34z100 using a MSP430F5308. I can read all registers fine, but randomly some will read back values that are quite incorrect (i.e. temperature would report back -117 deg C)

From what I can see, this is happening on all registers but not all the time, sometimes it is hours before it occurs.

Does anyone know of any problems with reading HDQ data over a long period of time?

Thanks in advance for the help

  • Hi Scott, welcome to the forums!

    HDQ can be a rather finicky interface, with data errors happening from time to time. I am not sure if there any official ways to alleviate the problem, but I've found that one of the simpler ways to get around the issue is to apply a bit of sanity-checking/validation of the received HDQ data; if it appears to be invalid, a simple re-read of the data should be enough to correct the error.

    Regards,

    Jason

  • Thanks Jason

    I thought that might be the case from looking at it. I have tried to filter out certain registers (my temperature register for example) but its quite difficult to filter bit orientated registers like BatteryStatus.

    How would you recommend sanity checking these registers as any bit could be set at any point in time? Would you just filter different combinations of known bits set?
  • When it comes to bit flags, you could try reading the same register twice and seeing if the data is consistent. Registers are generally updated once a second, and even if a flag changes at the exact moment that a re-read is being performed, another re-read should do the trick.

    For flag registers/commands like CONTROL_STATUS, it may not always be possible to do full sanity checking. In those cases, even checking for reserved bits being set to 1 can help in identifying problematic register reads.

    On that note, is there a particular reason that HDQ needs to be used? If I2C is an option for your application, then there is generally no real need to use HDQ for communication.