LPIT0 Interrupt S32K144

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

LPIT0 Interrupt S32K144

582 Views
sarwath
Contributor IV

Hello Community,

My objective is to do function call at every 1 ms. I tried lpit0 with 1ms delay but it is not working as expected.

I created new project with lpit0, every 1 sec it will make variable (interrupt) =1; and In main function I am running infinite while loop to count (0 to 3) only if variable (interrupt) =1.

At initial stage variable (interrupt) is 0, Whenever the LPIT0_Interrupt occured it will change to 1 and count increment by 1.

Currently my interrupt is not working as expected always my count is 0 only.

Could anyone please help me to solve this issue and I have attached my project for your reference.

Regards,

Sarwath

0 Kudos
3 Replies

571 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @sarwath 

Did you already test the lpit_periodic_interrupt_s32k144 example of the SDK or the Lpit_Gpt_Example_S32K144 of the RTD?

Also, there is an example where the application performs a function call on a configurable period. The period in ms is taken from a potentiometer connected to ADC.

 

B.R.

VaneB

 

0 Kudos

562 Views
sarwath
Contributor IV

Hello @VaneB ,

In my application I have to sense 9 ADC channel (voltage and current sensing) with pdb hardware trigger in back to back mode.

The results of 9 ADC channels read by LPIT0 timer by every 1ms.

But If implement the above requirement , I am getting the initial cycle value only after that the ADC results are not changing as per the input.

So I tried with one ADC channel with Software trigger method and read the results by LPIT0 timer by every 1sec. I am getting the exact values as per results.

 

How to achieve the function call with LPIT0 including (ADC with PDB).

Regards,

Sarwath

0 Kudos

557 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @sarwath 

Correct me if I'm wrong, but from what I understood, you test LPIT with an interrupt of 1s and a single ADC channel, and the measurements give the expected results. If so, I would like to know if you have already tried that with the 1ms interruption and gradually increased the number of ADC channels you use.

Also, could you also help me by confirming if you tried any of the examples mentioned above?

0 Kudos