Hi !
From official doc for this device I cannot find the VICVectCntl definition : http://www.keil.com/dd/docs/datashts/philips/lpc23xx_um.pdf
I see this register in Blinky Example code but dont't kown howto to handle it ?
Thanks for response.
Right. Thanks for the link. I post here my code if it helps.
//! User timer1 interrupt routine static T_PISR pTimerUserRoutine = NULL ; //! Initialize timer 0 /*! Does nothing as TIMER0 is reserved for OS */ void timer0_init() { // Do nothing } //! routine called when TIMER1 TC match T1MR0 void T1_MR0_ISR (void) __irq { // Call user defined function (*pTimerUserRoutine)() ; T1IR |= 0x1; /* Reset MR0 interrupt flag */ VICVectAddr = 0; /* Acknowloedge interrupt - necessary - */ } //! Initialize timer 1 /*! Timer 1 will be used for periodic loop It will generate interrupt and call our routine \param timeout : value to set, unit O.1ms \param pIsr : pointer to our PISR function. if NULL no interrupt is set. \note : timer is disabled after calling this function */ void timer1_init(unsigned int timeout, T_PISR pIsr) { timer_disable(1) ; timer_reset(1) ; T1CTCR &= 0xFC ; /* bits 1:0 Select Timer Mode */ T1PR = 0 ; /* Increment Prescaler at each cycle*/ T1MCR |= (1 << 1) ; /* bit1 Reset on MR0 Match */ T1MR0 = (timeout * 1200) ; /* timeout * 1E-4 * 12E6 */ if (pIsr != NULL) { T1MCR |= 1 ; /* Generate interrupt on match */ pTimerUserRoutine = pIsr ; VICVectAddr5 = (unsigned long)T1_MR0_ISR ; /* Set Interrupt Vector */ VICIntEnable |= (1 << 5) ; /* Enable Timer1 Interrupt */ VICIntSelect &= ~(1 << 5) ; /* Enable Timer1 Interrupt */ VICVectPriority5 = 0 ;/* Set it to the most priority 0-15 */ // VICVectCntl5 = 15; /* I see it in example code but not documented & work whitout */ } }