CAT2 Peripheral Driver Library
TrigMux (Trigger Multiplexer)

The trigger multiplexer provides access to the multiplexer that selects a set of trigger output signals from different peripheral blocks to route them to the specific trigger input of another peripheral block. More...

Modules

 Macros
 
 Functions
 
 Enumerated Types
 

Detailed Description

The trigger multiplexer provides access to the multiplexer that selects a set of trigger output signals from different peripheral blocks to route them to the specific trigger input of another peripheral block.

The functions and other declarations used in this driver are in cy_trigmux.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.

The TrigMux driver is based on the trigger multiplexer's hardware block. The Trigger multiplexer block consists of multiple trigger multiplexers. These trigger multiplexers are grouped in trigger groups. All the trigger multiplexers in the trigger group share similar input options.

The trigger architecture of the PSoC device is explained in the technical reference manual (TRM). Refer to the TRM to better understand the trigger multiplexer routing architecture available.

Configuration Considerations

To route a trigger signal from one peripheral in the PSoC to another, the user must configure a reduction multiplexer and a distribution multiplexer. The Cy_TrigMux_Connect is used to configure a trigger multiplexer connection.

The Cy_TrigMux_Connect() function has two main parameters, inTrig and outTrig that refer to the input and output trigger lines connected using the multiplexer. These parameters are represented in the following format:

trigmux_parameter_30.png

All the constants associated with the different trigger signals in the system (input and output) are defined as constants in the device configuration header file.

The constants for TrigMux in the device configuration header file are divided into two types based on the signal being input/output.

The two types of the input/output parameters are:

Refer to the TRM for a more detailed description of this architecture and different options.

The steps to connect one peripheral block to the other:

Step 1. Find the trigger group number in the Trigger Group Inputs section of the device configuration header file that corresponds to the output of the source peripheral block. For example, TRIG0_IN_TCPWM_TR_OVERFLOW0 TrigMux input belongs to Trigger Group 0.

Step 2. Find the same trigger group number in the Trigger Group Outputs section of the device configuration header file that corresponds to the trigger group number found in Step 1. Select the TrigMux output that can be connected to the destination peripheral block. For example, TRIG0_OUT_CPUSS_DMAC_TR_IN0 means that the trigger multiplexer Output 0 of Trigger Group 0 can be connected to the CPUSS channel 0 trigger input

Step 3. Call Cy_TrigMux_Connect() API with the constants for the inTrig and outTrig parameters found in Steps 1 and Step 2. For example:

/* Scenario: Setup a trigger multiplexer connection from TCPWM counter 0 overflow output to CPUSS 0 channel 0 trigger input.
*/
(void)Cy_TrigMux_Connect(TRIG0_IN_TCPWM_TR_OVERFLOW0, TRIG0_OUT_CPUSS_DMAC_TR_IN0);
/* Note: the Cy_TrigMux_Connect return status is ignored here because the provided parameters are correct.
* It is made here just to reduce the code snippet redundancy, it is not recommended to do so in the user code.
*/

More Information

For more information on the TrigMux peripheral, refer to the technical reference manual (TRM).

Changelog

VersionChangesReason for Change
1.0.1 Update the paths to the code snippets. PDL structure update.
1.0 Initial version