how to enter LPIT0_Ch1_IRQHandler interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to enter LPIT0_Ch1_IRQHandler interrupt

1,474 Views
jerryxie1
Contributor II

hi 

   I want to use LPIT0_Ch1, modify demo hello_interrupts,initial config  is as follow, enable interrupt  flag lpit_ch1,but can not enter LPIT0_Ch1_IRQHandler ,  how to enter LPIT0_Ch1_IRQHandler interrupt? TKS

pastedImage_1.png

0 Kudos
4 Replies

1,132 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Did you enable the interrupt?

void NVIC_init_IRQs (void) {
  S32_NVIC->ICPR[1] = 1 << (49 % 32);  /* IRQ49-LPIT0 ch1: clr any pending IRQ*/
  S32_NVIC->ISER[1] = 1 << (49 % 32);  /* IRQ49-LPIT0 ch1: enable IRQ */
  S32_NVIC->IP[49] = 0xA0;             /* IRQ49-LPIT0 ch1: priority 10 of 0-15*/
}

Also, it needs to be enabled in LPIT0_MIER register

LPIT0->MIER = 0x00000003;‍

 

Regards,

Daniel

0 Kudos

1,132 Views
jerryxie1
Contributor II

interrupt NVIC has enable, interrupt falg is set, LPIT0->MIER = 0x00000003,can not enter LPIT0_Ch1_IRQHandler, but can enter interrupt LPIT0_Ch0_IRQHandler!,puzzled...

0 Kudos

1,132 Views
yrson7
Contributor I

Dear . Daniel 

Thank you  your advice. 
I am OK, timer both LPIT0_Ch1 and LPIT0_Ch1. 

pastedImage_1.png

pastedImage_2.png

0 Kudos

1,132 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I don't see any reason for this.

Did you really enable NVIC interrupts 48 and 49?

Regards,

Daniel

0 Kudos