Hi Emmanuel Trinidad - Alicea Johannes
I create a task, now the task function can work.
just need modify the gel, add following code to gel
#define CM_ALWON_TIMER_1_CLKCTRL (PRCM_BASE_ADDR + 0x1570)
#define CM_ALWON_TIMER_2_CLKCTRL (PRCM_BASE_ADDR + 0x1574)
#define CM_ALWON_TIMER_3_CLKCTRL (PRCM_BASE_ADDR + 0x1578)
#define CM_ALWON_TIMER_4_CLKCTRL (PRCM_BASE_ADDR + 0x157C)
#define CM_ALWON_TIMER_5_CLKCTRL (PRCM_BASE_ADDR + 0x1580)
#define CM_ALWON_TIMER_6_CLKCTRL (PRCM_BASE_ADDR + 0x1584)
#define CM_ALWON_TIMER_7_CLKCTRL (PRCM_BASE_ADDR + 0x1588)
#define CM_TIMER1_CLKSEL (PRCM_BASE_ADDR + 0x0390)
#define CM_TIMER2_CLKSEL (PRCM_BASE_ADDR + 0x0394)
#define CM_TIMER3_CLKSEL (PRCM_BASE_ADDR + 0x0398)
#define CM_TIMER4_CLKSEL (PRCM_BASE_ADDR + 0x039C)
#define CM_TIMER5_CLKSEL (PRCM_BASE_ADDR + 0x03A0)
#define CM_TIMER6_CLKSEL (PRCM_BASE_ADDR + 0x03A4)
#define CM_TIMER7_CLKSEL (PRCM_BASE_ADDR + 0x03A8)
#define CM_ALWON_SPINBOX_CLKCTRL (PRCM_BASE_ADDR + 0x1598)
#define CM_ALWON_MAILBOX_CLKCTRL (PRCM_BASE_ADDR + 0x1594)
hotmenu enableTimers()
{
GEL_TextOut("\tPRCM for dmtimer Initialization in Progress \n","Output",1,1,1);
WR_MEM_32(CM_ALWON_L3_SLOW_CLKSTCTRL, 2);
WR_MEM_32(CM_ALWON_TIMER_1_CLKCTRL, 2);
WR_MEM_32(CM_TIMER1_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_1_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_2_CLKCTRL, 2);
WR_MEM_32(CM_TIMER2_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_2_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_3_CLKCTRL, 2);
WR_MEM_32(CM_TIMER3_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_3_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_4_CLKCTRL, 2);
WR_MEM_32(CM_TIMER4_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_4_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_5_CLKCTRL, 2);
WR_MEM_32(CM_TIMER5_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_5_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_6_CLKCTRL, 2);
WR_MEM_32(CM_TIMER6_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_6_CLKCTRL)&0x30002)>>16)!=0);
WR_MEM_32(CM_ALWON_TIMER_7_CLKCTRL, 2);
WR_MEM_32(CM_TIMER7_CLKSEL, 1); /* Use 32Khz source */
/* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
while(((RD_MEM_32(CM_ALWON_TIMER_7_CLKCTRL)&0x30002)>>16)!=0);
GEL_TextOut("\ttimer Accesses are PASSED \n","Output",1,1,1);
GEL_TextOut("\ttimer Initialization in Done \n","Output",1,1,1);
}
before load program . run enableTimers() first