52259

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

52259

909件の閲覧回数
fafvin
Contributor I

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++; }}
ラベル(1)
0 件の賞賛
返信
1 返信

745件の閲覧回数
mjbcswitzerland
Specialist V

Hi

 

Have you enabled interrupts to the processor core? That is, changed the SR from x7xx to x0xx ? (_asm_int_on() or similar)

 

Regards

 

Mark

 

0 件の賞賛
返信