Skip to content
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

Debug output sometimes freezes the OpenSK application #58

Closed
gendx opened this issue Feb 27, 2020 · 2 comments · Fixed by #67
Closed

Debug output sometimes freezes the OpenSK application #58

gendx opened this issue Feb 27, 2020 · 2 comments · Fixed by #67
Labels
bug Something isn't working

Comments

@gendx
Copy link
Collaborator

gendx commented Feb 27, 2020

Expected Behavior

When deploying the OpenSK app with --debug enabled, the key works and debug output is visible in the console. The debug output starts with the following:

Initialization complete. Entering main loop
NRF52 HW INFO: Variant: AAD0, Part: N52840, Package: QI, Ram: K256, Flash: K1024
usbc::start() - State=PoweredOn
Your chip is NRF52840 revision 3. Although this USB implementation should be compatible, your chip hasn't been tested.
usbc::start() - subscribing to interrupts.
enable_out_endpoint_(0) - State=Started
enable_in_out_endpoint_(1) - State=Started
attach() - State=Started
enable_pullup() - State=Started
Enabling USB pullups
New state is Attached
usbc::ready not implemented
usbc::suspend not implemented
usbc::resume not implemented
Bus reset
Cancelling USB receive due to timeout
Cancelling USB receive due to timeout
Set Address = 21
Cancelling USB receive due to timeout
Cancelling USB receive due to timeout
...

Actual Behavior

Sometimes, the log output stops after the following. In that case, the control flow seems blocked: the key doesn't process any USB request, no LED blinks.

Initialization complete. Entering main loop
NRF52 HW INFO: Variant: AAD0, Part: N52840, Package: QI, Ram: K256, Flash: K1024
usbc::start() - State=PoweredOn
Your chip is NRF52840 revision 3. Although this USB implementation should be compatible, your chip hasn't been tested.
usbc::start() - subscribing to interrupts.
enable_out_endpoint_(0) - State=Started
enable_in_out_endpoint_(1) - State=Started
attach() - State=Started
enable_pullup() - State=Started
Enabling USB pullups
New state is Attached
usbc::ready not implemented

Note: without --debug, the log output sometimes also stops after usbc::ready not implemented. But in that case the application is still functional afterwards.

Steps to Reproduce the Problem

On an nRF52840-DK.

  1. Deploy OpenSK with $ ./deploy.py os --board nrf52840_dk and $ ./deploy.py app --debug --panic-console --opensk.
  2. Run $ JLinkExe -device nrf52 -if swd -speed 1000 -autoconnect 1 and $ JLinkRTTClient on a separate terminal.
  3. Press the reset button multiple times and observe the console output each time.

Specifications

@gendx gendx added the bug Something isn't working label Feb 27, 2020
@gendx
Copy link
Collaborator Author

gendx commented Feb 27, 2020

Filed an issue on upstream Tock as it could be a kernel bug.

@gendx
Copy link
Collaborator Author

gendx commented Feb 28, 2020

This is an upstream issue: see tock/tock#1629 and the fix in tock/tock#1636.

Keeping this issue open to monitor the situation and update the Tock submodule once the fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant