Skip to content

Commit

Permalink
boards: arm: twr_ke18f: add pinmux configuration for PWT testing
Browse files Browse the repository at this point in the history
Add pinmux configuration for testing the NXP Kinetis Pulse Width Timer
(PWT) in loopback mode.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
  • Loading branch information
henrikbrixandersen authored and MaureenHelm committed Jan 20, 2021
1 parent 6b285de commit ab5b13b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boards/arm/twr_ke18f/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ static int twr_ke18f_pinmux_init(const struct device *dev)
pinmux_pin_set(portd, 16, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif

#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm2), nxp_kinetis_ftm_pwm, okay) && CONFIG_PWM
/* PWM output on J20 pin 5 */
pinmux_pin_set(porte, 15, PORT_PCR_MUX(kPORT_MuxAlt4));
#endif

#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm3), nxp_kinetis_ftm_pwm, okay) && CONFIG_PWM
/* User LEDs as PWM */
pinmux_pin_set(portc, 10, PORT_PCR_MUX(kPORT_MuxAlt2));
Expand All @@ -59,6 +64,11 @@ static int twr_ke18f_pinmux_init(const struct device *dev)
pinmux_pin_set(portc, 13, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif

#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwt), okay) && CONFIG_PWM_CAPTURE
/* PWM capture input on J20 pin 8 */
pinmux_pin_set(porte, 11, PORT_PCR_MUX(kPORT_MuxAlt2));
#endif

/* Buttons */
pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(portd, 6, PORT_PCR_MUX(kPORT_MuxAsGpio));
Expand Down

0 comments on commit ab5b13b

Please sign in to comment.