Content originally posted in LPCWare by LuukvanderBiezen on Thu Dec 06 02:18:35 MST 2012
Summary of my topic:
I can send data to and from a PC with UART using DMA with both TX and RX. I want to implement automatic assignment of DMA channels in my software by using the DMAC enabled channels register.
Problem:
My problem is that the DMA channel, that is assigned to UART RX, is normally asserted (channel active). When transferring data the channel is de-asserted (inactive). Under normal circumstances a DMA channel is active during datatransfer and inactive when the datatransfer is finished. E.g. When I'm using UART2 TX the channel is normally inactive and when transferring data the channel is active. When I want to do several datatransfers through UART RX in a row my software assigns all channels to UART RX. This is because the DMA channel, that is assigned on the last datatransfer to UART2 RX, stays active (when no data is transferred).
(first datatransfer using ch0, second datatransfer using ch1 because ch0 is active (UART RX from first datatransfer), etc.)
As I said before, the data does arrive at the PC. The problem is that the DMA channel, that is assigned to UART2 RX, is active during idle state and inactive during datatransfers. Does anybody know where I can find useful information? I would like to know if the UART (RX) is the only peripheral that has this 'problem' and why the channel is asserted. Do I really have to assign a fixed channel for every UART RX?
I've searched in the datasheet, user manual, technical reference manuals (PL011 and PL080) and on the internet but couldn't find helpful information.
Where can I edit my forum topic? I want to change the text and the headername.