MPC5748G PIT interrupt problem

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5748G PIT interrupt problem

464 Views
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

Tags (3)
4 Replies

95 Views
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 Kudos

95 Views
petervlna
NXP Employee
NXP Employee

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

95 Views
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

95 Views
petervlna
NXP Employee
NXP Employee

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