chipKIT32 / chipKIT-core

Downloadable chipKIT core for use with Arduino 1.6 - 1.8+ IDE, PlatformIO, and UECIDE
http://chipkit.net/
Apache License 2.0
59 stars 53 forks source link

Update Wire.cpp #483

Open ElectronicsSam opened 2 years ago

ElectronicsSam commented 2 years ago

Bugfix, when slave NACK received, next transmission would freeze system due to transmit buffer not empty from previous transmission.

This can happen when a slave disappears from the bus. In my example the SCL would stay low and my clicker 2 board would freeze completely due to while loop in beginTransmission that blocks until transmit buffer is empty. Wire freeze when slave disappears Wire one packet before

JacobChrist commented 2 years ago

I think I have personally experienced this. What device are you taking to and what board are you using? Fubarino Mini 2.0 and PONTECH Quick 240's are easy boards for me to test with.

Without digging deeper the change look innocuous none the less.