RTEMS 4.11 Gaisler Uart Driver bytes missing

Hoefle Marco Marco.Hoefle at nanotronic.ch
Tue Dec 15 16:53:59 UTC 2015


Hello,

for data transmission we are using a xmodem protocol.

We experienced that bytes are lost when sending binary data from PC to a LEON3 system running RTEMS 4.11

When reducing the baudrate the data transmission looks ok.


That is how we use the console driver (path: /dev/console ):


int fd = open( devname, O_RDWR);
if (fd < 0) {
return -errno;
}

struct termios settings;


tcgetattr( fd, &settings);
cfmakeraw( &settings);
cfsetspeed( &settings, B4800);
settings.c_cc[VMIN] = 0;
settings.c_cc[VTIME] = 5;

int err = tcsetattr( fd, TCSANOW, &settings);

tcflush(fd, TCIOFLUSH);



But desired is B115200


If we set it to the higher speed we see that bytes are missing. We scope the receiver using this:


static int mygetc( char *c)
{
int g_debugfd = get_debugfd();
int ret = read( g_debugfd, c, 1);
if ((ret > 0) && (log_rx_ptr < sizeof(log_rx))) {
log_rx[log_rx_ptr++] = *c;
}
if(ret == 1)
return 0;

return -1;
}


?Has anyone else experienced this behavior?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20151215/864a82e5/attachment.html>


More information about the users mailing list