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.

BQ76920EVM: Problem with I2C sample code : bq769x0_I2C_sample_code_with_CRC

Part Number: BQ76920EVM
Other Parts Discussed in Thread: BQ76920, , MSP430G2553, EV2400, BQ769200

Dear All,

I am working on a BMS solution based on BQ76920 AFE with MSP430G2553 uC. Trying to evaluate & initialize BQ76920EVM with MSP430G2553 launchpad. I have followed SLVA626B app note & hardware connection. Facing issues in establishing I2C communication. Code is getting stuck at I2CSendBytes function & everytime returns -1. Code is attached. Pls notice that I2CReadBytes function code is not working as per below mentioned I2C read protocol diagram.

  sluc583 (3).zip

while(DelayCounter < DELAY_LIMIT && (!(IFG2 & UCB0TXIFG) || (UCB0CTL1 & UCTXSTT))) //check if the byte has been sent
{
      DelayCounter++;
}

if (DelayCounter >= DELAY_LIMIT) //check if NACK condition occurred
{
     *SentByte = NumberOfBytesSent;
      UCB0CTL1 |= UCTXSTP; //send stop condition
      return -1;
}

I2C is working well with EV2400 & i am able to debug& view Registers using GUI with same hardware setup. So, it eliminates hardware's issues. 

Any suggestion will be highly appreciated. Pls share sample I2C code if anyone has success with MSP430G2553 & BQ769x0 communication using I2C. 

Thanks

Best Regards,

Amit Deswal

  • Hi Amit,
    I'm not sure how helpful I can be since the EV2400 talks to the part.
    The EV2400 does have pull up resistors while the MSP430 may not. Be sure to check if they are provided on the MSP430 board or if the shunts are needed on the bq76920EVM. Also check the voltage tolerance of the MSP430 inputs, the EVM is a 2.5V part and will have 2.5V pull ups. If the MSP430 has higher voltage pull ups on its side may be desired.
    Check the addressing. The diagram included from the apnote shows the 7 bit address, this is multiplied by 2 when it appears on the bus.
    Check the bus with a scope on the bq76920EVM. This lets you see the signal level, edge quality and clock speed. You should see the 7 bit address 0x08 appear on the bus as 0x10, and an ACK from the bq76920. The following bytes should also ACK. Comparison captures between the MSP430 and the EV2400 may be helpful. Generally the EV2400 will be slower, it does not run the bus at maximum speed.
    Correct any issues found with the interconnect or pull-ups. If the clock is too fast adjust with the MSP430 settings. The apnote developer had the code working for test, so it should work. If there are questions on setup of the MSP430 or the I2C peripheral, the MSP430 forum experts should be more help.
  • Hi WM,

    Thanks for your prompt support. It did helped me to resolve I2C comm issue. Example written by TI is for CRC option of BQ devices and i am working on BQ769200 which is a CRC disabled device so i have to modify the example code to make it work.

    Warm regards,
    Amit Deswal