- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use the I2C bus to write the image sensor device, but sometimes the returned message of CyU3PI2cTransmitBytes() is CY_U3P_ERROR_LOST_ARBITRATION. I have checked the I2C waveform with logic analyzer and the waveform looks good. I also checked the data of sensor register and it is correct.
Could anyone tell me what will cause this error ?
Thank you in advance.
Note:
Error Rate: 2~5 times of total 255 commands
I2C bit rate: occur in any bit rate.
Device amount: 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arbitration is the process to solve the problem when two devices try to access the bus at the same time. If you have more than one master on the bus this may happen quite normally, one master will get the bus and the other will show up a lost arbitration.
An conflict needing arbitration is detected when the dataline should be High but the master sees a logical Low-level.
When there is only one master there it may happen that the master loses arbitration with a slave which imho would mean that the slave is not fast enough to release the data-line (or that the master too soon starts another request).
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
Thanks for your detailed explanation. After I add some delays between two commands, this problem seems like fixed.
Thank you very much.
Allen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!!!! My first good deed for the day!
Bob