Skip to content

Commit c9ce1a7

Browse files
NeilChen93kartben
authored andcommitted
boards: frdm_mcxn236: add ewm support
1. Add EWM Support for frdm_mcxn236 2. verified tests/drivers/watchdog/wdt_basic_reset_none Signed-off-by: Neil Chen <[email protected]>
1 parent 3165633 commit c9ce1a7

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

boards/nxp/frdm_mcxn236/board.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,12 @@ void board_early_init_hook(void)
324324
#endif
325325
#endif
326326

327+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ewm0))
328+
CLOCK_SetupOsc32KClocking(kCLOCK_Osc32kToWake);
329+
CLOCK_AttachClk(kXTAL32K2_to_EWM0);
330+
CLOCK_EnableClock(kCLOCK_Ewm0);
331+
#endif
332+
327333
/* Set SystemCoreClock variable. */
328334
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
329335
}

dts/arm/nxp/nxp_mcxn23x_common.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,14 @@
916916
program-mem = <0x4000000>;
917917
#dma-cells = <0>;
918918
};
919+
920+
ewm0: ewm@C0000 {
921+
compatible = "nxp,ewm";
922+
reg = <0xC0000 0x6>;
923+
status = "disabled";
924+
interrupts = <100 0>;
925+
clk-divider = <0x0>;
926+
};
919927
};
920928

921929
&systick {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright 2025 NXP
3+
#
4+
# SPDX-License-Identifier Apache-2.0
5+
#
6+
CONFIG_TEST_WDT_MAX_WINDOW_TIME=254
7+
CONFIG_TEST_WDT_SLEEP_TIME=68
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright 2025 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
watchdog0 = &ewm0;
9+
};
10+
};
11+
12+
&ewm0 {
13+
status = "okay";
14+
};

0 commit comments

Comments
 (0)