Quantcast
Viewing all articles
Browse latest Browse all 35901

Problem calibrating the bq27425-g2: fails on checksum verification

Hello,

I am trying to calibrate my bq27425-g2 (connected through i2c line to my controller) using the attached file.

It seems there is a problem with the time it takes to write the data to the chip.

I will explain.(Please visit the site to view this file)

The file is a sequence of those:

-       Select a class

-       Write 32 bytes

-       Write checksum of the 32 bytes (actually complement to FF of the checksum).

-       Wait 200 msec (during this time, if the checksum above is correct, the data is copied to non-volatile memory)

-       Select same class as before

-       Read checksum, ensure it is same as we wrote before.

 

Most of the sequences cannot read correct checksum. I will give an example

W: AA 3E 24 00

W: AA 40 00 19 28 63 5F 64 62 00 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

W: AA 60 04

X: 200

W: AA 3E 24 00

C: AA 60 04

This fails on checksum verification.

However when I change the sequence timeout from 200msec to 5000msec:

W: AA 3E 24 00

W: AA 40 00 19 28 63 5F 64 62 00 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

W: AA 60 04

X: 5000

W: AA 3E 24 00

C: AA 60 04

Then the sequence is OK, checksum is read correctly.

 

The workaround did not work with the following sequence:

W: AA 3E 69 00

W: AA 40 80 4A 38 29 0B C2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

W: AA 60 07

X: 200

W: AA 3E 69 00

C: AA 60 07

So, even when I changed the 200msec to 5000msec in this one, it failed.

By the way, the checksum is OK, the calculation is (taking the last 8 bits of the sum): FF-(80+4A+38+29… etc) = 07

 

The rest of the sequences were OK after changing to 5000. I tried to put 1000 msec instead; it did not help on any of them.

 

Any idea?

 

Thanks in advance,

GBL


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>