Hello,
I'm using a TMS320F28062 and I can succesfully send 4 bytes through I2C.
How can I send more than 4 bytes (for eg. 8 bytes), whithout a stop signal between them ?
The code for 4 bytes is the following:
if (!I2caRegs.I2CSTR.bit.BB) /* when the line is free */
{
I2caRegs.I2CFFTX.bit.TXFFRST=0;
I2caRegs.I2CFFTX.bit.TXFFRST=1;
for (i=0;i<4;i++)
{
I2caRegs.I2CDXR=(unsigned int)SndData[i]; /*FIFO*/
}
I2caRegs.I2CMDR.bit.MST=1; //set master mode
I2caRegs.I2CMDR.bit.TRX=1; //set transmit mode
I2caRegs.I2CCNT=4; //set 4 bytes
I2caRegs.I2CMDR.bit.STP=1; //set stop
I2caRegs.I2CMDR.bit.STT=1; //set start
}
If I want to send 8 bytes do I need to work in repeat mode ?
If yes, how do I modify the above source?
Thanks
Andrej