-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Integrate OPTIGA Trust M #3186
Integrate OPTIGA Trust M #3186
Conversation
Added a commit 3c3dec0 It handles
Tested the Agree with adding single interface file |
As for the OPTIGA_DATA_REG_LEN limitation: it seems to me that the I2C is timeouting. e.g if you send 225 bytes, thats 1800 bits and with 200kHz i2c that is some 9ms. Timeout in optiga_transport is set to 10ms. So with some more bytes to send this should timeout. Try increasing the timeout. We could alternatively increase the I2C speed to 400kHz (which is the limit), just be aware that we don't want this speed for every i2c, specifically touch layer comm, and the driver is shared. |
Thanks! That was the problem. I increased the timeout to 15 ms and it works fine now. dbca703 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
[no changelog]
ce5c1f1
to
60229fd
Compare
Further work in this PR:
I am probably doing the initialization of the I2C interface wrong. There has been some refactoring recently around I2C, so that's not reflected in this PR. @TychoVrahe(Edit: Done)Maybe move the code to a subdirectory in(Edit: Done)core/embed/trezorhal
such asse
oroptiga
.Further work, that can be split into separate issues/PRs:
Not sure why I can't use the full capacity of the data register. See(Edit: Solved)OPTIGA_DATA_REG_LEN
intransport.h
. @TychoVraheoptiga.h
, which will implement some higher level operations, such asoptiga_get_device_cert()
oroptiga_check_pin()
. Only these would be used by the firmware directly and only they would need to be implemented for the emulator.Add the files to the build process only for the right firmwares. How will we determine that? Using(Edit: Solved)TREZOR_MODEL
, or something else?