Skip to content

Commit 00e8796

Browse files
michallencxiaoxiang781216
authored andcommitted
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>
1 parent ac50b3a commit 00e8796

File tree

3 files changed

+419
-37
lines changed

3 files changed

+419
-37
lines changed

Documentation/platforms/arm/imxrt/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Output on pin B is currently supported only as a complementary option to pin A.
181181
The lower-half of this driver is initialize by calling :c:func:`imxrt_pwminitialize`.
182182

183183
PWM module can be synchronized by an external signal. The external signal used for synchronization
184-
is selected by IMXRT_FLEXPWMx_MODx_SYNC_SRC config option. The number in IMXRT_FLEXPWM4_MOD4_SYNC_SRC
184+
is selected by IMXRT_FLEXPWMx_MODx_SYNC_SRC config option. The number in IMXRT_FLEXPWMx_MODx_SYNC_SRC
185185
corresponds with the XBAR number. Following numbers can be used for synchronization of PWMs with other
186186
PWM module when using iMXRT1020, iMXRT1050 or iMXRT1060.
187187

@@ -221,6 +221,9 @@ iMXRT1170 has different XBAR connections:
221221
- PWM4 Module 3 = 88
222222
- PWM4 Module 4 = 89
223223

224+
Option IMXRT_FLEXPWMx_MODx_TRIG allows the module to generate a trigger signal. The trigger is generated on
225+
timer capture of either period or duty cycle value based on the configuration.
226+
224227
SAI
225228
---
226229

0 commit comments

Comments
 (0)