AnsweredAssumed Answered

USART and DMA (for RS485)

Question asked by bernard.thomas on Jan 16, 2012
Latest reply on Feb 13, 2012 by Edje
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 problem with 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) 
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 ?