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

i2c peripheral is not using a repeated start condition for write_read() #1490

Closed
liebman opened this issue Apr 21, 2024 · 1 comment · Fixed by #1505
Closed

i2c peripheral is not using a repeated start condition for write_read() #1490

liebman opened this issue Apr 21, 2024 · 1 comment · Fixed by #1505
Labels
peripheral:i2c I2C peripheral

Comments

@liebman
Copy link
Contributor

liebman commented Apr 21, 2024

A logic analyser shows that a stop condition followed by start condition is currently being issued instead of the repeated start.

Both embedded-hal and embedded-hal-async specify that write_read() uses a repeated start condition.

Some devices like the veml7700 require a repeated start. See Fig. 4 - I2C Bus Timing for Receive Word Command Format on page 4.

@bjoernQ
Copy link
Contributor

bjoernQ commented Apr 22, 2024

Probably the best thing to do would be to support https://docs.rs/embedded-hal/latest/embedded_hal/i2c/trait.I2c.html#tymethod.transaction - for the embedded-hal trait the provided methods will use it and things should be fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
peripheral:i2c I2C peripheral
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants