Part Number: AM3352
Tool/software: TI-RTOS
yeah me again...
So we have a new custom board and i cannot seem to access the RTC registers
I am trying to use TI RTOS and some custom code to boot this thing
i know i need to turn on the functional clocks in order to access the registers. i see in the integration section of the RTC in the tech manual that the functional clocks are PD_RTC_RTC32KCLK (which doesn't show up anywhere else in the document when you do a search so it's hard to track down) and CLK_32K_RTC
my problem begins with 2 parts and i don't know which is causing which. when i look at my crystal when i power on my board (no code is loaded in the board) i get no signal. when i try to enable the clocks using the call:
enableModule(CM_RTC_RTC_CLKCTRL,
CM_RTC_CLKSTCTRL,
CM_RTC_CLKSTCTRL_CLKACTIVITY_L4_RTC_GCLK);
which calls this routine:
void enableModule(volatile U32 *clkCtrlReg, volatile U32 *clkStCtrlReg, U32 clkActMask)
{
/* Enable the module */
*clkCtrlReg = PRCM_MODULEMODE_ENABLE;
/* Check for module enable status */
while(PRCM_MODULEMODE_ENABLE != (*clkCtrlReg & PRCM_MODULEMODE_MASK));
/* Check clock activity - ungated */
while(clkActMask != (*clkStCtrlReg & clkActMask));
/* Check idle status value - should be in functional state */
while((PRCM_MODULE_IDLEST_FUNC << PRCM_IDLE_ST_SHIFT) != (*clkCtrlReg & PRCM_IDLE_ST_MASK));
}
it gets caught up in the last while loop:
while((PRCM_MODULE_IDLEST_FUNC << PRCM_IDLE_ST_SHIFT) != (*clkCtrlReg & PRCM_IDLE_ST_MASK));
and i don't know if the code gets caught up because there is no signal or if there is no signal because the clock isn't enabled. or maybe i am enabling the wrong one first.
so i cannot see or access the RTC registers. when i look at the CM_RTC_CLKSTCTRL register i see the clocks are active and the module is in SW_WKUP. when i look at CM_RTC_CLKCTRL it is in a Trans state and never leaves
my gel file is based on the beagle bone black gel file, and when i emulate on the beagle bone black board using the same code, using the same emulator (i added a jtag header), but with the beagle bone black gel file i get the RTC registers just fine. when i compare our hardware schematics against the beagle bone they are very similar.
i am thinking that since the beagle bone black board had code on it, it initializes the RTC clocks before i get a chance to emulate on it, and by the time i run my code on it, everything has already been enabled so it seems fine. so i am thinking i am missing something that allows the RTC clock to operate but i cannot figure out what that is
