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

Support rtwdog on rt1180 #82456

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SuperHeroAbner
Copy link

Added the rtwdog Zephyr driver for RT1180 EVK.

@SuperHeroAbner
Copy link
Author

Related hal_nxp PR: zephyrproject-rtos/hal_nxp#482

@lucien-nxp
Copy link
Contributor

lucien-nxp commented Dec 3, 2024

Related hal_nxp PR: zephyrproject-rtos/hal_nxp#482

Please record your hal_nxp PR in west.yml like : pull/482/head.
After added, please inform Hake Huang help test your PR on RT1180 platform. Thank you.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Dec 3, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@ee22de2 zephyrproject-rtos/hal_nxp#482 zephyrproject-rtos/hal_nxp#482/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_nxp DNM This PR should not be merged (Do Not Merge) labels Dec 3, 2024
@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch from 75c3eb8 to cafbea5 Compare December 3, 2024 09:24
Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the compliance errors, the github review UI highlights the issues that need fixing nicely

dts/bindings/watchdog/nxp,imx-rtwdog.yaml Outdated Show resolved Hide resolved
dts/bindings/watchdog/nxp,imx-rtwdog.yaml Outdated Show resolved Hide resolved
drivers/watchdog/wdt_mcux_imx_rtwdog.c Outdated Show resolved Hide resolved
drivers/watchdog/wdt_mcux_imx_rtwdog.c Outdated Show resolved Hide resolved
drivers/watchdog/wdt_mcux_imx_rtwdog.c Outdated Show resolved Hide resolved
drivers/watchdog/wdt_mcux_imx_rtwdog.c Outdated Show resolved Hide resolved
dts/bindings/watchdog/nxp,imx-rtwdog.yaml Outdated Show resolved Hide resolved
soc/nxp/imxrt/imxrt118x/soc.c Outdated Show resolved Hide resolved
@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch from cafbea5 to abe0278 Compare December 4, 2024 09:15
@hakehuang
Copy link
Collaborator

please add -watchdog to boards\nxp\mimxrt1180_evk\mimxrt1180_evk_mimxrt1189_cm33.yaml

west.yml Outdated Show resolved Hide resolved
boards/nxp/mimxrt1180_evk/mimxrt1180_evk.dtsi Outdated Show resolved Hide resolved
drivers/watchdog/wdt_mcux_rtwdog.c Outdated Show resolved Hide resolved
@danieldegrasse
Copy link
Collaborator

danieldegrasse commented Dec 4, 2024

please add -watchdog to boards\nxp\mimxrt1180_evk\mimxrt1180_evk_mimxrt1189_cm33.yaml

Also would be good to document support for this on the board, like we do here (use RTWODG instead of WWDT):

| WWDT | on-chip | watchdog |

@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch 4 times, most recently from 0af044f to d43fe89 Compare December 5, 2024 15:31
@danieldegrasse
Copy link
Collaborator

Please rebase when you have a chance- sorry that the manifest file keeps getting conflicts!

danieldegrasse
danieldegrasse previously approved these changes Dec 5, 2024
@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch 3 times, most recently from 12ba0c4 to d00fedc Compare December 10, 2024 10:41
@hakehuang
Copy link
Collaborator

board test pass for
samples/drivers/watchdog/sample.drivers.watchdog
tests/drivers/watchdog/wdt_basic_api/drivers.watchdog

2024-12-11 10:55:17,789 - twister - DEBUG - Launched 16 jobs
2024-12-11 10:55:21,963 - twister - DEBUG - DEVICE: Running TESTSUITE wdt_basic_test_suite
2024-12-11 10:55:21,969 - twister - DEBUG - DEVICE: ===================================================================
2024-12-11 10:55:21,971 - twister - DEBUG - DEVICE: START - test_wdt
2024-12-11 10:55:21,971 - twister - DEBUG - On TC_START: Ztest case 'wdt' matched to 'drivers.watchdog.wdt_basic_test_suite.wdt
2024-12-11 10:55:21,973 - twister - DEBUG - DEVICE: Testcase: test_wdt_no_callback
2024-12-11 10:55:21,976 - twister - DEBUG - DEVICE: Waiting to restart MCU
2024-12-11 10:55:23,206 - twister - DEBUG - -- west flash: using runner linkserver
RUNNER - gdb_port = 3333, semih port = 8888
-- runners.linkserver: LinkServer: /usr/local/LinkServer/LinkServer, version v24.9.75

