-
Notifications
You must be signed in to change notification settings - Fork 1
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 not initiating unless pins.X.Y is called #13
Comments
I have two trinket m0 that I'm testing right now. One works fine, the other works only sometimes after multiple resets and different pause times at the between the beginning and setAddress calls. But it tends not to work on a cold boot. |
OK, another test on the one doesn't work... I drop So whatever initializes the board with circuitpython enables i2c to work on the board that isn't working... |
Thanks @chalkers, great investigation, will reproduce and work out a fix (which from your great diagnostics will be simple 😄). |
This call returns ERR_DENIED
|
@pelikhan it returns that if the I2C is already enabled (from reading the code) |
I've added tracing and this is first time in the execution we try to mount i2c. |
It looks like we are clashing with mounting a SPI for neopixels on Pad5. |
@chalkers how I do repro your issue? |
Sorry, I've been in the middle of a move. If I recall correctly, I2C doesn't work on a "cold boot" i.e. after it's been removed from the computer and plugged in to an external source. The only way I've been able to guarantee it to work is to use:
or
I haven't unpacked all my electronics stuff yet but that is what I can remember. |
The following code on a cold boot doesn't initiate the I2C.
However if I add the following code I2C works...
Or even just setting the pull on the pins....
I don't need do set both but I just did as a test.
The text was updated successfully, but these errors were encountered: