GPIODCF(4)

NAME
gpiodcf - DCF77 timedelta sensor through GPIO pin

SYNOPSIS
gpiodcf* at gpio? offset 0 mask 0x1
gpiodcf* at gpio?

DESCRIPTION
The gpiodcf driver decodes the DCF77 time signal code using one GPIO pin. The pin is used as a data signal. The GPIO pin must be able to read an input.

The pin number can be specified in the kernel configuration with the offset locator. The mask locator should always be 0x1 in this case. The offset and mask can also be specified when gpiodcf is attached at runtime using the GPIOATTACH ioctl(2) on the gpio(4) device.

gpiodcf implements a timedelta sensor and the delta (in nanoseconds) between the received time information and the local time can be accessed through the sysctl(8) interface. The clock type is indicated in the sensor description:

DCF77
    German DCF77 time signal station (77.5 kHz longwave transmitter located in Mainflingen near Frankfurt).

The quality of the timedelta is reported as the sensor status:

UNKNOWN
    No valid time information has been received yet.

OK  The time information is valid and the timedelta is safe to use for applications like ntpd(8).

WARN
    The time information is still valid, but no new time information has been decoded for at least 5 minutes due to a reception or parity error. The timedelta should be used with care.

CRITICAL
    No valid time information has been received for more than 15 minutes since the sensor state degraded from OK to WARN. This is an indication that hardware should be checked to see if it is still functional. The timedelta will eventually degrade to a lie as all computer internal clocks have a drift.

SEE ALSO
gpio(4), intro(4), ntpd(8), sysctl(8)

HISTORY
The gpiodcf driver first appeared in OpenBSD 4.5.

AUTHORS
-nosplit The gpiodcf driver was written by Marc Balmer <mbalmer@openbsd.org>.