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

Allow configuring the watchdogs in the init config #2180

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

SergioGasquez
Copy link
Member

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

Provides a way to configure watchdogs in esp_hal::init()

Testing

Tested different watchdog configurations in one example.

@SergioGasquez SergioGasquez linked an issue Sep 18, 2024 that may be closed by this pull request
esp-hal/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Mostly looks good to me, and I agree with @bugadani we should find a better place for these configs.

Another thing to think about it how to test this. I don't think there is a way to do something like #[should_reset] in embedded-test, but we should at least test that recreating the peripheral in "user" code and feeding the wdt works (we should also check that when users construct Rtc etc the wdg registers are not reset.

esp-hal/src/lib.rs Show resolved Hide resolved
esp-hal/src/lib.rs Outdated Show resolved Hide resolved
@SergioGasquez SergioGasquez added the skip-changelog No changelog modification needed label Sep 18, 2024
esp-hal/src/clock/mod.rs Outdated Show resolved Hide resolved
@SergioGasquez
Copy link
Member Author

ESP32 hil is failing, but not related to this PR

@SergioGasquez SergioGasquez force-pushed the feat/wd-config branch 2 times, most recently from 892ed5d to 591f0c3 Compare September 19, 2024 13:22
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM

hil-test/tests/init.rs Show resolved Hide resolved
esp-hal/src/lib.rs Show resolved Hide resolved
esp-hal/src/config.rs Outdated Show resolved Hide resolved
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Thank you!

@SergioGasquez
Copy link
Member Author

I tested the test_feeding_timg1_wdt in H2, and, ofc its failing in all the other targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to override the default post_init function?
6 participants