RTC
Last updated
Last updated
The external PCF8563 RTC is connected to the I2C interface of the expansion port. Note: Our expansion port does not include pull-up resistors. Please add them externally.
Actual Wiring
The H618 SDK includes the PCF8563 driver by default. Detailed porting steps are omitted here.
Driver Integration
Place the driver in h618-android12.0\longan\kernel\linux-5.4\drivers\rtc
.
Modify the Makefile
:
Modify the Kconfig
to add:
Kernel Configuration Enable the driver in the kernel configuration:
Basic Testing with date
and hwclock
Display current system time:
If the system time is incorrect (e.g., 1970), set it manually:
Display RTC hardware time:
Sync system time to RTC:
Verify RTC time:
Wait a few seconds and check again to confirm RTC is counting.
RTC Interrupt Testing
Set an alarm:
Check RTC status:
Verify interrupt logs (add debug prints in the driver):
Expected Results
Interrupt Log Example