Veronica Amigo

problem with general purpose timer

Discussion created by Veronica Amigo on Apr 2, 2007
Latest reply on Apr 2, 2007 by Paul McConkey
Hello, I have a problem with the GPT (general Purpose to timer).
I want to put a timer each 1 mseg and I do this,
void GPTimers_inicializa(void)
     MCF_GPT_GPTIOS = 0x01;   //Habilita los 4 GPT como output compare
    MCF_GPT_GPTSCR1 = MCF_GPT_GPTSCR1_GPTEN; //habilita cualquier
    MCF_GPT_GPTIE = MCF_GPT_GPTIE_CI(0x01);  //habilita la interrupcion del GPT0
    MCF_GPT_GPTSCR2 =MCF_GPT_GPTSCR2_PR(0x00); //Prescaler, 30MHz
    MCF_GPT_GPTFLG1 = 0x00; //limpia los chanel flags
    MCF_GPT_GPTFLG2 = 0x00; //limpiar flags
   MCF_GPT_GPTC1 = 0;
   MCF_GPT_GPTC2 = 0;
   MCF_GPT_GPTC3 = 0;

int main()
 while(1); // Idle
 return 0;
and also initialize the interrupt vectors. That I am making bad? or, that I need to do? Thanks