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 timeout is not long enough #48

Closed
9names opened this issue Aug 9, 2023 · 0 comments · Fixed by #52
Closed

i2c timeout is not long enough #48

9names opened this issue Aug 9, 2023 · 0 comments · Fixed by #52

Comments

@9names
Copy link
Collaborator

9names commented Aug 9, 2023

The timeout for i2c is tiny, and might be dependent on optimisation level.

bl602-hal/src/i2c.rs

Lines 163 to 168 in dfa6556

/// Set the timeout when waiting for fifo (rx and tx).
/// It's not a time unit but the number of cycles to wait.
/// This defaults to 2048
pub fn set_timeout(&mut self, timeout: u16) {
self.timeout = timeout;
}

we should switch to using mcycle and sysclk to wait for a few hundred microseconds instead.

@9names 9names mentioned this issue Jan 11, 2024
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 a pull request may close this issue.

1 participant