2009-05-01 12:27 AM
DMA on UART1 RX problem
2011-05-17 04:10 AM
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