2013-06-20 05:18 AM
I have found strange behavior of CPAL library when device is in slave mode. I use interrupt mode. When I'm waiting for read from master, I prepare data by:
if ((I2C2_DevStructure.CPAL_State == CPAL_STATE_READY) && (TransmitMode == STATE_OFF))
{
I2C2_DevStructure.wCPAL_Timeout = 500; //timeout 500ms
CPAL_I2C_Write(&I2C2_DevStructure);
}
during first read data by master all is fine, except that wNumData is one more less that
actually
read
. I have logic analyzer and I see that for example Master read 16 and from wNumDatait appears that
In the next frame the first byte is wrong. It looks like 17th byte from last frame. #cpal-i2c-stm32f0