Forums - RTC not writable on QCS610

4 posts / 0 new
Last post
RTC not writable on QCS610
thermalglass
Join Date: 10 Feb 22
Posts: 1
Posted: Mon, 2023-10-16 04:48

Hi,
we're using the Lantronix OpenQ-610 SOM with QCS610.LE.1.0. Setting RTC with the Linux command "hwclock -w" doesn not work with Linux kernel 4.14-202.
If I enable write in the device-tree for the pm6150_rtc node "hwclock -w" doesn't work either. I receive "disallowed SPMI write to sid=0, addr=0x6046" in the dmesg. Otherwise RTC seems to be running, only I can't change the actual time.

What else needs to be done for making RTC (hwclock) writable?
Thanks for any hint!

  • Up0
  • Down0
clavin.rali
Join Date: 18 Jan 21
Posts: 4
Posted: Thu, 2023-11-30 22:20

You can read the RTC time but writing to the RTC is not allowed and is disabled as per Qualcomm's design. You cannot write to RTC. It's just that! The current time is maintained by saving the difference between the current system time and the RTC time (Td = Curr_time - Rtc_time). If you ask for Qualcomm Support they will provide you this fix. However, If you really want to write to RTC as if your life depends on it then there are changes in the Non-HLOS which require Qualcomm's Support.

  • Up0
  • Down0
clavin.rali
Join Date: 18 Jan 21
Posts: 4
Posted: Thu, 2023-11-30 23:38

You can read the RTC time but writing to the RTC is not allowed and is disabled as per Qualcomm's design. You cannot write to RTC. It's just that! The current time is maintained by saving the difference between the current system time and the RTC time (Td = Curr_time - Rtc_time). If you ask for Qualcomm Support they will provide you this fix. However, If you really want to write to RTC as if your life depends on it then there are changes in the Non-HLOS which require Qualcomm's Support.

  • Up0
  • Down0
2105.msc22
Join Date: 28 Nov 23
Posts: 2
Posted: Sun, 2023-12-24 03:34

Here's what you need to know about the RTC on the QCS610:

- Writing to the RTC is not allowed: Qualcomm has disabled this functionality by design. This means you cannot directly modify the RTC's time value.

- Timekeeping workaround: The system maintains accurate time by using a workaround: - It stores the difference between the current system time and the RTC time (Td = Curr_time - Rtc_time). - When the system boots up, it reads the RTC time and adds the stored difference to get the accurate current time.

- Implications for development: - If your application requires precise timekeeping, it's essential to account for this limitation. - You'll need to rely on system timekeeping mechanisms and potentially implement additional time synchronization strategies using external sources (NTP, GPS, etc.).

- Potential reasons for the restriction: - Power management optimization: Disabling RTC writes might contribute to lower power consumption. - Security considerations: Preventing direct RTC modification could enhance system security in certain scenarios. - Hardware design constraints: The RTC hardware itself might not support write functionality.

To ensure accurate timekeeping in your QCS610 applications:

  1. Utilize system timekeeping APIs: Use the provided system functions to access and manage time information, which will apply the necessary adjustments based on the RTC workaround.
  2. Consider external synchronization: If your application demands high-precision timekeeping, explore external synchronization methods such as NTP or GPS to maintain accuracy over time.
  3. Consult Qualcomm documentation: Refer to Qualcomm's documentation and support resources for further guidance and best practices regarding timekeeping on the QCS610 platform.
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.