Skip to content

Update hello_watchdog to detect reboot only by watchdog #484

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 1 commit into from
Feb 18, 2025

Conversation

CorentinLemaitre
Copy link
Contributor

Hello,

I have changed the hello_watchdog.c example to detect only reboot caused by watchdog.

I have used the original example program and there was a wrong detection of watchdog caused reboot. For example, when a program was load on the RP2040 through uf2 file, then the RP2040 restart and the result of watchdog_caused_reboot() is true.

I have changed it to watchdog_enable_caused_reboot() cause based on the documentation found here.

I have tested it on my own project, the detection was fine without detection of reboot caused by program upload, that is why i do a pull request to help others to use watchdog.

@kilograham kilograham self-assigned this Feb 13, 2025
@kilograham kilograham added this to the 2.1.1 milestone Feb 13, 2025
kilograham
kilograham previously approved these changes Feb 18, 2025
Copy link
Contributor

@kilograham kilograham left a comment

Choose a reason for hiding this comment

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

Yes, this makes sense for RP2040

@kilograham kilograham changed the base branch from master to develop February 18, 2025 17:03
@kilograham kilograham dismissed their stale review February 18, 2025 17:03

The base branch was changed.

@kilograham kilograham merged commit 3a159a4 into raspberrypi:develop Feb 18, 2025
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