LPC845 DMA write to GPIO fails

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

LPC845 DMA write to GPIO fails

Jump to solution
206 Views
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 Kudos
Reply
1 Solution
91 Views
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

 

View solution in original post

0 Kudos
Reply
1 Reply
92 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2389301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC845%20DMA%20write%20to%20GPIO%20fails%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2389301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20seems%20LPC845%20DMA%20cannot%20write%20GPIO%20at%200xA0000000%3C%2FP%3E%3CP%3EI%20get%20DMA0%20-%26gt%3BERRINT%3D1%20when%20trying%20to%20do%20the%20GPIO%20write.%3C%2FP%3E%3CP%3EAs%20troublehooting%20step%2C%20I%20changed%20the%20dest%20address%20to%20RAM%20and%20do%20not%20get%20the%20ERRINTflag.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20not%20been%20able%20to%20find%20a%20definitive%20source%20to%20say%20if%20this%20is%20truly%20impossible.%3C%2FP%3E%3CP%3EI%20did%20find%20a%20reference%20which%20is%20not%20definitive%20but%20hints%20that%20this%20might%20be%20the%20case%3A%3CBR%20%2F%3E%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%2Fm-p%2F650903%3C%2FA%3E%3C%2FP%3E%3CP%3ECan%20someone%20please%20confirm%3F%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%3EHello%26nbsp%3B%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%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EThanks%20for%20your%20question.%3C%2FP%3E%0A%3CP%3EYes%2C%20the%20LPC845%20DMA%20controller%20cannot%20write%20directly%20to%20the%20GPIO%20register%20space%20at%20address%200xA0000000.%20The%20GPIO%20peripheral%20is%20connected%20through%20the%20Cortex-M0%2B%20I%2FO%20bus%20for%20fast%20CPU%20access%2C%20whereas%20the%20DMA%20controller%20accesses%20memories%20and%20supported%20peripherals%20through%20the%20AHB%2FAPB%20bus%20infrastructure.%3C%2FP%3E%0A%3CP%3EIn%20addition%2C%20the%20LPC845%20datasheet%20states%20that%3A%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%22The%20DMA%20controller%20can%20access%20all%20memories%20and%20the%20USART%2C%20SPI%2C%20I2C%2C%20DAC%2C%20and%20Capacitive%20Touch.%22%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EGPIO%20is%20not%20listed%20among%20the%20peripherals%20accessible%20by%20DMA.%20Therefore%2C%20DMA%20transfers%20to%20the%20GPIO%20register%20space%20are%20not%20supported%20and%20will%20generate%20a%20transfer%20error%20(ERRINT)%2C%20which%20is%20consistent%20with%20the%20behavior%20you%20observed.%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%3EThank%20you.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EAlice%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E