Hi.
I find rtc on my board doesn't work well: it can be set by "hwclock -w" , but after reboot, it will be reset.
e.g.
root@imx6qsabresd:~# hwclock
Tue Jun 20 19:15:57 2017 0.000000 seconds
root@imx6qsabresd:~# date -s 20200101
Wed Jan 1 00:00:00 UTC 2020
root@imx6qsabresd:~# hwclock -w
root@imx6qsabresd:~# hwclock
Wed Jan 1 00:00:08 2020 0.000000 seconds
root@imx6qsabresd:~# reboot...
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2020-01-01 00:01:19 UTC (1577836879)
...(cut off power,use button battery)
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1)
Then I check the voltage when the power was changed, it's great. (3.29v to 3.08v)
So, are there somthing wrong in the code about rct initialization or others?
Regards
Mihan
Hi 铭恒 李
what bsp used in the case, one can try with linux from
source.codeaurora.org/external/imx/linux-imx repository
For hardware one can check voltage on VDD_SNVS_CAP
with oscilloscope for possible glitches.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
please try to reproduce issue on i.MX6Q Sabre SD board
with Demo Images:
https://www.nxp.com/webapp/Download?colCode=L4.1.15_1.0.0_MX6QDLSOLO&appType=license
If it can not be reproduced then issue in custom hardware, recheck board hardware design using
Best regards
igor
Hi
I asked my friend about RTC, he said that maybe the backup area (BKP? but this is for stm32) was disable.
where should I check the RTC backup area in kernel code?
Let me explain the situation in detail.
This rtc is a external rtc(BM8563ESA),I'm using Imx6DL, kernel 4.1.15-2.1.0.
Now it’s always reset when register and read (snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1))
I think maybe the system will check the power off status bit then it will reset the rtc if true.\
So where is the check of power off status bit when initializing rtc?