I noticed you have options.c_cc[VMIN] = 2; If for some reason only one character comes in, it'll block forever. Try using options.c_cc[VMIN] = 0; so that each char can timeout if its not received.
How big are the Beaglebone uart buffers? You may still have a race between your write of the data and starting your RX thread. Try putting the write into your TX thread and launch it after you've launched the RX thread. On Thursday, July 21, 2016 at 10:10:11 PM UTC-5, Regina Choi wrote: > > > Hi Wally, > > I have tried adding fflush(stdout and fflush(stderr) in the while loop, > however, in the UartRxWait thread, the read( ) function is in block waiting > for incoming data. Which doesn't output anything. In the case, after start > and shut down minicom, the UartRxWait thread running as usual, there is no > output from the fflush(stdout) and fflush(stderr) either. > > yes, at the moment I have to kill the program to terminate. I have > modified the code such that it loop for only 5 times and terminate the > thread. > > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/28971b65-8660-4bb6-a016-6ede0c048d48%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
