arjun.a
rename files
6c7b14a
raw
history blame
2.46 kB
Ticket Name: Realtime clock (RTC) subsystem time and calendar register not writeable?
Query Text:
We are trying the TDA2xx RTC subsystem for time and calendar (TC) use. There appear to be problems writing to the TC registers. At the same time I can write to the a SCRATCH register and later read the correct value from it. I cannot do this for the TC registers, even the SECONDS register does not store the values. In addition the seconds is not counting since reading from that register is always '0'. Are there differences between setting up the TC registers and SCRATCH registers? We are configuring using the internal clock source. Thanks
Responses:
Hi Dan, Do you use func clock from the PRCM or from the external rtc_osc_xi_clkin32 pin? What values you have in the below two registers? CM_RTC_CLKSTCTRL CM_RTC_RTCSS_CLKCTRL Make sure you follow the below TDA2x TRM sections: 23.4.1 Clock Source 23.4.3.3 OCP MMR Spurious Write Protection 23.4.3.5 Modifying the TC Registers 23.5.1.2 RTC Module Global Initialization Regards, Pavel
Hi Pavel, Yes, first we are using the PRCM and wanted to pull the rtc_osc_xi_clkin32 pin low as suggested, however cannot find the actual pin pad location. It is not in the TRM. I am checking the other items you suggest, I have looked at those things. First is the RTC_STATUS_REG returns 0x0, which I was thinking it should be 0x2, which indicates the RTC is running. Am checking further. Thanks, Dan
Dan, Dan Zulaica said: Yes, first we are using the PRCM and wanted to pull the rtc_osc_xi_clkin32 pin low as suggested, however cannot find the actual pin pad location. It is not in the TRM. Pad locations are documented in DM (data manual), not TRM. For TDA2Hx-17 (SPRS952A), rtc_osc_xi_clkin32 is at AA13. Regards, Pavel
Hi Dan, I would like to highlight some spots that Pavel already pointed to. 1. Make sure RTC is enabled in PRCM - CM_RTC_CLKSTCTRL[1:0] CLKTRCTRL = 0x3 - CM_RTC_RTCSS_CLKCTRL[1:0] MODULEMODE = 0x2 2. Make sure RTC Register protection is turned off - RTC_KICK0_REG = 0x83E70B13 - RTC_KICK1_REG = 0x95A4F1E0 3. Select internal clock - RTC_OSC_REG[3] 32KCLK_SEL = 0 4. Enable clock -RTC_OSC_REG[6] 32KCLK_EN = 1 5. Start RTC runnig - RTC_CTRL_REG[0] STOP_RTC =1 6. Check RTC is running - RTC_STATUS_REG[1] RUN == 1 OR - See if seconds are updating Please be aware that internal 32-k clock is made of SYS_CLK1 div 610 and will be close to 32,768kHz only if you use SYS_CLK1 @20MHz. Best regards, Stan