lpc2378 timer blink sample

hello ı need lpc2378(olimex lpc-p2378 dev.board) timer blink sample for eclipse.

someone help me about this.

regards…

isma

any ideas :?:

Hellllppp :cry:

void Initialize(void);
void feed(void);

void IRQ_Routine (void)   __attribute__ ((interrupt("IRQ")));
void FIQ_Routine (void)   __attribute__ ((interrupt("FIQ")));
void SWI_Routine (void)   __attribute__ ((interrupt("SWI")));
void UNDEF_Routine (void) __attribute__ ((interrupt("UNDEF")));

void T0isr (void) ;
/**********************************************************
                  Header files
 **********************************************************/
#include "LPC23xx.h"
#include "type.h"
#include "irq.h"
#include "target.h"
#include "fio.h"

int r;

void  main (void)  {

	IODIR0 = 0x00200000;            // P0.21  Output 

	VPBDIV   = 0x00000002;        
	PINSEL0 |= 0x00000000;        

	T0PR    = 0x0000001E;       
	T0TCR    = 0x00000002;       
	T0MCR    = 0x00000003;         



	T0MR0   = 0x00001600;     
	T0TCR    = 0x00000001;       

	VICVectAddr4 = (unsigned)T0isr;   
	VICVectCntl4 = 0x00000024;      //4 No int enable (Timer0)
	VICIntEnable |= 0x00000010;      //Timer 0 int enable

    while(1);
}

/******************************************************
        Timer 0 interrupt
******************************************************/

void T0isr (void)  {
    r=(r+1)&1;
   if (r==1)
	   IOSET0 =  0x00200000;                      /* Turn off LED */
   else
	   IOCLR0 =  0x00200000;                      /* Turn on LED */

   T0IR |= 0x00000001;         
    VICVectAddr = 0x00000000;         //Dummy write to signal end of interrupt
}








/*  Stubs for various interrupts (may be replaced later)  */
/*  ----------------------------------------------------  */

void IRQ_Routine (void) {
	while (1) ;
}

void FIQ_Routine (void)  {
	while (1) ;	
}


void SWI_Routine (void)  {
	while (1) ;	
}


void UNDEF_Routine (void) {
	while (1) ;	
}

where is my fault? :cry:

up