Today we got working UART A, so I decided to wire up a cheap DCF77 receiver to it. On a first test I got spammed with
libre-computer-board ntpd[1518]: parse: convert_rawdcf: start bit / parity check FAILED for "###############RADMLS1248124P124812P1248121241248112481248P??"
This was solved with the following kernel patch:
diff -Nru libretech-linux.old/drivers/tty/serial/meson_uart.c libretech-linux/drivers/tty/serial/meson_uart.c
--- libretech-linux.old/drivers/tty/serial/meson_uart.c 2017-10-24 19:49:30.776000382 +0200
+++ libretech-linux/drivers/tty/serial/meson_uart.c 2017-10-24 19:52:39.660000472 +0200
@@ -362,7 +362,7 @@
writel(val, port->membase + AML_UART_CONTROL);
- baud = uart_get_baud_rate(port, termios, old, 9600, 4000000);
+ baud = uart_get_baud_rate(port, termios, old, 50, 4000000);
meson_uart_change_speed(port, baud);
port->read_status_mask = AML_UART_TX_FIFO_WERR;
No more errors in the logs but still no time:
root@libre-computer-board:/home/libre# ntpq -c as -c cv -c rv
ind assid status conf reach auth condition last_event cnt
===========================================================
1 29169 8811 yes none none reject mobilize 1
2 29170 802b yes no none reject clock_alarm 2
associd=0 status=0012 1 event, clk_bad_format,
device="RAW DCF77 CODE (Conrad DCF77 receiver module)",
timecode="-?#-#?-??---#--?-?-???---1??p1-?-?-?1--8-2--4-??-1?2-?1--8??_",
poll=24, noreply=0, badformat=1, baddata=0, fudgetime1=292.000,
stratum=0, refid=DCFa, flags=0, refclock_time="<UNDEFINED>",
refclock_status="", refclock_format="RAW DCF77 Timecode",
refclock_states="*BAD FORMAT: 00:24:38 (100.00%); running time: 00:24:38"
associd=0 status=c016 leap_alarm, sync_unspec, 1 event, restart,
version="ntpd 4.2.8p4@1.3265-o Thu Sep 7 20:45:44 UTC 2017 (1)",
processor="aarch64", system="Linux/4.13.3-v10-g019e61d-dirty", leap=11,
stratum=16, precision=-22, rootdelay=0.000, rootdisp=22.170, refid=INIT,
reftime=00000000.00000000 Thu, Feb 7 2036 7:28:16.000,
clock=dd99fe54.700d7c45 Tue, Oct 24 2017 20:00:52.437, peer=0, tc=3,
mintc=3, offset=0.000000, frequency=0.000, sys_jitter=0.000000,
clk_jitter=0.000, clk_wander=0.000
Any ideas?