2024-12-11 10:55:23,971 - twister - DEBUG - DEVICE: �Running TESTSUITE wdt_basic_test_suite
2024-12-11 10:55:23,971 - twister - WARNING - Already STARTED 'wdt_basic_test_suite':{'count': 1, 'repeat': 0}
2024-12-11 10:55:23,977 - twister - DEBUG - DEVICE: ===================================================================
2024-12-11 10:55:23,978 - twister - DEBUG - DEVICE: START - test_wdt
2024-12-11 10:55:23,978 - twister - DEBUG - On TC_START: Ztest case 'wdt' matched to 'drivers.watchdog.wdt_basic_test_suite.wdt
2024-12-11 10:55:23,978 - twister - WARNING - Already STARTED 'drivers.watchdog.wdt_basic_test_suite.wdt':{'count': 1}
2024-12-11 10:55:23,981 - twister - DEBUG - DEVICE: Testcase: test_wdt_no_callback
2024-12-11 10:55:23,983 - twister - DEBUG - DEVICE: Testcase passed
2024-12-11 10:55:23,985 - twister - DEBUG - DEVICE: Testcase: test_wdt_callback_1
2024-12-11 10:55:23,987 - twister - DEBUG - DEVICE: Waiting to restart MCU
2024-12-11 10:55:27,936 - twister - DEBUG - DEVICE: �Running TESTSUITE wdt_basic_test_suite
2024-12-11 10:55:27,936 - twister - WARNING - Already STARTED 'wdt_basic_test_suite':{'count': 2, 'repeat': 1}
2024-12-11 10:55:27,942 - twister - DEBUG - DEVICE: ===================================================================
2024-12-11 10:55:27,943 - twister - DEBUG - DEVICE: START - test_wdt
2024-12-11 10:55:27,944 - twister - DEBUG - On TC_START: Ztest case 'wdt' matched to 'drivers.watchdog.wdt_basic_test_suite.wdt
2024-12-11 10:55:27,944 - twister - WARNING - Already STARTED 'drivers.watchdog.wdt_basic_test_suite.wdt':{'count': 2}
2024-12-11 10:55:27,946 - twister - DEBUG - DEVICE: Testcase: test_wdt_callback_1
2024-12-11 10:55:27,948 - twister - DEBUG - DEVICE: Testcase passed
2024-12-11 10:55:27,951 - twister - DEBUG - DEVICE: Testcase: test_wdt_bad_window_max
2024-12-11 10:55:27,952 - twister - DEBUG - DEVICE: E: Invalid timeout
2024-12-11 10:55:27,956 - twister - DEBUG - DEVICE: PASS - test_wdt in 0.010 seconds
2024-12-11 10:55:27,956 - twister - DEBUG - On TC_END: Ztest case 'wdt' matched to 'drivers.watchdog.wdt_basic_test_suite.wdt
2024-12-11 10:55:27,956 - twister - DEBUG - END  case 'drivers.watchdog.wdt_basic_test_suite.wdt':{'count': 3}
2024-12-11 10:55:27,962 - twister - DEBUG - DEVICE: ===================================================================
2024-12-11 10:55:27,965 - twister - DEBUG - DEVICE: TESTSUITE wdt_basic_test_suite succeeded
2024-12-11 10:55:27,965 - twister - DEBUG - END TS_END suite 'wdt_basic_test_suite':{'count': 3, 'repeat': 2}
2024-12-11 10:55:27,969 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY START ------
2024-12-11 10:55:27,978 - twister - DEBUG - DEVICE: SUITE PASS - 100.00% [wdt_basic_test_suite]: pass = 1, fail = 0, skip = 0, total = 1 duration = 0.010 seconds
2024-12-11 10:55:27,979 - twister - DEBUG - END TS_SUM suite 'wdt_basic_test_suite':{'count': 2, 'repeat': 2}
2024-12-11 10:55:27,984 - twister - DEBUG - DEVICE: - PASS - [wdt_basic_test_suite.test_wdt] duration = 0.010 seconds
2024-12-11 10:55:27,988 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY END ------
2024-12-11 10:55:27,994 - twister - DEBUG - DEVICE: ===================================================================
2024-12-11 10:55:27,997 - twister - DEBUG - DEVICE: RunID: 7b72ba324c95500718299baaf4815cd0
2024-12-11 10:55:28,000 - twister - DEBUG - DEVICE: PROJECT EXECUTION SUCCESSFUL

