-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement support for programming OpenTitan using SAM3U on CW305 #23
Conversation
This implementation has two improvements over the `spiflash` tool in | ||
lowRISC/opentitan: | ||
* Optimizes the happy path by checking the acknowledgement of frame N-1 | ||
after transmitting frame N instead of transmitting an extra frame to check | ||
each frame's acknowledgement. | ||
* Sends an all 0xFF frame as the last frame to avoid cases where the last | ||
frame gets corrupted and halts the bootstrapping process. |
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.
Just to be clear, we don't really need these but I thought they were nice to have.
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.
LGTM. @alphan very cool!
b693576
to
ed5dbd1
Compare
Minor output message updates, rebased to master. |
Hi @alphan, I just tried out this PR on my setup but it does not work:
Obviously, this indicates I am using the wrong firmware. However I already updated the firmware for the CW305 and it still does not work. Do I need to download a special image from somewhere? If yes, this should probably be documented as well. |
Ran into the same issue. I am going to try to update the cw305 fw one more time. This is the commit that @alphan posted on slack a while ago. Adding here for cross-reference: |
The firmware from the commit referenced above works for me. I already got rid of my FTDI cable! |
Thanks @moidx for posting the commit, it's working for me as well now! For your information, the firmware blob is no longer on the
Unplug and then plug the CW305 into your computer again, then continue the update process:
Wait for the programming to finish, then unplug and plug the hardware again. I think it wouldn't hurt to put this information in the getting started guide. Just to avoid that someone spends a lot of time figuring out why things aren't working out of the box at the moment. WDYT @alphan ? |
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.
This looks very good, thanks @alphan !
I would like to see two things:
- An update to the getting started guide to reflect those changes and explain how the firmware upgrade has to be performed at the moment (see my previous comment).
- Arranging the commits such that all of them are self-contained, alternatively you can squash everything into one commit upon merge.
Apologies for missing your message yesterday (skipped inbox because this thread was tagged as todo). It was there when I created this PR but it looks like it was accidentally removed in this commit. There is also another small change that I requested earlier. I'll reach out to CW folks.
Assuming that this will get fixed pretty soon, I think we can skip this step but it's probably a good idea to add a note with a link to this guide. |
Definitely, I didn't include the update in this PR since I wasn't sure what the decision would be (keep or remove current spiflash method). Since we reached a consensus there I'll create a new PR that removes spiflash related code and update the getting started guide.
I tried to split code and other changes just in case we need to revert them one-by-one but I agree that the bitstream and aes_serial binary update can and should go together. I will merge those two. I hope this makes sense. |
…date aes_serial binary This change updates the CW305 Artix-7 100T bitstream to remove spiflash and MPSSE cable dependencies and to enable programming using ChipWhisperer APIs. This bitstream was built with the changes in lowRISC/opentitan#4036 applied on lowRISC/opentitan@3afeacb3. Signed-off-by: Alphan Ulusoy <alphan@google.com>
Signed-off-by: Alphan Ulusoy <alphan@google.com>
Signed-off-by: Alphan Ulusoy <alphan@google.com>
This change implements support for programming OpenTitan over the SPI interface of SAM3U on CW305. Signed-off-by: Alphan Ulusoy <alphan@google.com>
This PR implements support for programming OpenTitan over the SPI interface of SAM3U on CW305 and includes the following commits:
Remove trace filtering based on min valueIt would be great if you could checkout this PR and let me know if you run into any issues. I left the current spiflash based programmer intact just in case. I can remove it if the new implementation is reliable enough.
Closes #15.