Question
USART and DMA (for RS485)
Posted on January 16, 2012 at 16:56
Hello all,
I am using DMA to manage the TX line of one USART (RX stays on standard interrupt). I have no problem with a RS232 tranceiver. But when I use a RS485 tranceiver I got a problemwith the CBUS line management. I manage this output in the DMA_IT_TC interrupt. It appears that the interrupt comes 2 characters before the real end of the transmission, and so my last 2 characters are cutted by the tranceiver. I fund that if I wait for the end of transmission on the USART peripheral like that :while
(USART_GetITStatus(cUARTPeriphDesc[eUART_PERIPH_USART3].Base, USART_IT_TC)
EQ RESET) the problem is solved, but I don't want to use infinite loop. I think there is somewhere a settings I have forgot ... Do you have an idea ?
Thanks
Thomas
STM32F103
#dma #uart #usart-dma-rs485