cancel
Showing results for 
Search instead for 
Did you mean: 

Uart with DMA transfer, problems with Printf

stephan2399
Associate II
Posted on May 04, 2009 at 12:04

Uart with DMA transfer, problems with Printf

2 REPLIES 2
stephan2399
Associate II
Posted on May 17, 2011 at 13:11

Hello,

if I send data over the UART with printf and after that start a dma transfer to the same uart, the last char of the printf(:) is not send.

Can anybody help me?

Her the code:

/* Wait until DMA1_Channel 4 Transfer Complete */

while (DMA_GetFlagStatus(DMA1_FLAG_TC4) == RESET)

{

}

DMA_Cmd(DMA1_Channel4, DISABLE);

printf(''loop:'' );

DMAConfiguration();

DMA_Cmd(DMA1_Channel4, ENABLE);

THX

stephan2399
Associate II
Posted on May 17, 2011 at 13:11

I get it:

// wait Uart is ready

while (USART_GetFlagStatus(USART_MAXIM_NR, USART_FLAG_TXE) == RESET)

{

}

Before starting the DMA transfer!