We currently have a problem with I2C slave transmitting more than 32bytes.
We are using interrupt mode, and the I2C_DATA reg to receive and transmit bytes.
According to the am335x datasheet, 21.3.14.4, to transmit more than fifo size, we need to enable the draining feature. But in the draining feature there’s no mention of the i2c slave mode write. There are mentioning of the fifo and XUDF or XDR interrupt.
Our current model is to waiting for XDR interrupt, and then read all the accumulated received bytes from the fifo, and then send the response back to the master by writing to the txfifo in the XDR interrupt directly. This works quite well when the response message is smaller than 32bytes.
When the reponse message is larger than 32bytes, we tried to enable the XUDF, and continue our send to the tx fifo. but it seems too late when the XUDF int came, and the message is not complete.
What would be the correct way to response send messages longer than 32bytes as I2C slave on AM3352