Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 148978

Forum Post: AM335x RTC clock initialization

$
0
0

Hello,


we use RTC peripheral of the AM3352 processor. Following initialization sequence is executed:

   /* Performing the clock configuration for RTC. */    moduleClkConfig();     /* Disabling write protection for RTC registers */    HWREG(SOC_RTC_0_REGS + RTC_KICK0) = RTC_KICK0R_KEY;    HWREG(SOC_RTC_0_REGS + RTC_KICK1) = RTC_KICK1R_KEY;     /* Selecting Internal Clock source for RTC by */    /* clearing the 32KCLK_SEL bit in Oscillator register. */    HWREG(SOC_RTC_0_REGS + RTC_OSC) &= ~(RTC_OSC_32KCLK_SEL);     /* Enabling RTC to receive the Clock inputs. */    HWREG(SOC_RTC_0_REGS + RTC_OSC) &= ~(RTC_OSC_32KCLK_EN);    HWREG(SOC_RTC_0_REGS + RTC_OSC) |= (RTC_32KCLK_ENABLE & RTC_OSC_32KCLK_EN);     /* Perform dummy reads until clock is available */    for(i=0; i<1000; i++)    {       status = HWREG(SOC_RTC_0_REGS + RTC_STATUS);    }     /* Enable the RTC module. */    HWREG(SOC_RTC_0_REGS + RTC_CTRL) &= ~(RTC_CTRL_RTCDISABLE);

We would like to user the internal clock source derived from PLL. In the initialization sequence we inserted some dummy reads. If we not insert this, the first set of the time and date information is excepted well.
So is there any timing requirements of clock before the RTC module can be enabled?

Thanks for your assistance in advance.

Regards,

Andreas


Viewing all articles
Browse latest Browse all 148978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>