LinuxBSP (linux-2.6.10) and Serial Driver Problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

We are using LinuxBSP (linux-2.6.10) with a ColdFire MCF5474. The second
internal UART is used to communicate with a ColdFire MCF5232 using RTS/CTS
flow control.

The problem we have is RTS gets turned off by the MCF5474 and does not get
turned back on.
Here is the initialization code:

          int                     sfd;
          struct termios    new_settings;

          sfd = open( "/dev/tts/1", ( O_RDWR | O_NOCTTY ) );

          if ( 0 <= sfd )
          {
                 tcgetattr ( sfd, &new_settings );
                 new_settings.c_lflag   &=  ~(ECHO | ECHOE | ECHOK | ECHONL
| ISIG | ICANON | IEXTEN);
                 new_settings.c_iflag   &= ~(IGNBRK | ISTRIP | INLCR | IGNCR
| ICRNL | PARMRK | IXON | IXOFF );
                 new_settings.c_oflag  &= ~OPOST;
                 new_settings.c_cflag  &= ~PARENB;
                 new_settings.c_flag    &=  ~CLOCAL;
                 new_settings.c_cflag   |=  CRTSCTS;
                 new_settings.c_lflag    |= NOFLSH;

                 cfsetispeed ( &new_settings, B115200);
                 cfsetospeed ( &new_settings, B115200);
                 tcsetattr( sfd, TCSANOW, &new_settings);
          }


Looking at receive_chars in mcfserial.c, the receive interrupts can be
turned off whenever (tty->flip.count >= TTY_FLIPBUF_SIZE). This will cause
the UART fifo to fill up, which eventually turns RTS off. If (tty->real_raw)
in n_tty_receive_buf (in n_tty.c) is set, then
(tty->driver->flush_chars(tty)) does not get called. If
(tty->driver->flush_chars(tty)) does get called, then receive interrupts
will get enabled, which will read the fifo and cause RTS to be turned ON.
However, I do not see how receive interrupts get enabled when
(tty->real_raw) is set.

Has anyone seen this problem?
Was (tty->driver->flush_chars(tty)) also suppose to be called in RAW mode
(in n_tty_receive_buf)?
What is the correct solution?

Thanks,
Bill







Site Timeline