Create a delay in s32k118 using gpt start timer

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

Create a delay in s32k118 using gpt start timer

1,329件の閲覧回数
Ashish4525
Contributor II

Dear all

I am trying to build delay of 1 ms using GPT start timer and I am using LPIT0ch0, I have enable even LPITIrqn via NVICISER0.

I have called enableiRq and passed lpit as arguments.please go through my code once.

Can anyone help me?

0 件の賞賛
返信
4 返答(返信)

1,290件の閲覧回数
Ashish4525
Contributor II

Dear Julian

I am trying to debug to check whether isr has come up or not, while loop is executing once.but going to default isr.any suggestion how to check interrupt is running or not .

0 件の賞賛
返信

1,271件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ashish4525,

You can place a breakpoint inside your interrupt handler to confirm it is indeed running. For example, if you flash the lpit_periodic_interrupt_s32k118 example, you can place the breakpoint inside LPIT_ISR and confirm the isr is active:

Julin_AragnM_0-1710456322958.png

Julin_AragnM_1-1710456399381.png

Best regards,
Julián

0 件の賞賛
返信

1,301件の閲覧回数
Ashish4525
Contributor II

Dear julian

I am trying to make a delay using autosar i have generated all the files for mcu gpt and port so can you tell me api to call in main function,so that I come to know delay is working.

with regards

Ashish

0 件の賞賛
返信

1,308件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Ashish4525,

I see you have posted a similar thread on the community; I will try to answer them both on this post.

You are using EB Tresos along with SW32K1_RTD, is this correct? If so, please take a look into the EB examples for the S32K118; 

  • Ftm_Gpt_Example_S32K118
  • Gpt_example_S32K118
  • Lpit_Gpt_Example_S32K118

The Lpit_Gpt_Example_S32K118 application uses the IP layer functionality to trigger a timer interrupt. Notification function increase a count variable by 1 and toggle state pin LED on board.

Please try this example for the GPT Pit interruption.

Best regards,
Julián

 

0 件の賞賛
返信