Part Number: TMS320C6657
Hi,
I am trying to send multiple bytes from the I2C in Master Transmit mode.
For example txBuffer[3] = {0x00, 0x0A, 0x0F};
I followed the SDK where you first set the data transfer register (ICDXR) with the first byte (0x00) and then I do a for loop to fill the register with the remaining bytes.
However, on the first instance of the for loop, after I set the ICDXR with the second bytes (ICDXR = txBuffer[1]) I see that XMST is 0.
So on my scope, I see that the bytes that are getting transmitted is: 0x00, 0x0F, 0x0F.
How come I am seeing an underflow when I try to set my data transmit register to 0x0A.
Ex:
ICDXR = txBuffer[0]; // Set data register to first byte
ICMDR = START_BIT;
while(ICSTR->ICXRDY == 1)
{
for (int i = 1; i < 3; i++)
{
ICDXR = txBuffer[i]; // Fill with remaining bytes
// After this line, XMST is 0 when i = 1
}
}