William Fafvin

52259

Discussion created by William Fafvin on Mar 28, 2011
Latest reply on Mar 28, 2011 by Butcher

Hello,

 

My board is MCF52259DEMOMCU

I tried many times to get interrupt controller trapped but no use.

The PIT0 has worked since I check its counter and see the flag on. But it hasn't jumped into exception vector. I cannot do anything because the interrupt isn't executed as it should be!

Could someone tell me why? Thanks!

void test_timer() { // enable interrupt // PIT0 - 55 MCF_INTC0_ICR55 = MCF_INTC_ICR_IL(5) | MCF_INTC_ICR_IP(5); MCF_INTC0_IMRH &= ~(MCF_INTC_IMRH_INT_MASK55 | MCF_INTC_IMRL_MASKALL); //config timer MCF_PIT0_PCSR = 0; MCF_PIT0_PCSR = MCF_PIT_PCSR_EN | MCF_PIT_PCSR_PIE | MCF_PIT_PCSR_PRE(0); }int main(void){ int counter = 0; __initialize_hardware(); test_timer();#if (CONSOLE_IO_SUPPORT || ENABLE_UART_SUPPORT)  printf("Hello World in C from MCF52259 derivative on MCF52259 board\n\r");#endif for(;;) {         counter++; }}

Outcomes