AnsweredAssumed Answered

STM32L100xx USART Smartcard Mode

Question asked by Malin Chekurov on Sep 20, 2017

So recently I had to dig in and fix some code about the USART in SmartCard mode. Apparently each byte i send is echoed back at me, triggering the RXNE. My question is do I get the RXNE before the TC of the byte I just send or after that.

According to the user manual: "Then, the FE flag is set with the RXNE at the end of the 1.5 stop bit.", that means in the  case of a smartcard with Guard Time of say 10 etus, I will get the TC after the guard time(user manual- "TC is forced low during this time. When the guard time counter reaches the programmed value TC is asserted high." ) and the RXNE must be set after the 1.5 stop bits which is before the TC.

I have run that many times and it seems completely random - sometimes RXNE is set before TC and sometimes after it.

Also the user manual doesn't say anything on the echoed bytes.