AnsweredAssumed Answered

Problem with LPC845 UART TX and DMA

Question asked by Nikolaj Rahbek on Feb 28, 2020
Latest reply on Mar 3, 2020 by Nikolaj Rahbek

I'm trying to get the LPC845 to run the USART with DMA on TX, but without luck. Any chance for an experts code review  I have attached the c file.


Tested on a LPCXpresso845-max.


What I did:

1) I have imported the uart terminal and transfer dma demos from the SDK. Both work as expected.

2) I wated to mod the terminal demo to send a string using DMA. Change done:

  2.1) removed the IRQ part

  2.2) copied lots of the DMA demo (see lines 33 to 66 in attached)

  2.3) removed the "pingpong" descriptor (see line 39)

  2.4) change `uart->RXDAT` to `uart->TXDAT` and swapped source and destination (see line 60)

  2.5) change from `kDMA_PeripheralToMemory` to `kDMA_MemoryToPeripheral` (see line 61)

  2.6) removed to creation of the pingpong descriptor and added a new single descriptor (see line 64 and 65). I have no idea what to set the `next` descriptor to, I have tried setting it to the same descriptor and NULL. Neither works.

  2.7) Added `DMAConfigutation()` and `StartTransfer()` to the main function, just before the infinit loop. (see line 93 and 94)


What I expected to see: "Hello, world!" printed in my terminal.

What I actually see: The project builds and runs. I can debug it and single step the code. But nothing in printed in the terminal.