boards: arm: frdm_k64f: enable FlexTimer 0 as PWM
Enable FlexTimer 0 (FTM0) as PWM and setup PTC1 as FTM0 channel 0 for use in PWM loopback test. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
38279ef365
commit
54fed42f23
2 changed files with 13 additions and 1 deletions
|
@ -134,6 +134,12 @@ arduino_spi: &spi0 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&ftm0 {
|
||||
status = "okay";
|
||||
compatible = "nxp,kinetis-ftm-pwm";
|
||||
#pwm-cells = <3>;
|
||||
};
|
||||
|
||||
&ftm3 {
|
||||
status = "okay";
|
||||
compatible = "nxp,kinetis-ftm-pwm";
|
||||
|
|
|
@ -122,7 +122,13 @@ static int frdm_k64f_pinmux_init(const struct device *dev)
|
|||
pinmux_pin_set(portb, 10, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog));
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm3), nxp_kinetis_ftm_pwm, okay) && CONFIG_PWM
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm0), nxp_kinetis_ftm_pwm, okay) \
|
||||
&& CONFIG_PWM
|
||||
pinmux_pin_set(portc, 1, PORT_PCR_MUX(kPORT_MuxAlt4));
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(ftm3), nxp_kinetis_ftm_pwm, okay) \
|
||||
&& CONFIG_PWM
|
||||
pinmux_pin_set(portc, 8, PORT_PCR_MUX(kPORT_MuxAlt3));
|
||||
pinmux_pin_set(portc, 9, PORT_PCR_MUX(kPORT_MuxAlt3));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue