-
Notifications
You must be signed in to change notification settings - Fork 464
Add WDT and sleep functions to RP2040 Helper #862
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
Conversation
Remove deleted sleep_until_ms docs
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, thanks!
@earlephilhower Sweet! Could you create a release when merged? Need this as a dependency for Adafruit_SleepyDog. |
Looks like a typo in the feed-the-watchdog call. Can you please update? I'll do a new drop tonight once this is in and I get the Cytron SPI1 change done. |
Missed that, thanks. Was in my local pico BSP but not upstream. |
cores/rp2040/RP2040Support.h
Outdated
} | ||
|
||
void wdt_reset() { | ||
watchdog_reboot(); |
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.
Err, don't you mean watchdog_update()
? This call should also fail because it actually resets the chip (see the RP2040::reboot()
method in this file) and needs add'l params.
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.
Yeah, should be watchdog_update (https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__watchdog.html#ga329b748919954f8b48c58049115a5c54), to reload the counter with the specified time, not reset it.
Addresses and resolves #861 by adding two function helpers for basic hardware watchdog access and one function for entering low-power sleep (WFE) mode.
cc @earlephilhower