We have custom board based on imx6ul evk which has rtc. The problem we are facing is that system clock is slowing down over a time very fast(board is running during this period) even thought rtc clock is running fine. I updated time in yocto to current time using date command and then updated hardware clock to match system clock using hwclock -w command. Now as the board is running for next 2 minutes we found that system clock slows down and falls behind but hardware clock is working fine. We found that for every 10 seconds system clock updates only about 2-3 seconds. What can be the reason for this? We found no such problem in imxul evk board.
I have same problem in i.MX6ULL.
RTC is normal, but, Linux system time is slowing down in ondemand mode.
I'm testing with below command
date && hwclock
date shows Linus system time and, hwclock shows RTC time.
When I use performance mode for scaling_governor then system time is accurate.
But, I need to use ondemand to minimize power consumption.
Did you find solution on this problem?
Hi Mannsik,
We didn't find any solution for this problem. We had even sent our boards to local NXP for analysis but they also couldn't find any problem with our design or propose any solution for this problem. We observed same behaviour even with i.MX6UL EVK board. Thus currently we are struck with this problem. Please update in this thread if you have found any solution or reason for this problem.
Thanks
Pratyush Tomar
Hi Pratyush Tomar.
I used performance mode for the scaling governor. Then system time ticks correctly.
Anyway, this is not a good solution to use performance mode.
But, currently, I have no other option.
Best Regards.
Mannsik
Hi Pratyush
one can check if 32.768KHz crystal is working properly,
measure it on CCM_CLKO1,2 using jtag and register CCM_CCOSR ("ckil"
selection). Also one can test it with unit-test ../mxc_rtc tests
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor
Thanks for the reply. I checked and 32.768KHz crystal is working properly. I also ran rtc tests in uni_tests folder and tests passed. But their are 2 following problems :--
1) The system clock slows down very fast. Even if rtc is not present and board is in running mode the system clock should not slow down till board is running. Any solution for this? Our board is running in "ondemand" mode.
2) The rtc doesn't work after shutdown. I followed these steps
- Set the date to the current date and time.
- Set the HW clock to current date and time by using the command "hwclock --systohc"
- Make sure the new date and time are set by issuing "date" and then "hwclock --show"
- Shutdown the system, including a power-cycle. You can use "poweroff" command
- Restart the system with the Linux kernel. Run "date" command.
The "date" command shows date and time before shutdown even though period of board without power was more than 4 minutes.