watterott / ATmega328PB-Testing

Atmel/Microchip ATmega328PB support for Arduino IDE
https://learn.watterott.com
76 stars 61 forks source link

Problems with simultaneous master/slave #50

Closed haimiko closed 4 years ago

haimiko commented 4 years ago

Hangs when I try to run as an I2C slave on SDA0/SCL0 and Master on SDA1/SCL1. Everything appears to initialize properly. When I run Wire.begin(8) my remote master can see this device and i can see other slave devices on SDA1. However, as soon as I query a slave device on SDA1, the SDA0 bus goes LOW and because of that longer responds as a slave on SDA0.

awatterott commented 4 years ago

The Wire1 lib deactivated the pullups from SDA0 and SCL0. I have fixed it now and I will release a new boards package soon. Commit: https://github.com/watterott/ATmega328PB-Testing/commit/3ed2913c79806d61b47964d342f125fa49a116ca

haimiko commented 4 years ago

The Wire1 lib deactivated the pullups from SDA0 and SCL0. I have fixed it now and I will release a new boards package soon. Commit: 3ed2913

Nice catch but still didn't resolve the issue. Must be some other reference somewhere too.

awatterott commented 4 years ago

I have looked over the code again, but I dont see any problems. Can you make a minimal example to re-produce the problem.