and

sample.drivers.watchdog

2024-12-11 10:55:32,951 - twister - DEBUG - DEVICE: �*** Booting Zephyr OS build v4.0.0-1805-gd00fedc198d3 ***
2024-12-11 10:55:32,953 - twister - DEBUG - DEVICE: Watchdog sample application
2024-12-11 10:55:32,954 - twister - DEBUG - HARNESS:Console:EXPECTED(1/4):'Watchdog sample application'
2024-12-11 10:55:32,957 - twister - DEBUG - DEVICE: Attempting to test pre-reset callback
2024-12-11 10:55:32,965 - twister - DEBUG - DEVICE: [00:00:00.011,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_setup: Setup the watchdog�[0m
2024-12-11 10:55:32,967 - twister - DEBUG - DEVICE: Feeding watchdog 5 times
2024-12-11 10:55:32,967 - twister - DEBUG - HARNESS:Console:EXPECTED(2/4):'Feeding watchdog...'
2024-12-11 10:55:32,969 - twister - DEBUG - DEVICE: Feeding watchdog...
2024-12-11 10:55:32,976 - twister - DEBUG - DEVICE: [00:00:00.023,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:33,028 - twister - DEBUG - DEVICE: Feeding watchdog...
2024-12-11 10:55:33,035 - twister - DEBUG - DEVICE: [00:00:00.082,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:33,087 - twister - DEBUG - DEVICE: Feeding watchdog...
2024-12-11 10:55:33,095 - twister - DEBUG - DEVICE: [00:00:00.141,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:33,146 - twister - DEBUG - DEVICE: Feeding watchdog...
2024-12-11 10:55:33,154 - twister - DEBUG - DEVICE: [00:00:00.201,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:33,206 - twister - DEBUG - DEVICE: Feeding watchdog...
2024-12-11 10:55:33,213 - twister - DEBUG - DEVICE: [00:00:00.260,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:33,265 - twister - DEBUG - DEVICE: Waiting for reset...
2024-12-11 10:55:33,265 - twister - DEBUG - HARNESS:Console:EXPECTED(3/4):'Waiting for reset...'
2024-12-11 10:55:34,160 - twister - DEBUG - -- west flash: using runner linkserver
RUNNER - gdb_port = 3333, semih port = 8888
-- runners.linkserver: LinkServer: /usr/local/LinkServer/LinkServer, version v24.9.75

2024-12-11 10:55:34,190 - twister - DEBUG - DEVICE: [00:00:01.237,000] �[0m<dbg> wdt_mcux_rtwdog: mcux_rtwdog_feed: Fed the watchdog�[0m
2024-12-11 10:55:34,192 - twister - DEBUG - DEVICE: Handled things..ready to reset
2024-12-11 10:55:35,204 - twister - DEBUG - DEVICE: �*** Booting Zephyr OS build v4.0.0-1805-gd00fedc198d3 ***
2024-12-11 10:55:35,206 - twister - DEBUG - DEVICE: Watchdog sample application
2024-12-11 10:55:35,207 - twister - DEBUG - HARNESS:Console:EXPECTED(4/4):'Watchdog sample application'

Port NXP rtwdog driver to Zephyr.

Signed-off-by: Ruijia Wang <[email protected]>
@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch from d00fedc to df51369 Compare December 13, 2024 05:19
RT1180 takes reset event mask feature which should be unmasked when
watch dog is enabled.

Signed-off-by: Ruijia Wang <[email protected]>
Update the NXP HAL revision to include support for building the RTWDOG
driver.

Signed-off-by: Ruijia Wang <[email protected]>
@SuperHeroAbner SuperHeroAbner force-pushed the support-rtwdog-on-rt1180 branch from df51369 to b56b83e Compare December 13, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Watchdog Watchdog DNM This PR should not be merged (Do Not Merge) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants