Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SoftWire for Master and Wire for Slave #2

Open
lpatiny opened this issue Aug 28, 2018 · 1 comment
Open

Use SoftWire for Master and Wire for Slave #2

lpatiny opened this issue Aug 28, 2018 · 1 comment

Comments

@lpatiny
Copy link
Member

lpatiny commented Aug 28, 2018

Some devices are Master I2C one 2 pins as well as Slave I2C on the SDA / SCL pins.

Problem with the official Wire library is that it tends to crash when you hotplug devices or there is some communication problems.

arduino/Arduino#1476

We should systematically use SoftI2CMaster for Master I2C that has the following interesting flags:

  • I2C_PULLUP = 1 meaning that internal pullups should be used
  • I2C_CPUFREQ, when changing CPU clock frequency dynamically
  • I2C_FASTMODE = 1 meaning that the I2C bus allows speeds up to 400 kHz
  • I2C_SLOWMODE = 1 meaning that the I2C bus will allow only up to 25 kHz
  • I2C_NOINTERRUPT = 1 in order to prohibit interrupts while
@lpatiny
Copy link
Member Author

lpatiny commented Sep 5, 2018

Closed by bff5153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant