Skip to content

drivers: pwm: Fix build error and capture support bug#104504

Open
FelixWang47831 wants to merge 3 commits intozephyrproject-rtos:mainfrom
nxp-upstream:fix-pwm-undefined-error-2-24
Open

drivers: pwm: Fix build error and capture support bug#104504
FelixWang47831 wants to merge 3 commits intozephyrproject-rtos:mainfrom
nxp-upstream:fix-pwm-undefined-error-2-24

Conversation

@FelixWang47831
Copy link
Contributor

@FelixWang47831 FelixWang47831 commented Feb 25, 2026

  1. Guard input filter functions with feature check
  2. Refactor the PWM capture interrupt handler to properly support all three capture channels (A, B, and X).
  3. Enable test for mimxrt1170_evk_mimxrt1176_cm4

Fixes #104435

Add feature check to ensure these functions are only called when the
hardware supports input filter capture registers.

Update device tree binding documentation to clarify that the
input-filter-count and input-filter-period properties only take
effect when the capture input filter register is available.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
@FelixWang47831 FelixWang47831 force-pushed the fix-pwm-undefined-error-2-24 branch from ce3da0f to c17b1dd Compare February 25, 2026 08:51
@FelixWang47831
Copy link
Contributor Author

This PR fix ##104435

@FelixWang47831 FelixWang47831 marked this pull request as ready for review February 25, 2026 09:33
@zephyrbot zephyrbot added platform: NXP NXP area: Tests Issues related to a particular existing or missing test area: PWM Pulse Width Modulation area: Devicetree Binding PR modifies or adds a Device Tree binding labels Feb 25, 2026
Refactor the PWM capture interrupt handler to properly support all
three capture channels (A, B, and X).

Clear capture FIFOs by reading CVAL registers during enable_capture

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add board overlay file and conf file.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
@FelixWang47831 FelixWang47831 force-pushed the fix-pwm-undefined-error-2-24 branch from c17b1dd to 462d284 Compare February 26, 2026 03:26
@tony-josi
Copy link

tony-josi commented Feb 27, 2026

Thanks for the fix.
Tested this version and FlexPWM with input capture is working for NXP RT1176.
[iomuxc_gpio_ad_00_flexpwm1_pwm0_a --> iomuxc_gpio_ad_01_flexpwm1_pwm0_b]

ref - #104435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree Binding PR modifies or adds a Device Tree binding area: PWM Pulse Width Modulation area: Tests Issues related to a particular existing or missing test platform: NXP NXP

5 participants