1. I cannot read data more than 8 bytes
2. if I use I2CFIFODataGet() that will hug up sometimes.
Is any one can help me to solve the program?
void I2C0_FIFO_Read(uint16_t u16Len)
{
I2CMasterBurstLengthSet(I2C5_BASE, u16Len);
I2CMasterSlaveAddrSet(I2C5_BASE, I2C_SLAVE_ADDR, 1);
I2CMasterControl(I2C5_BASE, I2C_MASTER_CMD_FIFO_BURST_RECEIVE_FINISH);
}
void I2C5Interrupt(void)
{
uint8_t i, au8Data[8];
for (i = 0 ; i < 8; ++i)
{
//au8Data[i]=I2CFIFODataGet(I2C5_BASE);
I2CFIFODataGetNonBlocking(I2C5_BASE, au8Data);
}
#if 0
g_u32FIFOReadLen+=8;
if(g_u32FIFOReadLen < g_u32FIFOReadTotal)
{
I2CMasterBurstLengthSet(I2C5_BASE, 8);
I2CMasterControl(I2C5_BASE, I2C_MASTER_CMD_FIFO_SINGLE_RECEIVE);
}
#endif
I2CMasterIntClear(I2C5_BASE);
}