Skip to main content
marko
Associate
July 28, 2013
Question

UART interrupts STM32

  • July 28, 2013
  • 1 reply
  • 656 views
Posted on July 29, 2013 at 01:31

I'm using UART for comunication with PC and I want to implement some interrupts. It seems to me that USART_IT_TXE  and  USART_IT_TC  are the same. Can someone explane me what is the difference between them?

#stm32-uart-interrupts
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
July 29, 2013
Posted on July 29, 2013 at 02:25

TC infers the last bit hit the wire, which presumably would be a stop bit or two. TXE on the other hand indicates that the holding register (not the shifting register) is empty, you'll likely see this around the time the first bit of the previous content of the holding register hits the wire.

Waiting on TC being the least efficient way to utilize the serial port, and potentially having larger inter-symbol gaps.
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..