|
I found that I2C bus violation case when continuously calling of CyU3PI2cTransmitBytes()
with small interval.
I attached a waveform in fatal case.
But the phenomenon is not stable (sometimes another waveform appears),
I think it depends on access pattern, timing, etc.
Inserting a large delay after transmit prevents this problem, but I don't know the best number of duration.
Attached waveform appeared in these sequence:
(1) call CyU3PTransmitBytes() with two data bytes.
Slave address and first data byte are stored in the preamble.
(length of preamble is 2, byteCount argument is 1)
This calling returns success (but, at last byte, slave device sends NAK).
(2) wait 16 us with CyU3PBusyWait().
(3) transmit two dara bytes, such as (1).
|