Commit Graph

1 Commits

Author SHA1 Message Date
David Sidrane 6bf19d2a06 BACKPORT of upstream NuttX stm32_serial: fix freezing serial port.
Thanks to Jussi Kivilinna

   9169ff6a15

   stm32_serial: fix freezing serial port.  Serial interrupt enable/disable functions
   do not disable interrupts and can freeze device when serial interrupt is received
   while execution is at those functions.

   Trivially triggered with two or more threads write to regular syslog stream and to
   emergency stream. In this case, freeze happens because of mismatch of priv->ie
   (TXEIE == 0) and actually enabled interrupts in USART registers (TXEIE == 1),
   which leads to unhandled TXE interrupt and causes interrupt storm for USART.
2017-05-20 10:26:20 +02:00