Forum Discussion
Altera_Forum
Honored Contributor
16 years agoProblem with non-blocking UART I/O
Hi guys, I'm struggling with non-blocking UART (RS-232) I/O these days. I'm using the 9.1 suite with Software Build Tools for Eclipse, but it seems that the very same problem was also in previ...
Altera_Forum
Honored Contributor
10 years agoHi,
I'm facing the same problem with Quartus Prime 16.0 Lite edition. I have made the following changes to make the fgets function Non Blocking : _serialPort = fopen("/dev/uart_0", "r+"); fd = fileno(_serialPort); fcntl(fd, F_SETFL, O_NONBLOCK); After this it's been set to Non-Blocking, but inside the while loop when I'm passing a "STOP" command (should break out of the while loop) it's not reading the command and goes on continuously. I've tried your method but it's still not working. I've also checked that with getc(_serialPort) "-1" is being returned. Can you please kindly help me with this issue ?