Skip to content

Fix two watchdog crashes #5272

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

Merged
merged 4 commits into from
Aug 31, 2021
Merged

Fix two watchdog crashes #5272

merged 4 commits into from
Aug 31, 2021

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Aug 31, 2021

Fixes a crash from trying to raise an exception when trying to
deinit a RESET wdt by not raising an exception.

Fixes a crash when raise a wdt exception in the REPL when waiting
for input. We now catch and print any exceptions raised.

Fixes #5261 (USB after a watchdog still doesn't work.)

Adafruit CircuitPython 7.0.0-beta.0-133-g8fbb3e6d2-dirty on 2021-08-30; Adafruit Feather nRF52840 Express with nRF52840
>>> import microcontroller
>>> import watchdog
>>> w = microcontroller.watchdog
>>> w.timeout = 5
>>> w.mode = watchdog.WatchDogMode.RAISE
>>> 
<WatchDogTimeout>
>>> import time
>>> w.mode = watchdog.WatchDogMode.RAISE
>>> w.timeout = 30
>>> try:
...     time.sleep(30)
... except BaseException as e:
...     print("woo", e)
... 
woo <WatchDogTimeout>

Fixes a crash from trying to raise an exception when trying to
deinit a RESET wdt by not raising an exception.

Fixes a crash when raise a wdt exception in the REPL when waiting
for input. We now catch and print any exceptions raised.

Fixes micropython#5261
* Reduce the number of supported HID reports of IDs per descriptor.
  This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
  flash. Flash is the default (1).
@tannewt tannewt requested a review from gamblor21 August 31, 2021 22:43
Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Less familiar with the qstr parts.

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.

nRF52840: multiple watchdog hardfaults
2 participants