skyrock123 0 Posted May 28, 2024 hello tinker experts, I'm having issues trying to use rtc in my tinker board, I want it to function so that i get the correct time & date even when I power on my device without any internet connection, now the issues I'm facing are when i connect the rtc module to the tinker board by connecting pin3 and pin5 to the corresponding pins and a cmos battery already connected to rtc module, im getting linaro@linaro-alip:/$ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- what does this mean and the thing i dont understand is even when i disconnect the rtc module and make sure there are no i2c connections are connected on board im getting linaro@linaro-alip:/$ sudo hwclock -r -f /dev/rtc0 2024-05-28 13:26:15.099234+05:30 my hardware config is ##### Hardware Interface Config ##### ## Note: fiq_debugger and uart3 use the same pin. Set fiq_debugger first while $ ## Note: uart4 and spi0 are the same pins. Set the latter one while both on. ## ## Note: uart2 is the same pins to pwm2 and pwm3. Set the latter one while both$ intf:fiq_debugger=on intf:i2c1=on intf:i2c4=on #intf:spi0=off #intf:spi2=off #intf:pwm2=off #intf:pwm3=off intf:pcm_i2s=on intf:uart1=on intf:uart2=on intf:uart3=on intf:uart4=on i dont understand why, i just want to get correct date and time between power on and offs even when there is no internet connection.. can some one guide me through the steps required to achieve this functionality Share this post Link to post Share on other sites
tooz 53 Posted May 29, 2024 hello @skyrock123, 1. the default rtc is rk808-rtc on i2c bus, you'll need to connect to the the internet at least once to sync time, with command sudo hwclock -w so that the system time (rk808-rtc) is updated 2. if you use the command: sudo i2cdetect it'll list the usage that you might want to have a check, otherwise you can have a look at this page: https://manpages.debian.org/unstable/i2c-tools/i2cdetect.8.en.html 3. 21 hours ago, skyrock123 said: im getting linaro@linaro-alip:/$ sudo hwclock -r -f /dev/rtc0 if there's no external rtc module, then the data from rk808-rtc would be fetched with this command. if you're not able to connect to the internet to sync time, you can change the time and date manually with command: hwclock --set --date "2024-05-29 11:30:00" for your reference: https://www.thegeekstuff.com/2013/08/hwclock-examples/ Share this post Link to post Share on other sites