zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.67k stars 6.52k forks source link

samples: drivers: watchdog: sample.drivers.watchdog loops endlessly #52708

Closed nordic-piks closed 1 year ago

nordic-piks commented 1 year ago

Describe the bug The samples/drivers/watchdog/sample.drivers.watchdog loops endlessly

Observed for

To Reproduce Steps to reproduce the behavior:

  1. have nrf52840dk_nrf52840 connected
  2. go to your zephyr dir
  3. call ./scripts/twister -T samples/drivers/watchdog -p nrf52840dk_nrf52840 --device-testing --device-serial /dev/ttyACM0 -v --inline-logs
  4. See console output with error

Expected behavior Valid console output

Impact Not clear

Logs and console output

[2022-11-30T23:55:55.603Z] ERROR   - *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.603Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.603Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.603Z] Feeding watchdog...
[2022-11-30T23:55:55.603Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.603Z] Watchdog sample application
[2022-11-30T23:55:55.604Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.604Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.604Z] Feeding watchdog...
[2022-11-30T23:55:55.604Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] *** Booting Zephyr OS build zephyr-v3.2.0-2123-g14358aee1cda ***
[2022-11-30T23:55:55.608Z] Watchdog sample application
[2022-11-30T23:55:55.608Z] Callback in RESET_SOC disabled for this platform
[2022-11-30T23:55:55.608Z] Feeding watchdog 5 times
[2022-11-30T23:55:55.608Z] Feeding watchdog...
[2022-11-30T23:55:55.608Z] 

Environment (please complete the following information):

henrikbrixandersen commented 1 year ago

Why is this a bug?

FRASTM commented 1 year ago

Since the sample.yaml expects

      - "Watchdog sample application"
      - "Feeding watchdog..."
      - "Waiting for reset..."
      - "Watchdog sample application"

--> that's not was is on the console. I also noticed that new output form after the commit https://github.com/zephyrproject-rtos/zephyr/commit/c5a40e3a9dbca4036163893f61ea91d6122106eb and reported the PR #52742. But it seems more complex than CONFIG_LOG_PRINTK=n or using printf instead of printk

mbolivar-nordic commented 1 year ago

@kl-cruz @anangl could you please take a look since this bug is reported against nordic HW by @nordic-piks ?

nordic-piks commented 1 year ago

Why is this a bug?

The test does not ends in expected time - there is timeout in twister after 85 sec. There are no expected messages on console so twister waits till timeout occurs.

FRASTM commented 1 year ago

Also seen on many stm32 platforms : b_u585i_iot02a, disco_l475_iot1, nucleo_f091rc, nucleo_f103rb, nucleo_f207zg, nucleo_f429zi, nucleo_g071rb, nucleo_g474re, nucleo_h743zi, nucleo_l073rz, nucleo_l152re, nucleo_wb55rg, nucleo_wl55jc, stm32f3_disco, stm32l562e_dk for window watchdog and iwdg as well.