I encountered a strange behavior while running 2 way transmission tests between 2 Arduino Zero (ATSAMD21G), one master and one slave. Wrong data is being continuously transferred both ways. The expected data is also being transferred in between. I have to filter out the received data to catch it (line 41 in Master's code and 33 in slave).
I'm using the stock wire libraries (being different for the 2 boards), along with Nick Gammon's "I2C_readAnything".
I think this continuous flow doesn't allow the bus to be released. It might be what's making it impossible to communicate with a second master (and maybe causing my previous problem)
I also tried my code between a Mega 2560 (slave) and a Zero (master). Fake data is, this time, only being sent one way (from the Zero to the Mega only).
Is there some specific code to add to send data properly from ATSAMD boards? Is it a bug in the SAMD Wire library?
I also had to add a 1ms delay after sending data from the Master. It wouldn't go through otherwise. Shouldn't it be handled by the ATSAMD or the Wire library?