cancel
Showing results for 
Search instead for 
Did you mean: 

DMA on UART1 RX problem

aloui
Associate II
Posted on May 01, 2009 at 09:27

DMA on UART1 RX problem

1 REPLY 1
aloui
Associate II
Posted on May 17, 2011 at 13:10

Hello,

I'm trying to get the DMA to work for the UART1TX.

I'm using freeRTOS and need my tasks to stay active all the time.

I have looked at the example given with the firmware, I have configured the DMA for UART1, tried to send data once, and it works, but my problem is what should I do to get it to work the next time.

I mean, i have written a function RS232_Write(char* c) that fills my TXbuffer with the requested data, of course after waiting the DMA1_FLAG_TC4 to be ready, then i reconfigure the length of the data to be sent, reinitialise the DMA

DMA_InitStructure.DMA_BufferSize=l;

DMA_Init(RS232_DMA_CHANNEL, &DMA_InitStructure);

//Activation de DMA TX request

USART_DMACmd(RS232_UART, USART_DMAReq_Tx, ENABLE);

// Active DMA1 Channel4

DMA_Cmd(RS232_DMA_CHANNEL, ENABLE);

l is the length of the data.

The problem is in this turn nothing hapens and i dont get anything on the screen!

Would someone help me please?

Thanks