Using dma to update gpio->ptor register does not work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using dma to update gpio->ptor register does not work

642 Views
Vipul_Shukla
Contributor I

I am trying to configure dma to toggle gpio pin using ptor register for that gpio but even after the dma transfer is done the pin is not toggled. DMA is trig match events. I am using frdmmcxn947 board. 

If I am trying to transfer to a local buffer then the transfer is working as expected but if I change the destination address to GPIO2->PTOR register or even PDOR register then it is not working.

Labels (1)
0 Kudos
Reply
2 Replies

637 Views
Vipul_Shukla
Contributor I

I have attached my project zip file

 

0 Kudos
Reply

379 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Vipul_Shukla 

I checked your code.

    EDMA_PrepareTransferConfig(&transferConfig1, &data, 4, 0, (void*)&GPIO2->PDOR, 4, 0, 4, 4);

You used the PDOR register.

You can check the GPIO_PortToggle.

Harry_Zhang_0-1745381102771.png

It use PTOR, not PDOR.

So you should change it to PTOR.

BR

Harry

0 Kudos
Reply