Skip to content

Commit d3df8db

Browse files
boards: arm: twr_ke18f: add pinmux configuration for PWT testing
Add pinmux configuration for testing the NXP Kinetis Pulse Width Timer (PWT) in loopback mode. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 084c6c8 commit d3df8db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

boards/arm/twr_ke18f/pinmux.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ static int twr_ke18f_pinmux_init(const struct device *dev)
4545
pinmux_pin_set(portd, 16, PORT_PCR_MUX(kPORT_MuxAsGpio));
4646
#endif
4747

48+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm2), nxp_kinetis_ftm_pwm, okay) && CONFIG_PWM
49+
/* PWM output on J20 pin 5 */
50+
pinmux_pin_set(porte, 15, PORT_PCR_MUX(kPORT_MuxAlt4));
51+
#endif
52+
4853
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm3), nxp_kinetis_ftm_pwm, okay) && CONFIG_PWM
4954
/* User LEDs as PWM */
5055
pinmux_pin_set(portc, 10, PORT_PCR_MUX(kPORT_MuxAlt2));
@@ -59,6 +64,11 @@ static int twr_ke18f_pinmux_init(const struct device *dev)
5964
pinmux_pin_set(portc, 13, PORT_PCR_MUX(kPORT_MuxAsGpio));
6065
#endif
6166

67+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwt), okay) && CONFIG_PWM_CAPTURE
68+
/* PWM capture input on J20 pin 8 */
69+
pinmux_pin_set(porte, 11, PORT_PCR_MUX(kPORT_MuxAlt2));
70+
#endif
71+
6272
/* Buttons */
6373
pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAsGpio));
6474
pinmux_pin_set(portd, 6, PORT_PCR_MUX(kPORT_MuxAsGpio));

0 commit comments

Comments
 (0)