[ntp:questions] convert_rawdcf: parity check FAILED on Olinuxino Maxi (iMX233)

Rob nomail at example.com
Mon Oct 14 08:13:55 UTC 2013


Manuel Reimer <Manuel.Nulldevice at nurfuerspam.de> wrote:
> On 10/06/2013 12:17 AM, Rob wrote:
>> That is why I suspect that it cannot run 50 baud.
>> What happens when you try "stty 50 </dev/tty..."?
>
> [root at alarm dev]# stty 50 </dev/ttyAPP0
> [root at alarm dev]# stty </dev/ttyAPP0
> speed 50 baud; line = 0;
> -brkint -imaxbel
>
> Either 50 baud works or the driver fools us here.

It could be that the driver thinks it has setup 50 baud, but it has
calculated a divisor value, normally clock/(16*baud), that does not
fit in the divisor register (e.g. 16 bits) and it has not checked for
overflow.

>> When you want to use it with ntpd, it should write the outcome of
>> every parsed minute.
>> Of course you would normally not use polling but interrupts.
>> This is also possible on serial status lines.
>>
>> When you open the serial port and do this:
>>
>> ioctl(fd, TIOCMIWAIT, TIOCM_CAR)
>
> I only have "RX" and "TX". So this won't work.

Are you sure you have a UART?  or is this maybe all just simulated
serial on a general-purpose I/O bit?
Well, that should not matter to ntpd...

> I've now updated my script to use an interrupt on one of the GPIO ports. 
> This way, the CPU usage of my script changed from 5% to about 0.5% which 
> is OK. The only remaining problem is memory usage. The script takes 6% 
> of available system memory (64MB in total).
>
> I operate directly with "adjtimex" with a self written Perl module which 
> works pretty well. But I still tend to run this as cron job to get rid 
> of the memory usage. Accurate time is not the primary job of this device.

When memory is a problem just rewrite it in C.
This should be easier once you have debugged it in Perl.

Rob



More information about the questions mailing list