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.

BQ76930 CRC problem

Other Parts Discussed in Thread: BQ76940, MSP430G2553

Hello


I am using a BQ7693003DBTR. I am not able to write something so I suppose I have a CRC problem. With the logic analyzer I see this capture

I suggest the NACK is because the CRC does not work? Is that so or is my host hardware setup not correct?

I calculate the CRC with the code below. The CRC_KEY is 7 is that correct?


U8 CRC8(U8 *ptr, U8 len)
{
    U8 key = CRC_KEY;
    U8 i;
    U8 crc = 0;
    while(len-- != 0)
    {
        for(i = 0x80; i != 0; i /= 2)
        {
            if((crc & 0x80) != 0)
            {
                crc *= 2;
                crc ^= key;
            }
            else
                crc *= 2;
            if((*ptr & i) != 0)
                crc ^= key;
        }
        ptr++;
    }
    return(crc);
}

I hope somebody can give me some hints