lucullusTheOnly / TinyWire

Composite Master and Slave I2C library for Atmels ATTiny microcontrollers
108 stars 26 forks source link

False detection of unexpected Start condition before Master Write #4

Open lucullusTheOnly opened 6 years ago

lucullusTheOnly commented 6 years ago

In the function USI_TWI_Start_Read_Write() there are some If-Statements under the definition of NOISE_TESTING, which should detect unexpected conditions on the I2C bus. These are unexpected Start- or Stop-Conditions and a data collision (for bus arbitration) and are detected through the corresponding bits in the USI Status Register USISR. Currently the library always detects an unexpected Start condition, when doing a Master Write. For now I've commented this out, but I would like to know, why this happens. If anyone has an idea, please share it. Thanks