Software flow control for /dev/console on Zynq

Joel Sherrill joel.sherrill at oarcorp.com
Wed Jul 16 21:59:22 UTC 2014


On 7/16/2014 4:53 PM, Stephen Tether wrote:
> 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?
I am hoping someone else can pipe up on if you are missing something but
software flow control is implemented in cpukit/libcsupport/termios.c.

If the console is in polled mode, it could be overflowed without termios
ever seeing it. But if the console is interrupt driven, I would expect it to
be OK.
> - Steve Tether
> SLAC
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the users mailing list