This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X RTC control

Hi,
 
We are debugging the AM335X RTC function. We found that we couldn't be able to modify the RTC_OSC_REG register to set the clock source.
we checked the CM_RTC_RTC_CLKCTRL and CM_RTC_CLKSTCTRL. The RTC clocking is enabled. We also checked PM_RTC_PWRSTCTRL, it was correct. But PM_RTC_PWRSTST is 0x0 which means the logic is OFF. Do we need to switch on other control?
  • You need to Unlock the rtc's registers (a kicker mechanism to prevent any spurious writes from changing the register values)

    In the latest ARM335x TRM (SPRUH73H), kindly look at 20.3.3.5.3 OCP MMR Spurious WRT Protection

    Also from the board file (http://arago-project.org/git/projects/?p=linux-am33x.git;a=blob;f=arch/arm/mach-omap2/board-am335xevm.c;h=b3d8b0634ab253e5d5e98721f11386b3b720e18d;hb=d7e124e8074cccf9958290e773c88a4b2b36412b

    look at am335x_rtc_init()