BBB RTC DS1338

Hello.
I’m trying to get to work RTC using DS1338-33 chip.
I have the chip on custom board, connected to I2C2.
I enabled BB-I2C2-RTC-DS1338 in uEnv.txt
I’m on Debian 11 monthly 2023-07-01

The RTC chip itself is found on I2C line and looks working:
dmesg | grep rtc

[    9.949929] rtc-ds1307 2-0068: registered as rtc0
[    9.951029] rtc-ds1307 2-0068: setting system clock to 2023-10-05T07:41:26 UTC (1696491686)
[    9.955618] omap_rtc 44e3e000.rtc: registered as rtc1
[   49.253389] PM: bootloader does not support rtc-only!

But when I do sudo hwclock -r -f /dev/rtc0 I got

hwclock: Timed out waiting for time change.

If I do cat /sys/bus/i2c/devices/2-0068/rtc/rtc0/time I got the time, but this time is updated only each around 11 minuts.
Similar problem is when I boot the BB, the time set from the RTC is delayed by few minutes.

Any idea?
Thank you

OK, my bad.
I had wrongly soldered crystal (it has 4 pins and only 2 are connected. The crystal was rotated…)
Now it looks working fine :slight_smile:

Be sure to also watch the load capacitance value on that crystal and be sure it matches how much DS1338 loads it. I’ve seen a mismatch there throw its accuracy off by a factor 10.