BusPirate / Bus_Pirate

Community driven firmware and hardware for Bus Pirate version 3 and 4
630 stars 131 forks source link

I2C ACK/NACK are delayed #18

Open agatti opened 8 years ago

agatti commented 8 years ago

From http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=8546 mentioned in #7:

hello, i have a big problem using i2c whit the buspirate. it seems there is a long delay after a start condition and any ACK/NACK. IT IS ALMOST 2mS long. and it is getting even longer when the baud rate of the buspirate is set to a lower rate. normal i2c devises do not seem to care, sofar i could test it. but i am trying to talk whit a smbus device, and that one does not like those long timeouts. naamloos

agatti commented 8 years ago

This might be related to #23

ChristopherSamSoon commented 5 years ago

This issue is because the Buspirate prints out the I2C events on the UART in a "blocking" way.

Example of an I2C write sequence:

1) Buspirate puts start condition on I2C line 2) Buspirate prints "I2CSTART" on the UART 3) Buspirate puts data on I2C line 4) Buspirate prints data in ASCII on the UART 5) Buspirate ACKS/NACKS

All of these printouts to the UART are "blocking" operations and buspirate will pause I2C communications during these events.

Best

Christopher Sam Soon