I am using the 52223 EVB and this is what I have come up with but it does not work. ANY IDEAS
__interrupt__ void handler_pit0_int (void);
void InitializeInterrupt(void)
{
MCF_PIT0_PCSR |= MCF_PIT_PCSR_OVW;
/* Update PMR and then enable timer */
MCF_PIT0_PMR = MCF_PIT_PMR_PM(0x7c);
MCF_PIT0_PCSR = MCF_PIT_PCSR_PRE(0x5) |
MCF_PIT_PCSR_PIE |
MCF_PIT_PCSR_RLD |
MCF_PIT_PCSR_EN;
/* PIT1 disabled (PCSR1[EN]=0) */
MCF_PIT1_PCSR = 0;
}
/////////////////////////////////////////////////////////////////////////
void
mcf5xxx_irq_enable (void)
{
asm_set_ipl(0);
}
/********************************************************************/
void
mcf5xxx_irq_disable (void)
{
asm_set_ipl(7);
}
/********************************************************************/
/////////////////////////////////////////////////////////////////////
__interrupt__ void handler_pit0_int (void)
{
//Interrupt code
/* Clear interrupt IF*/
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;
}