Reimplement wakeup() #18
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a potential solution for: adafruit/Adafruit_Blinka#262
With the current implementation, the MCP2221 apparently does not output something that works, so the subsequent I2C comms fail. See logic traces in issue thread above. This reimplementation takes a different approach for generating the ATECC wakeup signal. Instead of using a scan it tries to address something at 0x00 and relies on 8 clock cycles of a 100kHz bus. So this hack will not work for I2C clock frequencies higher than 100kHz.
NOTE: the other big change is that
wakeup()
no longer returns a boolean. But that appears to have only been needed by the previous implementation. It's not used anywhere else in the driver.It now works with MCP2221:
and still works with native CP: