hi guys,
I am trying to implement repeated start using msp430g2231 launchpad and I am using i2c for smbus 1.1 protocols.
I have to pass repeated start to the slave but I am not sure the right method.
I wrote,
void repeatedStart()
{
USISRL = 0xFF;
USICTL0 |= USIOE;
USICNT |= 0x01;
}
...////////////////////////////////////////////////////
in interrupt, I wrote,
case 6:
USICTL0 &= ~USIOE; // SDA = input
USICNT |= 0x01; // Bit counter = 1, receive (N)Ack bit
I2C_State = 8;
break;
case 8:
repeatedStart();
state = 10;
break;
case 10:
USICTL0 |= USIOE;
USISRL = 0x2D; // to slave address + 1 for read
USICNT |= 0x08; // Bit counter = 8, RX data
is this sequence correct and my repeatedStart() follow the correct steps?
Please help me and let me know!
Thank you,
Jeonggoo Song