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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

598 次查看
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.

标签 (1)
0 项奖励
回复
2 回复数

593 次查看
Vipul_Shukla
Contributor I

I have attached my project zip file

 

0 项奖励
回复

335 次查看
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 项奖励
回复