I'm looking for a method/function to be able to reset a Raspberry Pi Pico via programming, using the Pic's C SDK. Is this possible?

There is a way to do it using python using machine.reset() but I can't call that from within C (I think). I also want to avoid wiring a transistor into the ciruit. Thanks

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Oct 1, 2021 at 20:35

1 Answer 1


I don't see another way than using the watchdog. The example in the SDK documentation looks similar to this:

void software_reset()
    watchdog_enable(1, 1);

This busy waits 1ms until the chip is reset by the watchdog.

The time could be reduced to 1us by writing the value 2 directly to the watchdog LOAD register. I don't know if writing zero would lead to an immediate reset, it could also be that the counter wraps around to 0x00FFFFFF.

You could also use the scratch registers of the watchdog to detect a software reset.

  • The necessary include is #include "hardware/watchdog.h"
    – user85471
    Jan 17 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.