You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/09/01 11:24:26 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on pull request #4437: stm32_serial.c: Don't fake a TX interrupt when interrupts are not suppressed

Ouss4 commented on pull request #4437:
URL: https://github.com/apache/incubator-nuttx/pull/4437#issuecomment-910189575


   Thanks for these details @davids5.
   I didn't attach an LA to look at what's going on with HW flow control enabled either (my stuff are kind of a mess right now), I might do that later.  However I tried to find when this was introduced and try to find any hint in the commit message or the change itself.  It came as part of https://github.com/apache/incubator-nuttx/commit/4494689a2220501f74404e68b3eb72c112c9a888#diff-867b440e179e185b86ca1b3423ad19b5174ec9345a02380733d51f437a40db58R691-R700
   
   Since everything is folded, let me copy the relevant snippet:
   
   ```C
   #ifndef CONFIG_SUPPRESS_SERIAL_INTS
   //      priv->im |= ;
         up_serialout(priv, stm32_USART_IM_OFFSET, priv->im);
   
         /* Fake a TX interrupt here by just calling uart_xmitchars() with
          * interrupts disabled (note that the may recurse and that priv->im
          * may be altered.
          */
   
         uart_xmitchars(dev);
   #endif
   ```
   My guess is since setting the interrupt bits was commented out, faking it was necessary.
   This was completed in https://github.com/apache/incubator-nuttx/commit/a7942e1bbe734f9bd7a4b737a899fa880ef66a88, but (again my guess) faking the interrupt part was not removed (i.e. adding an `"#else` was forgotten).  At that point flow control was not implemented in STM32.
   I don't know if later this part was deemed necessary when flow control was added.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org