9 Replies Latest reply on Mar 26, 2014 12:57 PM by user_14586677

    Simple program question about UART (SCB)

    user_322064261

       Okay so I have an extremely simple program, all it does it shoot an array of chars out of the UART. Before it starts communicating it sends a digital line high, then once it's done it makes it low again.

         

      The project is attached but here it is for anyone who wants a quick scan.

         

       

         

         

      It is straight forwards enough, as far as I can tell, there is no way that the line can go to zero until the UART has finished sending every one of its bytes. However the reality is much different.

         

         

       

         

      If you look the green channel is the UART TX line and the yellow line is the lineDriver. If you notice the line goes high just before transmitting as you could expect, however it then goes immediately low before all the chars have finished sending. 

      I think that the UART is operating asynchronously from the C code, it is just taking the inputs from the for loop and then sending them at a later timer. Does anyone know how to force it to run synchronously? maybe there is a status bit I can check for?