-
Notifications
You must be signed in to change notification settings - Fork 3k
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 reconfiguring a running watchdog #12511
Conversation
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.
Looks good, but I think we need to clarify the docs a bit:
/** Start the Watchdog timer.
*
* @note Asset that the timeout param is supported by the target
* (0 < timeout <= Watchdog::get_max_timeout).
*
* @param timeout Watchdog timeout in milliseconds.
*
* @return true if the Watchdog timer was started successfully;
* false if Watchdog timer was not started or if the Watchdog
* timer is already running.
*/
bool start(uint32_t timeout);
fore return False if Watchdog timer was not started or if the Watchdog timer is already running.
Should probably say that it's false when the timer wasn't started or it setting new timeout wasn't possible.
Pull request has been modified.
Ci started |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
@paul-szczepanek-arm Unittest failed for Watchdog - please review |
looks like the unit test is testing the assumption that I'm trying to remove |
In that case, fix the unit test as well and document the behavior (already done here). |
removed the part of the test that tests that assumption |
CI restarted |
Test run: SUCCESSSummary: 7 of 7 test jobs passed |
Summary of changes
Calling Watchdog::start is limited to only configuring a stopped watchdog. There is no need for such a restriction. The driver checks an internal state and disallows the call. The ports allow configuring a running watchdog. If a port does not allow such a call the call will return an error. No need to preemptively disallow it. The hal call specifies the call can made repeatedly without stopping.
Impact of changes
Migration actions required
Documentation
The docs are already correct as they don't mention any requirement for watchdog to be stopped. This fix will bring the actual behaviour in line with them.
Pull request type
Test results
Reviewers
@bulislaw