MKE16Z LPIT timer is not working.

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

MKE16Z LPIT timer is not working.

327 Views
KumarBalaji
Contributor I

Dear Friend,

                I am using MKE16Z MCU in my project. In that, I am using LPIT0 for periodic interrupt operation. I have taken the code reference from the SDK example. 

               Interrupt operation is not working, but the LPIT0 counter is running. Also, LPIT0 counter interrupt operation flag is set. Even I have enabled the interrupt in NVIC vectors.

  debug_bug.png

SDK Version: 2.11.0

IDE Version  : 11.5.0

 

Thank in advance.

                

 

0 Kudos
Reply
2 Replies

311 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that you do not enable interrupt. Pls add the lines:

__NVIC_EnableIRQ(PIT_CH0_IRQn);

__NVIC_SetPriority(PIT_CH0_IRQn,0x00);

__asm("cpsie i");

Pls have a try

Hope it is helpful

BR

Xiangjun Rong

 

306 Views
KumarBalaji
Contributor I

Hello Xiangjun,
Thanks for your reply.
I will try your solution. Also, I have come up with one more solution,
I have removed a grounding resistor on Pin no.33(PTD2).
Previously it was pulled to the ground by a 22kohm resistor, after removing it the Interrupt started working.


BR
Kumar Balaji

0 Kudos
Reply