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

Watchdog [WDT]: add option to enable/disable WDT during debugging #239

Merged
merged 10 commits into from
Dec 11, 2021

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Dec 11, 2021

This PR adds two new flags to the Watchdog (WDT) control register (the bits were previously unused):

  • NEORV32_WDT.CTRL bit 9: WDT_CTRL_DBEN [r/w] - set to 1 to allow watchdog operation (timeout counter increment) even when the CPU is in debug mode (active OCD session), ⚠️ in the current version the WDT always increments it's counter
  • NEORV32_WDT.CTRL bit 10: WDT_CTRL_HALF [r/-] - set when at least half of the max. timeout value has been reached

✔️ the changes in this PR are fully backwards-compatible

* operations are 1 cycle faster
* slightly less HW utilization
debug_o is set when the CPU is _in- debug mode (during an active OCD session)
@stnolting stnolting added the HW hardware-related label Dec 11, 2021
@stnolting stnolting self-assigned this Dec 11, 2021
DBEN: enable watchdog operation even when the CPU is in debug mode

HALF: set if at least half of the maximum timeout value has been reached
@stnolting stnolting marked this pull request as ready for review December 11, 2021 09:50
@stnolting stnolting changed the title Watchdog [WDT]: add option to enable WDT during debugging Watchdog [WDT]: add option to enable/disable WDT during debugging Dec 11, 2021
@stnolting stnolting merged commit fa7e3a3 into master Dec 11, 2021
@stnolting stnolting deleted the watchdogs branch December 11, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant