A20-SOM204 and integrated RTC

Started by Titomax, May 31, 2019, 11:29:09 AM

Previous topic - Next topic

Titomax

Hi,
we are working with A20-SOM204 using the following Linux image:

"ARMBIAN 5.76 user-built Ubuntu 16.04.6 LTS 3.4.113-sun7i"

In our application we need a clock reference with a good accuracy and we are trying to rely on the internal A20 RTC module with a CR2032 battery as backup power source.
The RTC seems working but we noticed a poor accuracy on a lot of SOM modules. We suppose the kernel image is using the integrated internal 32Khz RC instead of the external 32.768KHz crystal assembled on the PCB.

1) How can we verify which clock source the system is using for RTC time reference ?

2) How can we change RTC clock source from internal RC to external XTAL ?

Thank for your help...



JohnS

In case that's not the most recent Olimex image, try it and does it behave the same?

John

LubOlimex

The RTC should be alright but as John suggested, try with the newer image available here: ftp://staging.olimex.com/Allwinner_Images/A20-OLinuXino/1.latest_mainline_images/bionic/images/

If the FTP download is slow maybe try the torrent.

Testing with a newer image would be a quicker way to determine possible software mis-confiugration or RTC driver bugs.

The initial user and password combo is root, 1234

More info about the image can be found here: https://www.olimex.com/wiki/ArmbianHowTo
Technical support and documentation manager at Olimex

Titomax

As I wrote we are working with the last updated image based on the legacy kernel.
Our project is in advanced state so we cannot change kernel or BSP image from the "3.4.113-sun7i".

We are trying to verify if the RTC low accuracy derives from a wrong setting in the RTC clock selection register or from other problems (see points 1 and 2 in my previous post).

We are going to test the latest image on the EVB to confirm that the same SOM produces the same accuracy error. Anyway, in the end, we'll need to apply some patches to our custom image as we cannot switch to mainline kernel version.




LubOlimex

Yes, simply test if it is something wide spread and compare. It is not something that had been reported previously so I don't think it is a hardware issue. The test with the official image would narrow down the possibilities.
Technical support and documentation manager at Olimex