Welcome, Guest

Author Topic: A20-SOM204 and integrated RTC  (Read 307 times)

Titomax

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
A20-SOM204 and integrated RTC
« on: May 31, 2019, 11:29:09 AM »
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

  • Hero Member
  • *****
  • Posts: 1725
  • Karma: +33/-48
Re: A20-SOM204 and integrated RTC
« Reply #1 on: May 31, 2019, 01:57:13 PM »
In case that's not the most recent Olimex image, try it and does it behave the same?

John

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1967
  • Karma: +50/-3
Re: A20-SOM204 and integrated RTC
« Reply #2 on: June 04, 2019, 11:36:09 AM »
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

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: A20-SOM204 and integrated RTC
« Reply #3 on: June 10, 2019, 06:17:52 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1967
  • Karma: +50/-3
Re: A20-SOM204 and integrated RTC
« Reply #4 on: June 10, 2019, 11:20:35 PM »
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