imxrt: add option to select PWM trigger source value from configuration

Current implementation supports the trigger generation only from timer
capture on period value. This is sufficient for PWM synchronization but
may not be enough for other purposes as ADC triggering for example.

This change adds an option to generate the trigger based on a duty
cycle value.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc
2023-02-11 01:07:03 +01:00
committed by Xiang Xiao
parent ac50b3a473
commit 00e87962fd
3 changed files with 419 additions and 37 deletions
+4 -1
View File
@@ -181,7 +181,7 @@ Output on pin B is currently supported only as a complementary option to pin A.
The lower-half of this driver is initialize by calling :c:func:`imxrt_pwminitialize`.
PWM module can be synchronized by an external signal. The external signal used for synchronization
is selected by IMXRT_FLEXPWMx_MODx_SYNC_SRC config option. The number in IMXRT_FLEXPWM4_MOD4_SYNC_SRC
is selected by IMXRT_FLEXPWMx_MODx_SYNC_SRC config option. The number in IMXRT_FLEXPWMx_MODx_SYNC_SRC
corresponds with the XBAR number. Following numbers can be used for synchronization of PWMs with other
PWM module when using iMXRT1020, iMXRT1050 or iMXRT1060.
@@ -221,6 +221,9 @@ iMXRT1170 has different XBAR connections:
- PWM4 Module 3 = 88
- PWM4 Module 4 = 89
Option IMXRT_FLEXPWMx_MODx_TRIG allows the module to generate a trigger signal. The trigger is generated on
timer capture of either period or duty cycle value based on the configuration.
SAI
---