/* This function is used to enable the Timer frequency counter function.  */
void TIMER_EnableFreqCounter(TIMER_T *timer, uint32_t u32DropCount, uint32_t u32Timeout, uint32_t u32EnableInt)
/* This function is used to enable the Timer frequency counter function.  */
void TIMER_EnableFreqCounter(TIMER_T *timer, uint32_t u32DropCount, uint32_t u32Timeout, uint32_t u32EnableInt)
{
    TIMER_T *t;
    t = (timer == TIMER0) ? TIMER1 : TIMER3;
    t->CMP = 0xFFFFFFUL;
    t->EXTCTL = u32EnableInt ? TIMER_EXTCTL_CAPIEN_Msk : 0UL;
    timer->CTL = TIMER_CTL_INTRGEN_Msk | TIMER_CTL_CNTEN_Msk;
    return;
}