Tool/software:
We are using the S32K144 processor to communicate with the BQ76952 over SPI. We read the CC2 current every 10ms and have noticed that randomly the received data appears to be corrupted/wrong.
With the battery idle, we expect the current to be 0A +- a few mA. This is indeed what we read most of the time shown by the SPI logs below:
(note, 0x55 is the transmitted dummy value)
1. CC2 measurement 0A
MOSI | MISO |
3A 55 D7 | 3B 00 6E |
3A 55 D7 | 3A 00 7B |
3B 55 C2 | 3A 00 7B |
3B 55 C2 | 3B 00 6E |
2. CC2 measurement -1mA
MOSI | MISO |
3A 55 D7 | 3B FF 9D |
3A 55 D7 | 3A FF 88 |
3B 55 C2 | 3A FF 88 |
3B 55 C2 | 3B FF 9D |
3. CC2 measurement 1mA
MOSI | MISO |
3A 55 D7 | 3B 00 6E |
3A 55 D7 | 3A 01 7C |
3B 55 C2 | 3A 01 7C |
3B 55 C2 | 3B 00 6E |
Occasionally however, the received data is 0xFF00 or 0x00FF as shown below:
1. CC2 measurement -2.56A
MOSI | MISO |
3A 55 D7 | 3B 00 6E |
3A 55 D7 | 3A 00 7B |
3B 55 C2 | FF FF 00 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | 3B FF 9D |
2. CC2 measurement 2.55A
MOSI | MISO |
3A 55 D7 | 3B FF 9D |
3A 55 D7 | 3A FF 88 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | FF FF 00 |
3B 55 C2 | 3B 00 6E |
These measurement glitches appear for a single measurement at a time and occur randomly. It seems almost as if the read request comes whilst the CC2 registers are being updated causing incomplete data being returned. Do you have any advice on how to avoid this issue?