LPC1788 UART - DMA and interrupts

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

LPC1788 UART - DMA and interrupts

1,400 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mk1 on Tue Oct 23 00:53:06 MST 2012
Hi all,

I have DMA working with UART on the embedded artists board. However, I want to echo each characted received as well as the usual processing on received strings.

I mainly want DMA for the transmitted data since there is a lot of it. Not much data will be received. Is it possible to use DMA for transmitted data but interrupts for received data? Or is there a way of getting an interrupt for each byte when receiving by DMA?

Any ideas?

Thanks.
Labels (1)
0 Kudos
5 Replies

1,125 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gonzalo_Sipel on Tue Oct 07 04:19:17 MST 2014
It's ok. Thanks for your answer!
0 Kudos

1,125 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mk1 on Mon Oct 06 13:17:16 MST 2014
Sorry, but I don't think I can help you. This was a long time ago and we actually moved to a different device due to other problems with the LPC1788 device. I am also no longer at the same company so don't have access to any of my previous notes. Sorry!
0 Kudos

1,125 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gonzalo_Sipel on Mon Oct 06 05:54:06 MST 2014
Hi mk1
            I'm working with a LPC1788 and I'm trying to send data by UART using DMA but I couldn't find any good example about this. Do you know where I can find some information about this or a good example??
Thanks!
0 Kudos

1,125 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mk1 on Tue Oct 23 09:42:36 MST 2012
Thanks, I think I have it!

I was just confused by configuring UARTFIFOConfigStruct - not sure whether to set it for FIFO or DMA, but after you confirmed I looked into it more and realised you don't have to choose between them.

I had thought of the DMA size being set to 1B, but this seems horribly inefficient since I would need to reconfigure DMA for every byte received.. I think the first solution looks best.

Thanks for your help!
0 Kudos

1,125 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by federoasio on Tue Oct 23 06:49:23 MST 2012
Not much data will be received. Is it possible to use DMA for transmitted data but interrupts for received data?
Yes, it is. Receive and Transmit interrupts or DMA requests come from different sources, the Rx and Tx FIFOs. You can have DMA interrupts for receive and transmit, UART interrupts for receive and transmit, or a mix of them. I have it working as you want, UART interrupt for receive and DMA for transmit. I also have it working with DMA for both receive and transmit.
Or is there a way of getting an interrupt for each byte when receiving by DMA?
This is also possible just set the DMA transfer size to 1B.

I hope it helps, just ask me if you have any doubts.
0 Kudos