Commit 0d046666 authored by Daniel DeGrasse's avatar Daniel DeGrasse Committed by David Leach
Browse files

boards: arm: mimxrt1040: enabled PWM

Enabled PWM output on J16.6, using tests/drivers/pwm/pwm_api.
This board does not connect a PWM output to an LED, so only
the PWM testcase was verified to function.

Signed-off-by: default avatarDaniel DeGrasse <daniel.degrasse@nxp.com>
parent 1afe8671
Loading
Loading
Loading
Loading
+4 −0
Changes for boards/arm/mimxrt1040_evk/doc/index.rst: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -91,6 +91,8 @@ already supported, which can also be re-used on this mimxrt1040_evk board:
| UART      | on-chip    | serial port-polling;                |
|           |            | serial port-interrupt               |
+-----------+------------+-------------------------------------+
| PWM       | on-chip    | pwm                                 |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:

@@ -114,6 +116,8 @@ The MIMXRT1040 SoC has five pairs of pinmux/gpio controllers.
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_08 | GPIO            | User LD1                  |
+---------------+-----------------+---------------------------+
| GPIO_AD_B0_10 | FLEXPWM1 PWM3A  | PWM Output                |
+---------------+-----------------+---------------------------+

System Clock
============
+10 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk-pinctrl.dtsi: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,16 @@
#include <nxp/nxp_imx/rt/mimxrt1042xjm5b-pinctrl.dtsi>

&pinctrl {
	/* Route PWM1 A3 to J16, pin 6 on arduino header */
	pinmux_flexpwm1_pwm3: pinmux_flexpwm1_pwm3 {
		group0 {
			pinmux = <&iomuxc_gpio_ad_b0_10_flexpwm1_pwma3>;
			drive-strength = "r0-6";
			slew-rate = "fast";
			nxp,speed = "100-mhz";
		};
	};

	pinmux_lpuart1: pinmux_lpuart1 {
		group0 {
			pinmux = <&iomuxc_gpio_ad_b0_13_lpuart1_rx>,
+7 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk.dts: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
	aliases {
		led0 = &green_led;
		sw0 = &user_button;
		pwm-0 = &flexpwm1_pwm3;
	};

	chosen {
@@ -103,6 +104,12 @@
	pinctrl-names = "default", "sleep";
};

&flexpwm1_pwm3 {
	status = "okay";
	pinctrl-0 = <&pinmux_flexpwm1_pwm3>;
	pinctrl-names = "default";
};

/* GPT and Systick are enabled. If power management is enabled, the GPT
 * timer will be used instead of systick, as allows the core clock to
 * be gated.
+1 −0
Changes for boards/arm/mimxrt1040_evk/mimxrt1040_evk.yaml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -17,3 +17,4 @@ flash: 8192
supported:
  - arduino_gpio
  - gpio
  - pwm