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

Fix bug in writeBytes method for nRF51 #360

Merged
merged 1 commit into from
Feb 17, 2018

Conversation

dingari
Copy link

@dingari dingari commented Feb 17, 2018

I was having issues writing multiple bytes from an nRF52 to an I2C slave using code ported from this lib, where my slave would randomly stop ACK-ing the writes. I found a bug in the writeBytes method. The current implementation writes the data in the following order:

slave address (write) - register address - slave address (write) - data.

According to section 3.1 in Understanding the I2C bus from TI, the second slave address write isn't needed, and is probably what was causing my slave to stop ACK-ing.

I've fixed this in my implementation, and I've modified the method in this repo also.

@jrowberg jrowberg merged commit 3dc9538 into jrowberg:master Feb 17, 2018
@dingari dingari deleted the bugfix-nrf51-writebytes branch February 17, 2018 22:45
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

Successfully merging this pull request may close these issues.

2 participants