Other Parts Discussed in Thread: AM3354
Tool/software: TI-RTOS
Hi all..
I am using a AM3354 development board(Variscite AM3354 + evaluation kit),
Windows 10 64bit, CCS v7.3, pdk-rtos-am335x-4.2.0.9, ndk-2.26.0, XDS100-v3 JTAG
When I use the example file, CCS shows the register value. (Checked in memory browser)
The basic example(benchmark or others) code has confirmed that it works.
(Actually the nimu example is not working perfectly, but the negotiation is OK.
However, when executed using the actual register access code, an error occurs at that position.
ex)
Board init code in examples, Board_init(boardCfg); This part works fine.
But, in my code,
enableModule(SOC_CM_RTC_REGS, CM_RTC_RTC_CLKCTRL,
CM_RTC_CLKSTCTRL,
CM_RTC_CLKSTCTRL_CLKACTIVITY_L4_RTC_GCLK);
enableModule(SOC_CM_RTC_REGS, CM_RTC_RTC_CLKCTRL,
CM_RTC_CLKSTCTRL,
CM_RTC_CLKSTCTRL_CLKACTIVITY_RTC_32KCLK);
these call the next function
void enableModule(uint32_t domainOffset, uint32_t clkCtrlReg,uint32_t clkStCtrlReg, uint32_t clkActMask)
{
/* Enable the module */
//HW_WR_REG32(domainOffset + clkCtrlReg, PRCM_MODULEMODE_ENABLE);
*(volatile uint32_t *) (domainOffset + clkCtrlReg) = PRCM_MODULEMODE_ENABLE; <- CortxA8: Unhandled ADP_Stopped exception 0x20023 occured!!!
/* Check for module enable status */
while(PRCM_MODULEMODE_ENABLE !=
(HW_RD_REG32(domainOffset + clkCtrlReg) & PRCM_MODULEMODE_MASK));
/* Check clock activity - ungated */
while(clkActMask != (HW_RD_REG32(domainOffset + clkStCtrlReg) & clkActMask));
/* Check idle status value - should be in functional state */
while((PRCM_MODULE_IDLEST_FUNC << PRCM_IDLE_ST_SHIFT) !=
(HW_RD_REG32(domainOffset + clkCtrlReg) & PRCM_IDLE_ST_MASK));
}
I do not know why an error occurs when I run the same process as the example.