Internal RTC

An RTC is embedded in the chip, and a driver is provided, which can be easily used.

  • Configuration of kernel config
# cd kernel
# ARCH=arm make menuconfig

After configuration, save to the default configuration:

# cp .config ./arch/arm/configs/infinity2m_spinand_ssc011a_s01a_minigui_doublenet_defconfig -f

Recompile and update the kernel:

# cd ../
# ./Release_to_customer.sh  -f nand -p ssd201 -o 2D06

After the system is up, you will see the /dev/rtc0 device node:

# ls /dev/rtc0

  • verification

Read RTC time:

# hwclock

Set RTC time:

# date -s "2021-03-03 00:00:00"
# hwclock -w
# hwclock

Install the RTC battery, then disconnect the power supply of the development board and wait for a period of time before connecting the power supply. It can be seen that the RTC continues to time during the period of power failure:

# hwclock

文档更新时间: 2021-07-30 15:18   作者:Aeeditor