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.

BQ76952: BQ76952

Part Number: BQ76952

Hi All,

I believe I have a race condition when reading the CC2 current. We are using interrupt driven SPI communications to communicate with the BQ device. Since we can only read 1 byte at a time, I believe we are having an error when reading the first byte and the second byte isn't ready, or the first byte hasn't updated and we read the second and it has been updated. When the FETs are open, we are seeing values such as 0xFF00, 0x00FF, 0xFFFB, 0x0006. The first two are incorrect while the second two are just low negative and positive numbers, respectfully. 

I have ensured in my software that I am doing an atomic read modify write, but we still see this issue persisting. 

My question is whether we can use the Alert pin to our advantage and only read when we know a measurement has fully completed. I see that the FULLSCAN bit in the alarm status register will be set when an ADC scan is complete, but does this include the current measurement? Also, do we need to clear this bit or does it clear automatically? 

What is the best way moving forward to read the CC2 current value to ensure the measurement cycle has completed and we aren't reading data that has been half updated.

Thank you!

Sincerely,

Kyle Garland