How to use GPIO ports for DMA triggering

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SuSh_1535366
Level 5
Level 5
Distributor - Macnica (Japan)
10 solutions authored 10 likes given 10 likes received

Hello,

I created a test project using CY8CKIT-062-BLE  BSP and SCB_SPI_Master_DMA Template.

I want to modify it and change the txDma trigger from SCB tx_request to an external trigger using GPIO.

I could easily change this in PSoC Creator, but in modus toolbox I cannot wire from GPIO to DMA request (Trigger Multiplexer).

How can I use GPIO for DMA trigger in modus toolbox?

Regards,

Shimamura

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @SuSh_1535366 

 

You can use the device configurator for configuring the DMA to be triggered by GPIO. Navigate to the quick panel > Tools > Device Configurator and then, choose the DW block. Under the Trigger Input section, you will be able to choose the required trigger mechanism, which also includes GPIOs. 

Hari_0-1650532777004.png

 

 

Note that the GPIO routings are limited and the DW block needs to be chosen such that the GPIO that is needed is supported in that routing. 

 

Best regards, 
Hari

View solution in original post

0 Likes
3 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @SuSh_1535366 

 

You can use the device configurator for configuring the DMA to be triggered by GPIO. Navigate to the quick panel > Tools > Device Configurator and then, choose the DW block. Under the Trigger Input section, you will be able to choose the required trigger mechanism, which also includes GPIOs. 

Hari_0-1650532777004.png

 

 

Note that the GPIO routings are limited and the DW block needs to be chosen such that the GPIO that is needed is supported in that routing. 

 

Best regards, 
Hari

0 Likes
SuSh_1535366
Level 5
Level 5
Distributor - Macnica (Japan)
10 solutions authored 10 likes given 10 likes received

Hello Hari,

Thank you for your answer and sorry for late reply.

Let me ask one more additional question.
In PSoC Creator, I was able to set P6[2] as a DMA trigger input.

SuSh_1535366_0-1652765033779.png


It seemed to be connected to the trigger multiplexer via UDB.
I changed (manually) the trigger condition to edge trigger at the beginning of main().

(void)Cy_TrigMux_Connect(TRIG14_IN_UDB_TR_UDB3, TRIG14_OUT_TR_GROUP0_INPUT49, CY_TR_MUX_TR_INV_DISABLE, TRIGGER_TYPE_LEVEL);
(void)Cy_TrigMux_Connect(TRIG0_IN_TR_GROUP14_OUTPUT6, TRIG0_OUT_CPUSS_DW0_TR_IN0, CY_TR_MUX_TR_INV_DISABLE, TRIGGER_TYPE_UDB_TR_UDB__EDGE);

 

How can I make a similar configuration in Modus toolbox?

Regards,

Shimamura

0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @SuSh_1535366 

 

Yes, similar APIs exist in MTB PDL as well. Please see the Trigger Mux PDL documentation - https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__trigmux__functions.h...

 

Best regards, 
Hari

0 Likes