| PCFRTC | LOCAL | PCFRTC |
pcfrtc — Driver
for NPX PCF8583 Real-Time Clock and Calendar/Counter/240 x 8bit RAM via I2C
bus
pcfrtc* at iic? addr 0x50
pcfrtc* at iic? addr 0x50 flags x
pcfrtc* at iic? addr 0x51
pcfrtc* at iic? addr 0x51 flags x
The pcfrtc driver supports the PCF8583
multifunction chip which can operate in one of four modes depending on the
value of the flag [if specified]:
The pcfrtc driver is commonly
used to support a real-time clock using a 32768 hz crystal and a backup
battery. It also provides a small amount of battery backed RAM which is
used, for example, for bootstrapping acorn32 system. It is possible to use
an external 50hz clock by switching to mode 1 — this might be useful
with a European mains derived signal as the long term drift is likely to be
less than an unstabilised crystal. Access methods to retrieve and set date
and time are provided through the
TODR interface
defined in todr(9).
Switching to mode 2 provides access to a 6 digit BCD counter, which can be used to count arbitary external events. The driver maps this counter to an integer envstat variable, which can be read via the normal envstat subsystem, and also exposes a sysctl variable to allow the counter to be reset.
In mode 2 the following sysctl(3) variables are provided:
hw.pcfrtc1.counter_resetThe pcfrtc driver first appeared in
NetBSD 1.0.
The pcfrtc driver was written by
Steve C. Woodford and
Jason R. Thorpe for Wasabi Systems, Inc. based on Ben
Harris's PCF8583 driver for NetBSD/acorn26.
Subsequent modifications to support other modes by
Dave Tyson
<dtyson@anduin.org.uk>
The driver does not support the chip's alarm and timer features.
| October 1, 2026 | NetBSD 11.99 |