Skip to content

Commit 42ed329

Browse files
decsnykartben
authored andcommitted
soc: rw: Clock ctimer if using it for PWM
Clock ctimer if being used for PWM. Otherwise, it not only doesn't work but makes the chip unable to be communicated to by the debugger. Signed-off-by: Declan Snyder <[email protected]>
1 parent 88918da commit 42ed329

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

soc/nxp/rw/soc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,20 @@ __weak __ramfunc void clock_init(void)
261261
RESET_PeripheralReset(kLCDIC_RST_SHIFT_RSTn);
262262
#endif
263263

264-
#ifdef CONFIG_COUNTER_MCUX_CTIMER
265-
#if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ctimer0), nxp_lpc_ctimer, okay))
264+
#if defined(CONFIG_COUNTER_MCUX_CTIMER) || defined(CONFIG_PWM_MCUX_CTIMER)
265+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay))
266266
CLOCK_AttachClk(kSFRO_to_CTIMER0);
267267
#endif
268-
#if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ctimer1), nxp_lpc_ctimer, okay))
268+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay))
269269
CLOCK_AttachClk(kSFRO_to_CTIMER1);
270270
#endif
271-
#if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ctimer2), nxp_lpc_ctimer, okay))
271+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay))
272272
CLOCK_AttachClk(kSFRO_to_CTIMER2);
273273
#endif
274-
#if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ctimer3), nxp_lpc_ctimer, okay))
274+
#if (DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay))
275275
CLOCK_AttachClk(kSFRO_to_CTIMER3);
276276
#endif
277-
#endif /* CONFIG_COUNTER_MCUX_CTIMER */
277+
#endif /* CONFIG_COUNTER_MCUX_CTIMER || CONFIG_PWM_MCUX_CTIMER */
278278

279279
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb_otg)) && \
280280
(CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI)

0 commit comments

Comments
 (0)