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

drivers/timers/watchdog: support the configurations of Auto-monitor r… #15142

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

Jiaqi-YP7
Copy link
Contributor

Summary

Support the configurations of Auto-monitor reset timeout
and Auto-monitor keep alive interval in milliseconds.

In some areas with high security requirements such as vehicle
control, in order to meet functional safety requirements, the
timeout and feeding interval of the watchdog need to be
configured in milliseconds

Impact

image
After the modification, users need to configure timeout and
keep alive interval in milliseconds instead of seconds, but
the default timeout is now set to 60000 milliseconds, which
is the same as the original 60 seconds

Testing

CI check

@github-actions github-actions bot added Area: Drivers Drivers issues Size: S The size of the change in this PR is small labels Dec 11, 2024
@nuttxpr
Copy link

nuttxpr commented Dec 11, 2024

[Experimental Bot, please feedback here]

Yes, this PR appears to meet the NuttX requirements, although some sections could be expanded for better clarity.

Here's a breakdown of why and suggestions for improvement:

Strengths:

  • Clear Summary: The summary explains the "why" (functional safety), the "what" (auto-monitor configuration), and the "how" (millisecond support).
  • Impact Section Addresses Key Areas: It acknowledges the user impact and the change in units from seconds to milliseconds. The screenshot adds value.
  • Testing Evidence: Mentioning CI check implies some level of automated testing.

Weaknesses and Suggestions:

  • Missing Issue References: If this relates to any existing NuttX or NuttX-apps issues, those should be linked in the Summary.
  • Impact Section Could Be More Thorough:
    • Build Impact: Does adding this configuration option change the build process at all? (Likely NO, but should be explicitly stated).
    • Hardware Impact: Specify which architectures/boards are affected. Even if the impact is "NO," state it explicitly.
    • Documentation Impact: This change requires a documentation update. State "YES" and describe what documentation will be added/modified.
    • Security Impact: While motivated by security concerns, the direct security impact of this specific change isn't clear. Explain if this enhances security itself or just facilitates other security measures.
    • Compatibility Impact: Does this change break any existing configurations or introduce any backward compatibility issues? State "NO" if none.
  • Testing Section Needs More Detail: "CI check" is insufficient. While CI is essential, provide:
    • Build Host Details: OS, CPU architecture, compiler version used for local testing.
    • Target Details: Specific architectures and boards tested. "sim" isn't specific enough. Which simulator?
    • Example Logs (Even Brief Ones): Demonstrate the configuration change and the auto-monitor behaving as expected with millisecond values. Even a simple "before/after" showing the units is helpful. Empty log blocks don't add value.

Example Improvements for Testing Section:

Testing

I confirm that changes are verified on local setup and works as intended:
* Build Host(s): Linux (Ubuntu 20.04), x86_64, GCC 9.4.0
* Target(s): sim:qemu-x86_64, stm32f4discovery:default

Testing logs before change (using seconds):

configuring watchdog timeout to 60 seconds...
...
watchdog triggered after approximately 60 seconds


Testing logs after change (using milliseconds):

configuring watchdog timeout to 60000 milliseconds...
...
watchdog triggered after approximately 60 seconds

By addressing these points, the PR will be significantly stronger and easier for reviewers to evaluate.

@Jiaqi-YP7 Jiaqi-YP7 force-pushed the auto-monitor-support branch from e1dd2da to 715c510 Compare December 12, 2024 05:32
…eset timeout and Auto-monitor keep alive interval in milliseconds.

In some areas with high security requirements such as vehicle control, in order to meet functional safety requirements, the timeout and feeding interval of the watchdog need to be configured in milliseconds

Signed-off-by: yaojiaqi <[email protected]>
@Jiaqi-YP7 Jiaqi-YP7 force-pushed the auto-monitor-support branch from 715c510 to 83d468d Compare December 12, 2024 05:35
@Jiaqi-YP7
Copy link
Contributor Author

Now I have removed the _MSEC suffix from WATCHDOG_AUTOMONITOR_TIMEOUT_MSEC so that it still keep its original name WATCHDOG_AUTOMONITOR_TIMEOUT

config WATCHDOG_AUTOMONITOR_TIMEOUT
	int "Auto-monitor reset timeout(millisecond)"
	default 60000

@anchao anchao merged commit 890cf47 into apache:master Dec 12, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Drivers Drivers issues Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants