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.

BQ76920: Disability to write in the registers through the I2C

Part Number: BQ76920

Hello everyone, 

I am working on a custom card with a BQ76920(03), I am trying to modify the register with my values but it doesn't work.

I use a Raspberry Pi4 connected to the I2C of my chip, I am able to read the values thanks to "i2cdump" command but I can't write in the register. I have a version of the component with CRC, so I used a website to calculate CRC. I want to write the date "0x8F" in the IC at the adress "0x08" in the register "0x06", so the website gave me:

I tried the command :

 

i2cset -y -r 1 0x08 0x06 0x8F 0x8B i

But I can read after that : 

Error : Write failed

Do you have any ideas for fixing it ?

Thanks

Lucas

  • So someone of my team just found the solution for the problem but I had already written the question and maybe it can help someone else. 

    You have to modify your adress when you calculate the CRC, 0x08 << 1 ==> 0x10 and now it works.

    For example:

    I used the @ 0x10 to calculate my CRC and not 0x08 and it worked

    i2cset -y 1 0x08 0x06 0x8F 0x78 i

    Lucas