Hi all, I seem to have weird issues with the RTC on A20 and was wondering if someone could help. I also think that this is a good topic since up to now I haven't been able to find much info on sunxi's integrated RTC on the web. Usually people just give up and use DS1307 or similar which I would avoid honestly.
So regarding issues, this is where I'm at right now: 1. Contrary to A20 datasheet, RTC VDD should be in fact 1.3V, just like on original Allwinner EVB and Olimex Olinuxino-Micro-A20. I have tried with 3V3 also (LDO1SET tied to VINT) and this fried RTC on one of my boards :(. Luckily the board is still functional, but RTC ain't coming back. 2. On the first board boot (no power applied before, no battery), RTC driver will complain that it can't set the LOSC to external oscillator. Don't really know why. It will also complain about time being wrong, but this is normal. After one reboot however, RTC will not complain about external oscillator anymore (implying that external is now working?) and will keep the time. From this moment on, if AXP is kept alive by either battery or backup battery, RTC will keep its time. 3. Up to now I haven't been able to see anything from 32k crystal on scope - no signal whatsoever, just some DC at the input and output. This could be due: - 32k crystal not working (either something wrong on A20 SW side, or on pcb - caps not matched or similar), - 32k crystal working, but scope probe capacitance kills the oscillations. However, I can verify that RTC still ticks once the probe is on one of its pins... I have almost ruled out the HW side, since all is good on the board (triple-checked, custom A20 board, behaves much like Olinuxino A20), so I'll be focusing on SW to see if there's something in the RTC driver which is wrong. Currently it's be very helpful if someone could shed some light on the following bits of LOSC_CTRL_REG: - EXT_LOSC_GSM, no idea what it is, but sounds like gain - so far tried "10" (default) and "11", doesn't really have any effect, - CLK32K_AUTO_SWT_PEND and CLK32K_AUTO_SWT_EN - haven't tried these, as I have no idea what they're for. Maybe for switching between internal/external oscillator? So if anyone's got any thoughts or ideas, please share :) If I find something out, I'll post back as well. Cheers! -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.