AnsweredAssumed Answered

UART1 with DMA not working

Question asked by plewis on Nov 12, 2014

I am using a TWR-K60F120M kit and trying to get a simple DMA application to work without much success.  I am trying to send 16 bytes out of UART1 and read some of them back in on UART2.  UART1 is configured to transmit the bytes from local memory using DMA.  UART2 is configured with system calls to fopen() and read().  I have a jumper wire connecting the transmit pin of UART1 to the receive pin of UART2.  It appears that the DMA never gets started or is configured wrong and fails in some way.  Here is what I know:


If I don't use DMA and then configure UART1 with system calls to fopen() and write(), then UART2 receives the bytes as I expect.  This means that I do have the proper pins connected together and that UART2 is configured and operating properly.


If I configure the registers for UART1 as if I am going to use DMA but then explicitly write to the UART1 transmit data register instead, UART2 receives the bytes as I expect.  This means that I have configured UART1 baud rate, clock, IO pins properly.


Would someone please look at my code and see if I am setting up my DMA registers properly?  I have looked at many examples on this message board trying to find a clue as to what I am missing.  This is an MQX application, but it is very small and only runs a single task.  It should be pretty easy to read.  Thanks.

Original Attachment has been moved to: