Skip to content

Nuvoton: Refine more on watchdog HAL #12923

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 4 commits into from
May 12, 2020

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented May 5, 2020

Summary of changes

Continuing with #12896, this PR refines more on Nuvoton's watchdog HAL:

  1. With Nuvoton: Fix watchdog reset failure on meeting Hard Fault #12896, enlarge WDT reset delay to avoid premature WDT reset.
  2. Fix WDT feature report with clock frequency.
  3. Fix failure to change WDT clock source. Relevant bits are protected and need unlock sequence before change.
  4. Change WDT clock source to LXT from LIRC, except NANO130 which supports only LIRC-clocked WDT.

Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

ccli8 added 4 commits May 5, 2020 17:50
Consider the following factors to define WDT reset delay:
1. Cannot be too small. This is to avoid premature WDT reset in pieces of timeout cascading.
2. Cannot be too large. This is to pass Greentea reset_reason/watchdog_reset tests, which have e.g. 50~100 reset delay tolerance.
WDT clock source selection and its enablement bits are protected. Add unlock sequence before write to them.
LIRC has 40%~50% error rate, so change WDT clock source to LXT from LIRC.

NOTE: NANO100 series just supports LIRC-clocked WDT.
@ciarmcom ciarmcom requested a review from a team May 5, 2020 11:00
@ciarmcom
Copy link
Member

ciarmcom commented May 5, 2020

@ccli8, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@mergify mergify bot added needs: CI and removed needs: review labels May 5, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented May 6, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented May 6, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented May 8, 2020

Will be merged as soon as we have 6.0.0 beta1 released

@0xc0170 0xc0170 merged commit 8a254a9 into ARMmbed:master May 12, 2020
@mergify mergify bot removed the ready for merge label May 12, 2020
@ccli8 ccli8 deleted the nuvoton_watchdog_lxt branch May 13, 2020 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants