Skip to content

Commit 9941902

Browse files
NeilChen93kartben
authored andcommitted
boards: nxp: frdm_mcxa153: Support wwdt for NXP frdm_mcxa153 board
Support watchdog for NXP frdm_mcxa153 board. Test it using samples/drivers/watchdog. Signed-off-by: Neil Chen <[email protected]>
1 parent 94a04a8 commit 9941902

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

boards/nxp/frdm_mcxa153/board.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ void board_early_init_hook(void)
189189
RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn);
190190
#endif
191191

192+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
193+
CLOCK_SetClockDiv(kCLOCK_DivWWDT0, 1u);
194+
#endif
195+
192196
/* Set SystemCoreClock variable. */
193197
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
194198
}

boards/nxp/frdm_mcxa153/frdm_mcxa153.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
sw0 = &user_button_2;
2323
sw1 = &user_button_3;
2424
pwm-0 = &flexpwm0_pwm0;
25+
watchdog0 = &wwdt0;
2526
ambient-temp0 = &p3t1755;
2627
};
2728

@@ -183,3 +184,7 @@
183184
pinctrl-0 = <&pinmux_lpuart2>;
184185
pinctrl-names = "default";
185186
};
187+
188+
&wwdt0 {
189+
status = "okay";
190+
};

boards/nxp/frdm_mcxa153/frdm_mcxa153.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ supported:
2424
- pwm
2525
- spi
2626
- uart
27+
- watchdog
2728
vendor: nxp

0 commit comments

Comments
 (0)