-
Notifications
You must be signed in to change notification settings - Fork 32
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
Meeting MCP23016 Twait #114
Comments
Hmm... Then maybe just checking if I2C write succeeds (#112) would do the trick. |
Checking every I2C transaction should be the norm (this is one of our goals for future refactoring), but holding SCL low should not cause the transaction to fail from my understanding as the I2C master peripheral would wait for it to go back to high. |
We haven't experienced problems with MCP23016 anymore, as stated in my previous comment an explicit delay is not necessary. I'm hoping that the I2C refactoring will be finished in the next months. I'm closing this issue for now. |
According to MCP23016 datasheet minimal time between transmissions should be 12 us:
This requirement may not be met at all times, so it may be advisable to put some delays between calls to MCP functions.
These delays should be included in MCP functions, however those are called in two different contexts:
We can use nop-based wait function, but it seems not the right way of doing things in FreeRTOS context. On the other hand,
vTaskDelayUntil
can't be used outside the scheduler.I'm not very experienced in FreeRTOS, so maybe I'm missing some more obvious solution, but I'm thinking of two ways of solving this:
The text was updated successfully, but these errors were encountered: