clock stability or wrong baudrate

Started by schlabs, September 29, 2017, 05:51:56 PM

Previous topic - Next topic

schlabs

I am using a A20 with the following features:
-Debian Linux
-Sata hard disk
-wifi adapter ( as hotspot)
-UART1: /dev/ttyS1 with a GPS module working at 9600/8/n/1 baud.
-UART2: /dev/ttyS2 with a custom hardware working at 230400/8/n/1

All working fine. but yesterday i get a problem. i get missing characters:
For example into /dev/ttyS1 i receive:
$GPGGA,030,,0,0,,,M,$GPRMC,030,,,,0.00,0,,,N*45
The right data frame is (red is the missing and \n\r are 13 and 10 ascii numbers):
$GPGGA,030810.000,,0,0,,,M,,M,,*44\n\r$GPRMC,030810.000,,,,0.00,0,,,N*45

This failure was continued on both UARTs.
The reader process take only 7% of cpu writted in perl.

All seem like the clock on A20 UARTs are running out of range, but close to the required frequency.
Any clue will be appreciated.

JohnS

Make sure you're using an Olimex-supplied Linux and that there are for example no processes with those ports open (getty/login/etc).

John

schlabs

Thanks you. The linux is the official Olimex debian, and:

$ ps ax |grep getty
354 tty1     Ss+    0:00 /sbin/agetty --noclear tty1 linux
360 ttyS0    Ss+    0:00 /sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt102

$ ps ax |grep login
311 ?        Ss     0:00 /lib/systemd/systemd-logind

$ lsof | grep "/dev/tty"
[nothing listed]

I start my process and:
$ lsof | grep "/dev/tty"
drv.pl    5929           gipic    4u      CHR       4,65      0t0    65 /dev/ttyS1
drv.pl    5929           gipic    5u      CHR       4,66      0t0    66 /dev/ttyS2

So i think that only i am using the ports.

Today work fine with no error and nothing changed. thanks you for the help,

schlabs

The theme was partially solved. Seem like a bug into serialPerl module. I will search more deeply i this direction. Thanks you everyone.

p0man