I am working with MSP430F5340 controller interfacing with RRC1120 battery which has a BQ27545G1.
I am doing the following steps successfully,
1. Sending start condition
2. Sending address.
3. Sending write bit
4. Sending command
5. Sending start condition
6. Sending READ bit.
after these steps I could able to receive 1 byte of data successfully. But could not able to read one more data byte as it hangs on while((UCB1IFG & UCRXIFG)==0); this while loop.
My I2C configurations are as follows,
P4SEL |= 0x06;
// SMCLK, Software reset enable
UCB1CTL1 |= UCSSEL_2 | UCSWRST;
// Master mode, I2C mode, Synchronous mode, Address slave with 10-bit
UCB1CTL0 = UCMST | UCMODE_3 | UCSYNC;// | UCSLA10;
// Baud rate: SMCLK(12MHz)/(400Khz)=30=0x1E
UCB1BR0 = 0x1E;
UCB1BR1 = 0x00;
// Slave address
UCB1I2CSA = 0x55;
// Clear SW reset, to enable operation
UCB1CTL1 &= ~UCSWRST;
Please help me to come out of this issue as it hangs here .
Thanks in advance.