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

tests/drivers/watchdog/wdt_basic_api/testcase.yaml: test_wdt_no_callback() failed at "Waiting to restart MCU" #13417

Closed
cinlyooi-intel opened this issue Feb 15, 2019 · 5 comments · Fixed by #21008
Assignees
Labels
area: Watchdog Watchdog bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: medium Medium impact/importance bug

Comments

@cinlyooi-intel
Copy link
Contributor

cinlyooi-intel commented Feb 15, 2019

Describe the bug
After restart, test_wdt_no_callback() output stop at "Waiting to restart MCU"

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=arduino2 ..
  3. make
  4. make run
    for sam_e70: Replace (2) with "cmake -DBOARD=sam_e70_xplained -DARCH=arm"

Screenshots or console output
For both arduino2 and same_e70_xplained:

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.14.0-rc1-211-g95e8a582b4 (delayed boot 1000ms) *****
Running test suite wdt_basic_test
===================================================================
starting test - test_wdt
Testcase: test_wdt_no_callback
Watchdog setup error
Waiting to restart MCU

Environment (please complete the following information):

  • OS: Fedora29
  • Toolchain: zephyr
  • Commit SHA or Version used: 9072d34 (andruino2)
    6aa8d94 (sam_370_xplained)

Additional context
Add any other context about the problem here.

@cinlyooi-intel cinlyooi-intel added the bug The issue is a bug, or the PR is fixing a bug label Feb 15, 2019
@cinlyooi-intel cinlyooi-intel changed the title tests/drivers/watchdog/wdt_basic_api/testcase.yaml: test_wdt_no_callback() failed tests/drivers/watchdog/wdt_basic_api/testcase.yaml: test_wdt_no_callback() failed at "Waiting to restart MCU" Feb 15, 2019
@galak galak added the area: Watchdog Watchdog label Feb 15, 2019
@nashif nashif added area: Watchdog Watchdog priority: medium Medium impact/importance bug and removed area: Watchdog Watchdog labels Feb 18, 2019
@cinlyooi-intel
Copy link
Contributor Author

cinlyooi-intel commented Mar 4, 2019

Repeated in Commit ID fd7c443 for sam_e70_xplained, arduino2

***** delaying boot 1000ms (per build configuration) *****
***** Booting Zephyr OS v1.14.0-rc1-704-gfd7c4430e139 (delayed boot 1000ms) *****
Running test suite wdt_basic_test
===================================================================
starting test - test_wdt
Testcase: test_wdt_no_callback
Watchdog setup error
Waiting to restart MCU

@aurel32
Copy link
Collaborator

aurel32 commented Mar 8, 2019

The problem is that on the SAM WDT can only be enabled or disabled once (the mode register is write once). By default the CONFIG_WDT_SAM_DISABLE_AT_BOOT option is enabled and disables the watchdog. Then it's not possible to enable it again.

After disabling this option, the test passes. I wonder how this option is different from the generic CONFIG_WDT_DISABLE_AT_BOOT option which is NOT enabled by default.

@aurel32
Copy link
Collaborator

aurel32 commented Mar 8, 2019

After disabling this option, the test passes.

Well I am wrong there. The MCU reboots correctly when the WDT triggers, however it also reset the RAM, while the test assumes that the RAM is left untouched by the WDT reset.

@overheat
Copy link
Contributor

overheat commented Apr 9, 2019

Fixed through #14968

@ioannisg ioannisg added the platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) label Jun 30, 2019
@ioannisg
Copy link
Member

After disabling this option, the test passes.

Well I am wrong there. The MCU reboots correctly when the WDT triggers, however it also reset the RAM, while the test assumes that the RAM is left untouched by the WDT reset.

So this test, as is, cannot pass on the SAM WDT @aurel32 and we should just exclude the platform from the test for now, until we extend the test to cover the SAM watchdog.

@nashif any thoughts against?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Watchdog Watchdog bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants