MPC5748G PIT interrupt problem

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

MPC5748G PIT interrupt problem

1,219件の閲覧回数
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 返答(返信)

850件の閲覧回数
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 件の賞賛
返信

850件の閲覧回数
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

850件の閲覧回数
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

850件の閲覧回数
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