Termios not setting baud rate in LEON3
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Nov 26 07:20:31 UTC 2014
Hello Mohammed,
can you set a break point in apbuart_set_attributes() and see what
happens? This should set the baud.
On 26/11/14 08:11, Mohammed Saeed Khoory wrote:
> Hi,
>
> I'm having a few issues setting the baud rate of the second UART on LEON3 to 115200 via termios.
>
> - I've opened the second UART using open() and "/dev/console_b" as the path. Sending data via this UART using the fd at this stage works provided that the terminal on the other end is set to 38400 (the default baud rate). This shows that the UART is working fine.
> - I was able to set the baud rate successfully (no errors) using tcgetattr(), cfsetispeed(), cfospeed(), and tcsetattr() with a baud value of B115200. After setting the termios structure, I used tcgetattr() again to confirm that it was set, and it is.
> - After setting the baud, I changed the baud rate of the terminal on the other end (a Windows desktop) to 115200, then tried to send a few characters from the LEON3 side. I only get garbage on the other end, which means that there's a baud rate mismatch.
> - If I set the other end to 38400, and try to send some characters after setting the baud rate to 115200, those characters show up perfectly fine. So it would seem that the baud rate of the UART on the LEON3 was not set correctly.
>
> I was able to set the UART to 115200 earlier by manually setting the UART registers, which means that the UART on the LEON3 definitely supports the speed. However this is pretty ugly and I wanted to use termios instead.
>
> Does this mean that termios is not supported for LEON3 targets? Or am I doing something wrong? I would appreciate any help.
>
> Thanks,
> Mohammed Khoory
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list