Skip to content

Conversation

FelixWang47831
Copy link
Contributor

1. Enable PWM capture for QTMR driver
2. Fix qtmr set cycles bug, which can not generate 100% and 0% duty cycle PWM wave
3. Improve pwm_loopback to support change timing parameters from kconfig
4. Enable qtmr test cases, including pwm_api, pwm_loopback.

Add mimxrt1180_evk_mimxrt1189_cm33_qtmr.overlay for test.

Signed-off-by: Felix Wang <[email protected]>
Supported mode: single capture, continus capture,
pulse capture, period capture.

Signed-off-by: Felix Wang <[email protected]>
The mcux_qtmr_pwm_set_cycles can not set 100% and 0%
duty cycle PWM wave.
Set output compare setting based on pulse_cycles and
period_cycles:
1. If pulse_cycles is 0, generate 0% duty cycle wave.
2. If pulse_cycles equals period_cycles but not 0,
   generate 100% duty cycle wave.
3. Otherwise toggle output when compare value matched.

Signed-off-by: Felix Wang <[email protected]>
Move TEST_PWM_PERIOD and TEST_PWM_PULSE to kconfig
and update macro name with "CONFIG_" prefix.

The default timing parameters may be too big for timer
peripheral, because they have high frequence, can not
generate such slow PWM wave.

To keep compatibility, the default value in kconfig
are consistent with the code.

Signed-off-by: Felix Wang <[email protected]>
Provide kconfig conf file to set timing parameters.
Provide overlay file for QTMR channel and pin configuration.

Signed-off-by: Felix Wang <[email protected]>
Copy link

@FelixWang47831 FelixWang47831 marked this pull request as ready for review October 16, 2025 14:22
@zephyrbot zephyrbot added platform: NXP NXP area: PWM Pulse Width Modulation area: Tests Issues related to a particular existing or missing test labels Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: PWM Pulse Width Modulation area: Tests Issues related to a particular existing or missing test platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants