AnsweredAssumed Answered

Does printf Block?

Question asked by spflanze on Feb 21, 2013
Latest reply on Feb 26, 2013 by AndyK2

I am using printf to output data through UART (serial port) on a BF547 using VDK on VisualDSP++. I need to know if printf will block until transmission by UART is completed. I am hoping it will because I am concerned there will be usage conflicts if the string I pass to it is altered before transmission is completed.


The string I need to transmit is created in a deferred callback. A callback cannot execute a printf function. So I have created a thread that pends on a semaphore. When the pend is released it prints a string that is global variable. The callback puts its output in that string and then posts the semaphore.