Using DMA with UART, with and without FIFO buffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using DMA with UART, with and without FIFO buffer

跳至解决方案
1,806 次查看
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 项奖励
回复
1 解答
1,221 次查看
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 项奖励
回复
1 回复
1,222 次查看
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 项奖励
回复