Software flow control for /dev/console on Zynq

Stephen Tether tether at slac.stanford.edu
Wed Jul 16 21:53:09 UTC 2014


Is there any way to turn on software flow control for /dev/console on 
the Xilinx Zynq? Some of my colleagues have noticed dropped characters 
when pasting shell command sequences into the minicom window on the 
development host. Hardware flow control isn't available on our custom 
Zynq board since the required lines are not connected to the FTDI chip 
that sits between the UART and USB. I've tried the following under RTEMS 
which doesn't seem to work:

   char const devname[] = "/dev/console";
   int const fd = open(devname, O_RDWR);
   struct termios terminfo;
   int status = tcgetattr(fd, &terminfo);
   if (status) {
     printf("First tcgetattr() failed.\n%s\n", strerror(errno));
     return;
   }
   terminfo.c_iflag |= (IXON | IXOFF);
   status = tcsetattr(fd, TCSANOW, &terminfo);
   if (status) {
     printf("tcsetattr() failed.\n%s\n", strerror(errno));
     return;
   }
   terminfo.c_iflag = 0;
   status = tcgetattr(fd, &terminfo);
   if (status) {
     printf("Second tcgetattr() failed.\n%s\n", strerror(errno));
     return;
   }

All the termios calls succeed and the results of the second tcgetattr() 
show IXON and IXOFF set, yet the problem persists. On the development 
host side I've run a small program that writes a few hundred characters 
to the USB tty while reading what comes back in raw mode with IXON and 
IXOFF turned off; nary an XOFF character has it received.

So, is there something I'm missing or do I have to implement flow 
control myself?

- Steve Tether
SLAC



More information about the users mailing list