This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Timer

Hi!!

I have a problem with timer. I have MCB2300 board with lpc2378.

In aplication I using RTL kernel, which use TIMER0.

Now I would like to have own timer TIMER3.
I set:


void timer3_irq (void) __irq {

    T3IR |= 0x08;

    LED_out(0x49);

    VICVectAddr = 0;
}


void timer_init(void)
{
    T3MR3  = 0x00003840; //set match channel 3 on 5ms
    T3MCR  = 0x600;      //Match register 3 enable

    //IRQ
    VICVectAddr27 = (unsigned long)timer3_irq;
    VICVectCntl27 = 4; //priority

    VICIntEnable |= 1<<27;

    //reset
    T3TCR = 0x00000003;

    //enable timer
    T3TCR = 0x00000001;
}

.

Have I set wrong?

Thanke for your help

Peter Kic