AnsweredAssumed Answered

TIMERs  on BF525

Question asked by anjana on Sep 16, 2010
Latest reply on Oct 9, 2010 by Prashant



We are using BF525 processor in our application, where we are configuring the timer0  for every 10msec as a  free running timer and also we are configuring the pg9 as input interrupt..  What is happening is it is always stucking in the timer interrupt handler only....



What i thought the reason for the above case is both timer ang PG9 are using ivg12 as the interrupt vector.  so only some conflict is happening between them,  so can u please help me how can we handle in software  for the above problem.


The code snippe for initializing the timer and input interrupt are




void Init_Interrupts_pg9(void)



    register_handler(ik_ivg12,FLAG_ISR);    // IVG12 is default flag intr. vector

    *pSIC_IMASK1 |= 0x00000100;            // masking pg intr A


}//end Init_Interrupts


void Init_Interrupts_timer0(void)



    register_handler(ik_ivg12,FLAG_ISR);    // IVG12 is default flag  intr. vector

    *pSIC_IMASK1 |= 0x00000001;            //  masking timer0


}//end Init_Interrupts


void Init_Timer0(void)
    *pTIMER0_CONFIG = 0x0019;// Configure Timer Period
    *pTIMER0_PERIOD = 1330000;//for 10ms
    *pTIMER0_WIDTH = 0x00000000; // Configure Timer Width
    *pTIMER_ENABLE = 0x0001; // Enable Timer0




  *pTIMER_STATUS |= 0x00000001;//CLEAR INTERRUPT(timer0 is a free running timer)