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

Configure the watchdog #575

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Configure the watchdog #575

wants to merge 7 commits into from

Conversation

sosthene-nitrokey
Copy link
Collaborator

@sosthene-nitrokey sosthene-nitrokey commented Dec 19, 2024

Behaviour is:

After a watchdog reset: restart to bootloader
For the NRF52: Any soft reset after that (for example after an update): restart normally (this is because it is not possible to clear the RESETREAS (reset reason), so the watchdog bit is always set after the first time the watchdog is triggered. This means that clearing requires a power cycle.

Watchdog is configured for 15 minutes, to make sure it does not break any operation.

Depends on:

@nitrokey-ci
Copy link
Collaborator

nitrokey-ci commented Dec 19, 2024

No significant changes.

Insignifcant changes
metric value change
binary-size-nk3am 1,494,498 🔴 +405 (+0.03%)
binary-size-nk3am-test 1,868,379 🔴 +540 (+0.03%)
binary-size-nk3xn 537,396 🔴 +656 (+0.12%)
binary-size-nk3xn-test 537,404 🔴 +552 (+0.10%)
binary-size-nkpk 676,279 🔴 +511 (+0.08%)

Behaviour is:

After a watchdog reset: restart to bootloader
Any soft reset after that (for example after an update): restart normally

Watchdog is configured for 3 minutes.
This is larger than the largest operation we can do (generating a RSA key)
This is longer than the time it takes for an update to occur
Watchdog is set with a 15 min timeout
It restarts automatically to bootloader

Unlike the NRF52, the `wdtreset` register is properly cleared by the bootloader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants