AnsweredAssumed Answered

Send data with usart in smart card mode and DMA

Question asked by Étienne on Jul 16, 2013
Latest reply on Jul 16, 2013 by Étienne
Hi,
I'm trying to communicate with a smart card using the usart on a STM105RC. I was successful doing that with normal interrupts, and now I'm trying to use the DMA with the USART for better performance. My problem is that I can send the data and get a "DMA transfer complete interrupt", but I don't get a "Usart transfer complete interrupt" after that. But for a smart card it is very important to catch the USART_TC and not the DMA_TC, because as shown in the reference manual(RM0008, figure 295), the transfer is not terminated on the USART side when the DMA_TC arises and if I start reading data on the usart after DMA_TC I read the data that are being sent (RX connected to TX in smart card mode).

Are there some specific actions to take when using smart card mode and DMA on a USART?
I tried using DMA with a "normal" usart and I'm getting USART_TC interrupts, but that could be caused by the configuration difference between the 2 usarts.

I'm using the remapped Usart3 TX, that is DMA1 Channel2.

Outcomes