This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
This problem has been previously mentioned, but not totoally answered my confusion.
In this demo, the varible "temp" is combined as
And further, the "temp" is sent out by the following operation:
for(i=I2C_Params->NumOfAddrBytes-1;i>=0;i--)
{
I2C_putData(base, (temp >> (i*8U)) & 0xFF);
}
However, in this demo, the I2C_Params->NumOfAddrBytes is 2.
Hence, there are totally twice cycle operations:
first time the "temp" is right shifed with 8 bits, and the "High 8bits" are sent out.
Second time, "temp" is right shifted with 0 bit, and the "low 8bits" are sent out.
As for the “NumOfDataBytes”, there is totally no operation on it.
I don't know where is wrong.
Another concern is that the datas are sent out and further the transmit FIFO Interrupt is triggered.
But the FIFO level for transmit and receive are 0 and 2.
I2C_setFIFOInterruptLevel(I2CA_BASE, I2C_FIFO_TXEMPTY, I2C_FIFO_RX2);
How to understand the 0 transmit FIFO level? In handbook, it is said that "The transmit FIFO can be configured to generate an interrupt after
transmitting a defined number of bytes". Here the defined unmber of bytes is 0?
Hi,
Will take a look and get back to you in a couple of days.
Best Regards
Siddharth
Hi,
Sorry for the delay in responding .
The address bytes are sent out using the temp varialbe .
I am not sure what you mean by the NumOfDataBytes is zero. In the demo , NumOfDataBytes is not to zero anywhere. Pls clarify.
Best Regards
Siddharth