PWM Peripheral Configuration
Map PWM peripherals in the Infineon AURIX model to peripheral registers in the MCU
Since R2022b
Description
View and edit the module and channel settings of PWM peripherals in the Infineon® AURIX™ model.
Using the Peripheral Configuration tool, you can:
View and edit the module and channel of PWM peripherals.
Configure the global parameters. To set the group peripheral, select peripheral in Browser > Peripherals >
PWM
.The PWM Global parameters are available only if more than two PWM blocks are used in the model. For more, see Map Tasks and Peripherals Using Hardware Mapping.
Check for any conflicts between peripherals.

Open the PWM Peripheral Configuration
In the Simulink toolstrip, go to Hardware tab and click Hardware Mapping.
Parameters
Global parameters
Select to enable the PWM sync functionality between two PWM blocks.
Note
Enable sync group functionality parameter is displayed only if more than one PWM block is available in the model.
Enable this parameter only when both the PWM blocks belong to the same module (either Gtm or Egtm).
If you use sync functionality for two blocks PWM1 and PWM2 with same parameter configuration in the hardware mapping window except for the Pulse Alignment parameter set to
Edge aligned
for PWM1 block and the Pulse Alignment parameter set tocentre aligned
for PWM2 block, then the waveform generated by PWM1 block (IO_P02_0_pin=Z) leads the waveform generated by PWM2 block (IO_P02_8_pin=Z).
When you select this option, the dialog box displays the Drive Group and Trigger Group options. Two or more PWM blocks in the model enable these global parameters, since these parameters are implied for sync functionality.
The drive group lists all the PWM blocks used in the model. Select the PWM block from the list.
Dependencies
To enable the Drive Group parameter, select the Enable sync group functionality parameter.
The trigger group lists all the PWM blocks used in the model. Select the PWM block from the list.
The PWM generated from the trigger block syncs with the PWM generated from the drive block.
Dependencies
To enable the Trigger Group parameter, select the Enable sync group functionality parameter.
Module
Select the generic timer module (Gtm) or enhanced generic timer (Egtm) module.
Select the Timer Output Module (TOM) or ARU-connected Timer Output Module (ATOM) timer submodule.
Select the timer unit for PWM.
For example, TOM0
, 0 represents the cluster number.
Dependencies
The Timer Unit options depends on the selection of Timer submodule. If TOM is set as Timer submodule, then the Timer unit list TOM# options. If ATOM is set as Timer submodule, then the Timer unit list ATOM# options.
Select On
to enable the high resolution PWM.
Dependencies
High-Resolution PWM parameter is disabled and Read-only. You
can enable this parameter when the Module parameter is set to
EGTM
and Timer submodule is set to
ATOM
.
Select this parameter to enable high resolution for the dead-time parameter.
Dependencies
To enable this parameter set Module to
EGTM
and Timer submodule to
ATOM
.
Select the PWM clock configuration. The PWM clock configuration parameters lists all the fixed clock and CMU clock options.
For example, if you select Module as Gtm
and Timer submodule as
TOM
, the clock configuration divider is represented as
IfxGtm_Cmu_Fxclk
. When you select Timer submodule as
ATOM
, the clock configuration divider is represented as
IfxGtm_Cmu_clk
. Similarly, for Module Egtm, the clock configuration
divider is either IfxEgtm_Cmu_Fxclk
or
IfxEgtm_Cmu_clk
.
For TOM modules there are five different divide values based on the selection and for ATOM there are eight different selections of clock configuration.
TOM
- FXCLK Divider 0 (20), FXCLK Divider 1 (24), FXCLK Divider 2 (28), FXCLK Divider 3 (212), and FXCLK Divider 4 (216)ATOM
- CMUCLK Divider 0 (20), CMUCLK Divider 1 (21), CMUCLK Divider 2 (22), CMUCLK Divider 3 (23), CMUCLK Divider 4 (24), CMUCLK Divider 5 (25), CMUCLK Divider 6 (26), and CMUCLK Divider 7 (27).
Dependencies
Clock configuration depends on the selection made in Module and Timer submodule.
If TOM submodule is selected, then fixed clocks are displayed.
If ATOM is selected, then configurable CMU clocks are displayed.
Specify the initial frequency (Hz) for PWM.
Select the pulse alignment for PWM.
Select edge aligned if you want to generate edge aligned PWM pulse.
Select center aligned if you want to generate symmetric center aligned PWM pulse.
Enable this parameter to synchronously update duty for all sync channels.
Enable this parameter to synchronously update frequency for all sync channels.
Dependencies
To enable this parameter, select Enable frequency input parameter in the PWM block.
Enable this parameter to synchronously update phase for all sync channels.
Dependencies
To enable this parameter, select Enable phase input parameter in the PWM block.
Enable this parameter to synchronously update dead time for all sync channels. This parameter is read-only.
Dependencies
To enable this parameter, select Enable dead time properties input parameter in the PWM block.
Specify the type of interrupt event for the PWM as one of these options.
None—
Select this option when you do not want to specify an interrupt event.Period Interrupt—
Select this option to specify an interrupt event at the end of every period.Selecting this option also enables the read-only parameter Period Event source name, which provides information on the source of the period interrupt. The source depends onModule, Timer submodule, and Timer unit parameters. You can map the name in the tasks (CPU1).
Duty Interrupt—
Select this option to enable an interrupt at the start of every duty cycle.
Specify the duty event based on the module and channel pair.
Channel pairs such as channel 0 and channel 1, channel 2 and channel 3, …. , channel
14 and channel 15, share same duty event sources. For example, if you select the
Gtm
Module and the channel 0 and
channel 1 pair, the available duty options are:
IfxGtm_Pwm_SubModule_Ch_0
IfxGtm_Pwm_SubModule_Ch_1
If you select the IfxGtm_Pwm_SubModule_Ch_0
event, the
block enables the read-only Duty Event source name parameter in
Channel 0 tab.
Note
To select the duty event for the channel pairs, set the Number of
outputs parameter in the PWM block appropriately. For example, set the
Number of outputs parameter in the PWM block as
13
to use the Duty event for channel 12 and
channel 13.
Dependencies
To enable this parameter, set Interrupt Type to
Duty Interrupt
.
DTM > DTM # - TOM(ATOM) Channels # to #
Specify the source of fast-shut-off for DTM
Options vary based on the values of other parameters. The available options depend on:
Module selected in the module tab (Gtm or Egtm)
Timer Submodule (TOM or ATOM)
Timer unit (TOM# or ATOM#)
Select the trigger source for fast-shut-off of the DTM.
The default value vary based on the value of Fast shut off using parameter.
Note
Ensure that you have configured the appropriate ADC boundary flag in the Boundary tab of DSADC Peripheral Configuration.
Dependencies
To enable this parameter, set the Fast shut off using
parameter to Auxiliary Input#
or
Tim_Input#
.
Select pin number for trigger source.
Note
The trigger source pin must be held low or high based on the fast shut off configuration.
If you disable the Invert input signal parameter, PWM shuts off when pin is active high.
If you enable the Invert input signal parameter, PWM shuts off when pin is active low.
Dependencies
To enable this parameter, set the Trigger source parameter to
General purpose pin
.
Output #
The number of channel(s) selected in the PWM block will appear in their respective channel tabs of the PWM peripheral. Each of these channels must be configured respectively.
Dependencies
The channel # list depends on
Module selected in the module tab (Gtm or Egtm)
Timer Submodule (TOM or ATOM)
Timer unit (TOM# or ATOM#)
Select the PWM output pin channel.
Dependencies
The Output pin # list depends on
Module selected in the module tab (Gtm or Egtm)
Timer Submodule (TOM or ATOM)
Timer unit (TOM# or ATOM#)
Channel
Select the output mode for the PWM pin(s).
Select the pin speed.
Select the pin voltage level.
Select the signal polarity of PWM channel.
Specify the PWM initial duty cycle in percentage. Range varies from 0-100%.
Specify the initial offset in radians.
Select the signal to trigger the QSPI module from the PWM channel.
To trigger QSPI module, set the Trigger source parameter to
Hardware trigger
and Source of hardware
trigger to GTM
or
eGTM
in the corresponding Module tab
of QSPI Hardware Mapping window.
For more information on QSPI trigger signals corresponding to the
GTM
module, see QSPI Trigger Signals Corresponding to GTM Module.
For more information on QSPI trigger signals corresponding to the
eGTM
module, see QSPI Trigger Signals Corresponding to eGTM.
The QSPI Trigger Signal list depends on:
Source of hardware trigger in the QSPI module tab (
GTM
oreGTM
)Timer Submodule in the PWM module tab (
TOM
orATOM
)Timer unit in the PWM module tab
Channel
Note
You must have a QSPI block in the model to trigger the QSPI module. You can trigger multiple QSPI modules by configuring them in different QSPI blocks.
Enables the complementary output for PWM.
Select the PWM complementary output pin.
Dependencies
To enable the Complementary output pin parameter, select the Enable complementary output parameter.
Select the signal polarity of complementary pin.
Dependencies
To enable the Signal polarity of complementary pin parameter, select the Enable complementary output parameter.
Enables the dead time insertion.
For more information on standard dead time generation, see Dead-Time Module Properties.
Dependencies
To enable the Enable Dead Time Module parameter, select the Enable complementary output parameter.
Specify the PWM dead time for rising edge(s) in seconds.
For more information on standard dead time generation, see Dead-Time Module Properties.
Dependencies
To enable the Dead-time for rising edge(s) parameter, select the Enable Dead time insertion parameter.
Specify the PWM dead time for falling edge(s) in seconds.
For more information on standard dead time generation, see Dead-Time Module Properties.
Dependencies
To enable the Dead-time for falling edge(s) parameter, select the Enable Dead time insertion parameter.
Enable this parameter to trigger ADC conversion at the end of every period.
Note
You must have an ADC block in the model to trigger ADC conversion.
Select the number of ADC trigger channels.
Dependencies
To enable the Number of trigger channels parameter, select the ADC trigger parameter.
Select the ADC trigger signal channel.
Dependencies
To enable the Trigger channel# parameter, select the ADC trigger parameter.
Number of trigger channels list depends on the timer module selected.
Fast shut off
Enable this parameter to trigger the fast-shut-off of PWM channel.
Dependencies
To enable the Enable fast shut off trigger parameter, select the Enable complementary output and Enable Dead Time Moduleparameters.
Select to invert the input signal of the PWM channels. This specifies the condition for the PWM shut off, either when transitioning from low to high (default) or from high to low. By enabling Invert input signal, you set the PWM to shut off as the value at Pin in DTM tab transitions from high to low.
Dependencies
To enable the Invert input signal parameter, select the Enable fast shut off trigger parameter.
Specify the output polarity when fast shut off is active.
Dependencies
To enable the Output polarity when fast shut off is active parameter, select the Enable fast shut off trigger parameter.
Specify the complementary output polarity when fast shut off is active.
Dependencies
To enable the Output polarity when fast shut off is active parameter, select the Enable fast shut off trigger parameter.
ADC Trigger
Enable this parameter to trigger ADC conversion at the end of every period.
Note
You must have an ADC block in the model to trigger ADC conversion.
Select the number of ADC trigger channels.
Dependencies
To enable the Number of trigger channels parameter, select the ADC trigger parameter.
Select the ADC trigger signal channel.
Dependencies
To enable the Trigger channel# parameter, select the ADC trigger parameter.
Number of trigger channels list depends on the timer module selected.
SENT trigger
Enable this parameter to trigger SENT transmission at the end of every period.
To trigger SENT module, set the Trigger source parameter to
Hardware trigger
and select Source of hardware
trigger in the corresponding SPC Protocol tab of SENT
Configuration window.
The Sent trigger signal list depends on:
Source of hardware trigger (
GTM
oreGTM
)Timer Submodule (
TOM
orATOM
)Timer unit
Module | Timer unit | Sent trigger signal |
eGTM | TOM0/ATOM0 | Sent_TriggerSignal_0 |
TOM1/ATOM1 | Sent_TriggerSignal_1 | |
ATOM2 | Sent_TriggerSignal_2 | |
GTM | TOM0/ATOM0 | Sent_TriggerSignal_3 |
TOM1/ATOM1 | Sent_TriggerSignal_4 | |
TOM2/ATOM2 | Sent_TriggerSignal_5 | |
TOM3/ATOM3 | Sent_TriggerSignal_6 | |
TOM4/ATOM4 | Sent_TriggerSignal_7 | |
TOM5/ATOM5 | Sent_TriggerSignal_8 | |
ATOM6 | Sent_TriggerSignal_9 | |
ATOM7 | Sent_TriggerSignal_10 | |
ATOM8 | Sent_TriggerSignal_11 | |
ATOM9 | Sent_TriggerSignal_12 | |
ATOM10 | Sent_TriggerSignal_13 | |
ATOM11 | Sent_TriggerSignal_14 |
Note
You must have a SENT block in the model to trigger the SENT module. You can trigger multiple SENT modules by configuring them in different SENT blocks.
Select the SENT trigger modules.
More About
If you set the Source of hardware trigger parameter in QSPI
Module tab to GTM
, then the signal you use
to trigger the QSPI module depends on the timer unit and PWM channel you select in the
Timer unit and channel parameters, respectively.
For example, the combination (A#, C#) represents (ATOM #
,
IfxGtm_Pwm_SubModule_Ch_#
) and (T#, C#) represents
(TOM #
,
IfxGtm_Pwm_SubModule_Ch_#
).
To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_0
, you must have one of these timer unit and channel combinations: (A0, C7), (A1, C7), (A2, C7), (A0, C0), (A1, C0), (A2, C0), (A3, C7), (A4, C7), (A5, C7), (A5, C7), (A6, C7), (A7, C7), (A8, C7), (A9, C7), (A10, C7), (A11, C7), (A3, C0), (A4, C0), (A5, C0), (A6, C0), (T0, C5), (T1, C5), (T0, C8), (T1, C8), (T2, C15), (T3, C15), (T4, C15), (T5, C15), (T2, C 8), (T3, C8), (T4, C8), (T5, C8).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_1
, you must have one of these timer unit and channel combinations: (A0, C16), (A1, C16), (A2, C16), (A0, C1), (A1, C1), (A2, C1), (A3, C6), (A4, C6), (A5, C6), (A6, C6), (A7, C6), (A8, C6), (A9, C6), (A10, C6), (A11, C6), (A3, C1), (A4, C1), (A5, C1), (A6, C1), (T0, C14), (T1, C14), (T0, C9), (T1, C9), (T2, C14), (T3, C14), (T4, C14), (T5, C14), (T2, C 9), (T3, C9), (T4, C9), (T5, C9).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_2
, you must have one of these timer unit and channel combinations: (A0, C5), (A1, C5), (A2, C5), (A0, C2), (A1, C2), (A2, C2), (A3, C5), (A4, C5), (A5, C5), (A6, C5), (A7, C5), (A8, C5), (A9, C5), (A10, C5), (A11, C5), (A3, C2), (A4, C2), (A5, C2), (A6, C2), (T0, C13), (T1, C13), (T0, C10), (T1, C10), (T2, C13), (T3, C13), (T4, C13), (T5, C13), (T2, C10), (T3, C10), (T4, C10), (T5, C10)To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_3
, you must have one of these timer unit and channel combinations: (A0, C4), (A1, C4), (A2, C4), (A0, C3), (A1, C3), (A2, C3), (A3, C4), (A4, C4), (A5, C4), (A6, C4), (A7, C4), (A8, C4), (A9, C4), (A10, C4), (A11, C4), (A3, C3), (A4, C3), (A5, C3), (A6, C3), (T0, C12), (T1, C12), (T0, C11), (T1, C11), (T2, C12), (T3, C12), (T4, C12), (T5, C12), (T2, C11), (T3, C11), (T4, C11), (T5, C11).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_4
, you must have one of these timer unit and channel combinations: (A0, C3), (A1, C3), (A2, C3), (A0, C4), (A1, C4), (A2, C4), (A3, C3), (A4, C3), (A5, C3), (A6, C3), (A7, C3), (A8, C3), (A9, C3), (A10, C3), (A11, C3), (A3, C4), (A4, C4), (A5, C4), (A6, C4), (T0, C11), (T1, C11), (T0, C11), (T1, C11), (T2, C11), (T3, C11), (T4, C11), (T5, C11), (T2, C12), (T3, C12), (T4, C12), (T5, C12).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_5
, you must have one of these timer unit and channel combinations: (A0, C2), (A1, C2), (A2, C2), (A0, C5), (A1, C5), (A2, C5), (A3, C2), (A4, C2), (A5, C2), (A6, C2), (A7, C2), (A8, C2), (A9, C2), (A10, C2), (A11, C2), (A3, C5), (A4, C5), (A5, C5), (A6, C5), (T0, C10), (T1, C10), (T0, C13), (T1, C13), (T2, C10), (T3, C10), (T4, C10), (T5, C10), (T2, C13), (T3, C13), (T4, C13), (T5, C13).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_6
, you must have one of these timer unit and channel combinations: (A0, C1), (A1, C1), (A2, C1), (A0, C6), (A1, C6), (A2, C6), (A3, C1), (A4, C1), (A5, C1), (A6, C1), (A7, C1), (A8, C1), (A9, C1), (A10, C1), (A11, C1), (A3, C6), (A4, C6), (A5, C6), (A6, C5), (T0, C9), (T1, C9), (T0, C14), (T1, C14), (T2, C9), (T3, C9), (T4, C9), (T5, C9), (T2, C14), (T3, C14), (T4, C14), (T5, C14).To set the QSPI Trigger Signal parameter to
IfxGtm_cfg_QspiTriggerSignal_7
, you must have one of these timer unit and channel combinations: (A0, C0), (A1, C0), (A2, C0), (A0, C7), (A1, C7), (A2, C7), (A3, C0), (A4, C0), (A5, C0), (A6, C0), (A7, C0), (A8, C0), (A9, C0), (A10, C0), (A11, C0), (A3, C7), (A4, C7), (A5, C7), (A6, C7), (T0, C8), (T1, C8), (T0, C15), (T1, C15), (T2, C8), (T3, C8), (T4, C8), (T5, C8), (T2, C15), (T3, C15), (T4, C15), (T5, C15).
Note
The QSPI Trigger Signal parameter remains disabled in the block dialog box if you do not select one of these timer unit and channel combinations.
If you set the Source of hardware trigger in QSPI
Module tab to eGTM
, then the signal you
use to trigger the QSPI module depends on the timer unit and PWM channel you select in the
Timer unit and channel parameters, respectively.
For example, the combination (A#, C#) represents (ATOM #
,
IfxEgtm_Pwm_SubModule_Ch_#
) and (T#, C#) represents
(TOM #
,
IfxEgtm_Pwm_SubModule_Ch_#
).
To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_0
, you must have one of these timer unit and channel combinations: (A0, C7), (A1, C7),(A2, C7), (A0, C0), (A1, C0), (A2, C0), (T0, C15), (T1, C15), (T0, C8), (T1, C8).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_1
, you must have one of these timer unit and channelcombinations: (A0, C6), (A1, C6),(A2, C6), (A0, C1), (A1, C1), (A2, C1), (T0, C14), (T1, C14), (T0, C9), (T1, C9).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_2
, you must have one of these timer unit and channel combinations: (A0, C5), (A1, C5),(A2, C5), (A0, C2), (A1, C2), (A2, C2), (T0, C13), (T1, C13), (T0, C10), (T1, C10).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_3
, you must have one of these timer unit and channel combinations: (A0, C4), (A1, C4),(A2, C4), (A0, C3), (A1, C3), (A2, C3), (T0, C12), (T1, C12), (T0, C11), (T1, C11).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_4
, you must have one of these timer unit and channel combinations: (A0, C3), (A1, C3),(A2, C3), (A0, C4), (A1, C4), (A2, C4), (T0, C11), (T1, C11), (T0, C12), (T1, C12).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_5
, you must have one of these timer unit and channel combinations: (A0, C2), (A1, C2),(A2, C2), (A0, C5), (A1, C5), (A2, C5), (T0, C10), (T1, C10), (T0, C13), (T1, C13).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_6
, you must have one of these timer unit and channel combinations: (A0, C1), (A1, C1),(A2, C1), (A0, C6), (A1, C6), (A2, C6), (T0, C9), (T1, C9), (T0, C14), (T1, C14).To set the QSPI Trigger Signal parameter to
IfxEgtm_cfg_QspiTriggerSignal_7
, you must have one of these timer unit and channel combinations: (A0, C0), (A1, C0),(A2, C0), (A0, C7), (A1, C7), (A2, C7), (T0, C8), (T1, C8), (T0, C15), (T1, C15).
Note
The QSPI Trigger Signal parameter remains disabled in the block dialog box if you do not select one of these timer unit and channel combinations.
Follow these steps to use the dead-time functionality:
Select the Enable dead time properties input parameter in the block to configure the
dtm_rise
anddtm_fall
input ports.Select the Enable complementary output parameter Hardware Mapping window corresponding to that channel you have selected to configure the Enable dead time insertion, Dead-time for rising edge(s), and Dead-time for falling edge(s) parameters.
To enable the High-Resolution for dead time parameter, in the Module tab of the Hardware Mapping window, set the Module parameter to
EGTM
and the Timer submodule parameter toATOM
.
Version History
Introduced in R2022b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)