Problem with RTC board

Discussion of official MiSTer Project addons. (https://github.com/MiSTer-devel/Hardware_MiSTer)


blue1
Posts: 2
Joined: Wed Jan 20, 2021 8:57 pm
Has thanked: 1 time

Problem with RTC board

Unread post by blue1 »

I have installed the RTC board (v 1.3). However, I cannot make it work:

Code: Select all

/root# hwclock --verbose
hwclock from util-linux 2.35.1
System Time: 497.303743
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
ioctl(3, RTC_UIE_ON, 0): Invalid argument
Waiting in loop for time from /dev/rtc0 to change
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
...synchronization failed
In /var/log/messages, the kernel says:

Code: Select all

Jan  1 00:00:02 MiSTer user.info kernel: [    0.269018] rtc-m41t80 1-0068: registered as rtc0
Jan  1 00:00:02 MiSTer user.warn kernel: [    0.269645] rtc-ds1307: probe of 1-006f failed with error -5
Jan  1 00:00:02 MiSTer user.info kernel: [    0.269687] i2c-gpio i2c_gpio: using lines 2012 (SDA) and 2013 (SCL)
Jan  1 00:00:02 MiSTer user.err kernel: [    0.270815] rtc-m41t80 1-0068: hctosys: unable to read the hardware clock
FWIW, I have checked the CR1220 battery and it's ok.

Do I have a faulty board or is a kernel problem of some sorts?

Thanks
User avatar
legacypixels
Posts: 91
Joined: Sun May 24, 2020 9:20 pm
Has thanked: 25 times
Been thanked: 25 times

Re: Problem with RTC board

Unread post by legacypixels »

If your clock has never been setup, it may have invalid data. Have you tried "hwclock -wu" a couple times?
US based seller of MiSTer addon boards. Visit https://www.legacypixels.com/mister
blue1
Posts: 2
Joined: Wed Jan 20, 2021 8:57 pm
Has thanked: 1 time

Re: Problem with RTC board

Unread post by blue1 »

legacypixels wrote: Thu Jan 21, 2021 5:49 pm If your clock has never been setup, it may have invalid data. Have you tried "hwclock -wu" a couple times?
That solved it! Thanks!!!
-N2
Posts: 34
Joined: Fri Aug 14, 2020 11:23 am
Been thanked: 1 time

Re: Problem with RTC board

Unread post by -N2 »

Where are the instructions for setting up the RTC for the first time?
fenderc01
Posts: 21
Joined: Fri Oct 02, 2020 11:43 am
Has thanked: 16 times
Been thanked: 8 times

Re: Problem with RTC board

Unread post by fenderc01 »

-N2
Posts: 34
Joined: Fri Aug 14, 2020 11:23 am
Been thanked: 1 time

Re: Problem with RTC board

Unread post by -N2 »

yeah I discovered you have to set the system time first manually before anything on that page will work.
C-R-T
Posts: 205
Joined: Wed Mar 03, 2021 5:10 pm
Has thanked: 21 times
Been thanked: 92 times

Re: Problem with RTC board

Unread post by C-R-T »

Hi! I have a problem too.

I go to the Linux console with F9, login with root as user, 1 as password. This is not a problem.

I try hwclock -wu - it says invalid argument
I try hwclock -u - it says the same.

I try JUST hwclock - same message.

This does not seem to work at all, or am I doing something wrong? My Mister is fully updated with update-all.sh.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Problem with RTC board

Unread post by jca »

Just run rtc.sh.
C-R-T
Posts: 205
Joined: Wed Mar 03, 2021 5:10 pm
Has thanked: 21 times
Been thanked: 92 times

Re: Problem with RTC board

Unread post by C-R-T »

Thanks, man! Another case of the wiki being outdated and wrong?
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Problem with RTC board

Unread post by jca »

I think all the scripts are not even described anywhere.
I think the problems you had are due to the fact that on a newly installed board the clock contains garbage and must be set before you can use the -u function.
You can also set the time zone with the timezone.sh.
-N2
Posts: 34
Joined: Fri Aug 14, 2020 11:23 am
Been thanked: 1 time

Re: Problem with RTC board

Unread post by -N2 »

jca wrote: Tue Apr 06, 2021 7:49 pm I think all the scripts are not even described anywhere.
I think the problems you had are due to the fact that on a newly installed board the clock contains garbage and must be set before you can use the -u function.
You can also set the time zone with the timezone.sh.
yeah pretty much, nothing would work till I manually set the time to something close to reality. after that it worked as intended.
Post Reply