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.
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