XMegaForArduino / libraries

libraries directory tree, intended to be placed in sketchbook/libraries (or similar), for xmega-specific versions of Arduino libraries
6 stars 4 forks source link

XWire/utility twi.c, twi.h - anomolous behavior from slave mode #3

Open bombasticbob opened 7 years ago

bombasticbob commented 7 years ago

when using 'slave' mode, the slave does not relinquish the bus properly and respond to a stop following an acknowledgement by the master. Further, the slave mode does not appear to correctly determine whether or not the master has done a 'NACK' in response to data sent by the slave.

This may be due to something simple in the library, or the fact that I was connecting TWIC to TWIE on the same CPU [this might have a built-in conflict].

Will need to test slave TWI operation using the "soft TWI master" library, to verify that it is working correctly, then tweek the master accordingly. If soft TWI can run as a slave as well, then it can be used for testing the TWI master.

[alternately if some 3rd party developer wants to run this using a protocol analyzer, then go for it, and submit patches as needed]