/* This function is called to initialize system tick source (typically a timer generating interrupts every 1 to 100 mS). We decided to use Core Timer as the tick interrupt source.  */
void rt_hw_core_timer_init(void)
/* This function is called to initialize system tick source (typically a timer generating interrupts every 1 to 100 mS). We decided to use Core Timer as the tick interrupt source.  */
void rt_hw_core_timer_init(void)
{
    *pTCNTL   = 1;
    *pTSCALE  = 0x00;
    *pTCOUNT  = CCLKSPEED / RT_TICK_PER_SECOND;
    *pTPERIOD = CCLKSPEED / RT_TICK_PER_SECOND;
    register_handler(ik_timer,rt_hw_timer_handler);
    *pTCNTL    = 0x07;
}