Posts: 10
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: May 2018
TinkerOS_Android V13.13.0.74
Release Notes
4. Support DS3231 RTC module.
The DS3231 module is connected to the port I2C_1, when I write in terminal :
"1|root@rk3288:/ # hwclock -r -f /dev/rtc1"
I see the time and date
"Tue Jan 4 23:54:11 2000 0.000000 seconds"
When I write in terminal :
"1|root@rk3288:/ # hwclock -w -f /dev/rtc1"
hwclock: failed: No such file or directory
How to useDS3231 RTC as hardware clock instead rtc0?
•
Posts: 208
Threads: 0
Likes Received: 10 in 10 posts
Likes Given: 0
Joined: Aug 2017
(05-11-2018, 08:22 PM)vintm Wrote: TinkerOS_Android V13.13.0.74
Release Notes
4. Support DS3231 RTC module.
The DS3231 module is connected to the port I2C_1, when I write in terminal :
"1|root@rk3288:/ # hwclock -r -f /dev/rtc1"
I see the time and date
"Tue Jan 4 23:54:11 2000 0.000000 seconds"
When I write in terminal :
"1|root@rk3288:/ # hwclock -w -f /dev/rtc1"
hwclock: failed: No such file or directory
How to useDS3231 RTC as hardware clock instead rtc0?
Hi,
Please try this patch, this patch will remove the original rtc0 device so the DS3231 will become the rtc0.
https://bitbucket.org/TinkerBoard_Androi...roid-6.0.1
•
Posts: 10
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: May 2018
Jamess, thanks for the answer.
I have two questions:
1 Why the command "hwclock -w -f /dev/rtc1" is not executed;
2 What should I do to apply this patch
Sorry for my English
•
Posts: 208
Threads: 0
Likes Received: 10 in 10 posts
Likes Given: 0
Joined: Aug 2017
05-15-2018, 01:10 AM
(This post was last modified: 05-15-2018, 01:10 AM by jamess. Edited 1 time in total.)
(05-14-2018, 08:13 PM)vintm Wrote: Jamess, thanks for the answer.
I have two questions:
1 Why the command "hwclock -w -f /dev/rtc1" is not executed;
2 What should I do to apply this patch
Sorry for my English
1. The android framework will use the /dev/rtc0 to sync the time, maybe it is overridden by the android framework. (I am not sure, just guess)
2. you can reference the below link for rebuild kernel
https://tinkerboarding.co.uk/wiki/index....0.1_kernel
Before building image, please remember apply the patch. Since the patch modify only one line, you can modify the change manually.
Edit the
drivers/rtc/Makefile and comment this line:
obj-$(CONFIG_RK808_RTC) += rtc-rk808.o
•
Posts: 10
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: May 2018
(05-15-2018, 01:10 AM)jamess Wrote: (05-14-2018, 08:13 PM)vintm Wrote: Jamess, thanks for the answer.
I have two questions:
1 Why the command "hwclock -w -f /dev/rtc1" is not executed;
2 What should I do to apply this patch
Sorry for my English
1. The android framework will use the /dev/rtc0 to sync the time, maybe it is overridden by the android framework. (I am not sure, just guess)
2. you can reference the below link for rebuild kernel
https://tinkerboarding.co.uk/wiki/index....0.1_kernel
Before building image, please remember apply the patch. Since the patch modify only one line, you can modify the change manually.
Edit the drivers/rtc/Makefile and comment this line: obj-$(CONFIG_RK808_RTC) += rtc-rk808.o
Thanks for your help!
I thought that if the support is implemented in the kernel, it is enough to correct the file, for example
/lib/udev/rules.d/50-udev-default.rules, or the other and all. And it turns out that it is necessary to edit the kernel.
Well, I will study wiki.
•
Posts: 10
Threads: 1
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: May 2018
Hi, All!
Patch applied. Thanks Jamess.
Kernel assembled.
Now in /dev I see only rtc0. When I put "hwclock -r -f /dev/rtc0", I see "Thu Feb 10 19:51:32 2000 0.000000 second".
But when I put hwclock -w -f /dev/rtc0", i see "hwclock: failed: No such file or directory"
How to set time in DS3231???
•