LPC845 DMA write to GPIO fails

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

LPC845 DMA write to GPIO fails

跳至解决方案
365 次查看
phatpaul
Contributor III

It seems LPC845 DMA cannot write GPIO at 0xA0000000

I get DMA0 ->ERRINT=1 when trying to do the GPIO write.

As troublehooting step, I changed the dest address to RAM and do not get the ERRINTflag. 

I have not been able to find a definitive source to say if this is truly impossible.

I did find a reference which is not definitive but hints that this might be the case:
https://community.nxp.com/t5/LPC-Microcontrollers/Lpc-824-DMA-to-GPIO/m-p/650903

Can someone please confirm?

0 项奖励
回复
1 解答
250 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @phatpaul 

Thanks for your question.

Yes, the LPC845 DMA controller cannot write directly to the GPIO register space at address 0xA0000000. The GPIO peripheral is connected through the Cortex-M0+ I/O bus for fast CPU access, whereas the DMA controller accesses memories and supported peripherals through the AHB/APB bus infrastructure.

In addition, the LPC845 datasheet states that:

"The DMA controller can access all memories and the USART, SPI, I2C, DAC, and Capacitive Touch."

GPIO is not listed among the peripherals accessible by DMA. Therefore, DMA transfers to the GPIO register space are not supported and will generate a transfer error (ERRINT), which is consistent with the behavior you observed.

Alice_Yang_0-1783237995511.png

 

Thank you.

 

BR

Alice

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
251 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @phatpaul 

Thanks for your question.

Yes, the LPC845 DMA controller cannot write directly to the GPIO register space at address 0xA0000000. The GPIO peripheral is connected through the Cortex-M0+ I/O bus for fast CPU access, whereas the DMA controller accesses memories and supported peripherals through the AHB/APB bus infrastructure.

In addition, the LPC845 datasheet states that:

"The DMA controller can access all memories and the USART, SPI, I2C, DAC, and Capacitive Touch."

GPIO is not listed among the peripherals accessible by DMA. Therefore, DMA transfers to the GPIO register space are not supported and will generate a transfer error (ERRINT), which is consistent with the behavior you observed.

Alice_Yang_0-1783237995511.png

 

Thank you.

 

BR

Alice

 

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2389301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC845%20DMA%20%E5%86%99%E5%85%A5%20GPIO%20%E5%A4%B1%E8%B4%A5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ELPC845%20DMA%20%E4%BC%BC%E4%B9%8E%E6%97%A0%E6%B3%95%E5%86%99%E5%85%A5%200xA0000000%20%E7%9A%84%20GPIO%20%E5%9C%B0%E5%9D%80%E3%80%82%3C%2FP%3E%3CP%3E%E5%B0%9D%E8%AF%95%E8%BF%9B%E8%A1%8C%20GPIO%20%E5%86%99%E5%85%A5%E6%97%B6%EF%BC%8C%E5%87%BA%E7%8E%B0%20DMA0%20-%26gt%3B%20ERRINT%3D1%20%E9%94%99%E8%AF%AF%E3%80%82%3C%2FP%3E%3CP%3E%E4%BD%9C%E4%B8%BA%E6%95%85%E9%9A%9C%E6%8E%92%E9%99%A4%E6%AD%A5%E9%AA%A4%EF%BC%8C%E6%88%91%E5%B0%86%E7%9B%AE%E6%A0%87%E5%9C%B0%E5%9D%80%E6%9B%B4%E6%94%B9%E4%B8%BA%20RAM%EF%BC%8C%E5%B9%B6%E4%B8%94%E6%B2%A1%E6%9C%89%E6%94%B6%E5%88%B0%20ERRINT%20%E6%A0%87%E5%BF%97%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E8%BF%98%E6%B2%A1%E6%9C%89%E6%89%BE%E5%88%B0%E7%A1%AE%E5%87%BF%E7%9A%84%E8%B5%84%E6%96%99%E6%9D%A5%E8%AF%81%E6%98%8E%E8%BF%99%E6%98%AF%E5%90%A6%E7%9C%9F%E7%9A%84%E4%B8%8D%E5%8F%AF%E8%83%BD%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E7%A1%AE%E5%AE%9E%E6%89%BE%E5%88%B0%E4%BA%86%E4%B8%80%E4%BB%BD%E8%B5%84%E6%96%99%EF%BC%8C%E8%99%BD%E7%84%B6%E5%B9%B6%E4%B8%8D%E7%A1%AE%E5%87%BF%EF%BC%8C%E4%BD%86%E6%9A%97%E7%A4%BA%E6%83%85%E5%86%B5%E5%8F%AF%E8%83%BD%E5%A6%82%E6%AD%A4%EF%BC%9A%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FLPC-Microcontrollers%2FLpc-824-DMA-to-GPIO%2Fm-p%2F650903%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FLPC-Microcontrollers%2FLpc-824-DMA-to-GPIO%2Fmp%2F650903%3C%2FA%3E%3C%2FP%3E%3CP%3E%E8%AF%B7%E9%97%AE%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E7%A1%AE%E8%AE%A4%E4%B8%80%E4%B8%8B%E5%90%97%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2390738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC845%20DMA%20write%20to%20GPIO%20fails%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2390738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F104815%22%20target%3D%22_blank%22%3E%40phatpaul%3C%2FA%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3E%E8%B0%A2%E8%B0%A2%E4%BD%A0%E7%9A%84%E6%8F%90%E9%97%AE%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%98%AF%E7%9A%84%EF%BC%8CLPC845%20DMA%20%E6%8E%A7%E5%88%B6%E5%99%A8%E4%B8%8D%E8%83%BD%E7%9B%B4%E6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%AE%BE%E5%88%97%E8%A1%A8%E4%B8%AD%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E4%B8%8D%E6%94%AF%E6%8C%81%E5%90%91%20GPIO%20%E5%AF%84%E5%AD%98%E5%99%A8%E7%A9%BA%E9%97%B4%E8%BF%9B%E8%A1%8C%20DMA%20%E4%BC%A0%E8%BE%93%EF%BC%8C%E5%B9%B6%E4%B8%94%E4%BC%9A%E4%BA%A7%E7%94%9F%E4%BC%A0%E8%BE%93%E9%94%99%E8%AF%AF%20(ERRINT)%EF%BC%8C%E8%BF%99%E4%B8%8E%E6%82%A8%E8%A7%82%E5%AF%9F%E5%88%B0%E7%9A%84%E8%A1%8C%E4%B8%BA%E4%B8%80%E8%87%B4%E3%80%82%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Alice_Yang_0-1783237995511.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Alice_Yang_0-1783237995511.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F391246i878D588FCD40A736%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Alice_Yang_0-1783237995511.png%22%20alt%3D%22Alice_Yang_0-1783237995511.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3E%E7%88%B1%E4%B8%BD%E4%B8%9D%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E