MPC5748G PIT interrupt problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5748G PIT interrupt problem

1,103 次查看
yukunwu
Contributor III

hello ,everyone:

      I have test the NXP-example about hello+pll+interrupt. It works well,PIT0 generates the interrupt in Core 0 and toggles the DS4 LED at every 1s.

      I'm trying to do it by myself and i created a project.

      1.enable the interrupt

      2.set clock

      3.Enable PIT module and Initialize PIT0

      4.In interrupt routines,DS4 = ~DS4;

 

   but it doesn't work...why?

   attachment is my project.

 

Best Regards

Yukun Wu

Original Attachment has been moved to: button.zip

标记 (3)
4 回复数

734 次查看
yukunwu
Contributor III

Hi,Peter:

      yeah~That's the point,i forgot to define it.

      Now it works well.

      Thank your very much!!

Best Regards

Yukun Wu

0 项奖励

734 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,your example seems fine,

However I can't see where you set interrupt priority.

If your priority for interrupt source is 0, then no interrupt will happen.

Peter

734 次查看
yukunwu
Contributor III

Hello, Peter:

      Thanks for your apply.

      I set the interrupt priority at “pit.c”

      I think i found this problem . I didn't define PIT0 in "intc_SW_mode_isr_vectors_MPC5748G.c",It should be 226 ,and the dummy should point to PIT0_isr().

      Am i right?

Best Regards

Yukun Wu

734 次查看
petervlna
NXP TechSupport
NXP TechSupport

Yes, you have to place your ISR into ISR vector table if you want IVOR4 handler to jump to your ISR.
Peter