imx9352 setting system time does not work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx9352 setting system time does not work

1,178 次查看
Alexander7
Contributor I

When I use the imx9352 with no battery inserted, the power failure reboot system time is in 2023 instead of 1970. When I use hwclock -w to set the time to 2020, the power off reboot system time is in 2023, but hwclock -r views it as 2020.

标签 (1)
标记 (1)
0 项奖励
回复
3 回复数

1,154 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

hwclock will call rtc driver to set time, how linux read/write time if you don't insert battery?

0 项奖励
回复

1,144 次查看
Alexander7
Contributor I


Regardless of whether I insert the battery or not, if the time is set to a year before 2023, it will revert to 2023 after a reboot.

When the system starts, I saw a print message, and I feel it might be related to this setting.

 

[ 2.803395] systemd[1]: System time before build time, advancing clock.

 

0 项奖励
回复

1,124 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Alexander7 

This is test log on EVK, please refer this log check your dts setting, the pcf2131 will be registered as rtc1 on EVK board.

 

[    1.201043] bbnsm_rtc 44440000.bbnsm:rtc: registered as rtc0
[    1.207097] bbnsm_rtc 44440000.bbnsm:rtc: setting system clock to 1970-01-01T00:00:00 UTC (0)
[    3.195143] systemd-sysv-generator[176]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.794546] rtc-pcf2131-i2c 2-0053: oscillator stop detected, date/time is not reliable
[    7.852340] rtc-pcf2131-i2c 2-0053: registered as rtc1

 

 

0 项奖励
回复