Using DMA with UART, with and without FIFO buffer

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

Using DMA with UART, with and without FIFO buffer

Jump to solution
1,142 Views
panchogalactico
Contributor II

Hi. I´m having problems with the DMA. I use a k20 MCU, clocked to 72MHz.

I want to receive 8 bytes in the UART0, filling the RX buffer FIFO, and then move them to a int mem[8] array.

I can´t make it work. My question is about UART0_D register, because, as I understand, I have to read 8 successive times that register to get the 8 bytes, and the DMA machine increment the source pointer automatically after every read. So, How do I do it?. Can i force the DMA machine to keep the source pointer pointing to UART0_D while the destiny pointer incrementing automatically?

Actually, if I can force the DMA machine to do that, I guess that I didn't need to use the RX buffer FIFO.

Any ideas?

 

sorry for my poor english.

0 Kudos
1 Solution
557 Views
panchogalactico
Contributor II

I make it work, so I post here the answer.

If I set DMA_TCDn_SOFF = 0 , then the source pointer wont increment.

very easy actually.

View solution in original post

0 Kudos
1 Reply
558 Views
panchogalactico
Contributor II

I make it work, so I post here the answer.

If I set DMA_TCDn_SOFF = 0 , then the source pointer wont increment.

very easy actually.

0 Kudos