Method to re-generate a Single PWM pulse (S32K312 eMIOS)

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

Method to re-generate a Single PWM pulse (S32K312 eMIOS)

1,546件の閲覧回数
CCY_Yu
Contributor I

Hi, NXP:

    Reference to post: https://community.nxp.com/t5/S32K/How-to-Generate-a-Single-PWM-Period-and-Stop-S32K312-eMIOS/m-p/209...

We observed that after calling Emios_Pwm_Ip_InitChannel(), the PWM pulse was successfully generated, and an interrupt event was triggered. However, it seems that the callback function subsequently disabled the interrupt notification.
It look like it could generate a single pulse as well.

We would like to understand the correct procedure for generating the PWM pulse again. Specifically:

Is it appropriate to call Emios_Pwm_Ip_InitChannel() again to re-trigger the single pulse?

Or is there an alternative API that should be used to restart pulse generation and re-enable the interrupt?

We would appreciate your clarification on the recommended approach for re-generating the pulse after the initial trigger.

タグ(1)
0 件の賞賛
返信
5 返答(返信)

1,489件の閲覧回数
CCY_Yu
Contributor I

Dear NXP Support Team,

Thank you for your feedback.

Based on your previous sample procedure, we are now able to generate a single pulse using the eMIOS module.

We have currently configured the pulse period to 10 seconds, and the output seems to behave as expected in terms of signal generation.

However, we have observed that the interrupt callback function is triggered twice

Could you please help us check:

  1. Is this behavior expected under DAOC or the current mode used?

  2. Are there any recommended steps to ensure that the callback is only triggered once per pulse?

Thank you for your continued support.

 

CCY_Yu_0-1747808629049.pngCCY_Yu_1-1747808653411.png

 

0 件の賞賛
返信

1,467件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

I would have to debug your project to give you a proper answer.

0 件の賞賛
返信

1,450件の閲覧回数
CCY_Yu
Contributor I

Hi, NXP:

   Please help to check the project, thanks.

0 件の賞賛
返信

1,224件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Please check your email.

0 件の賞賛
返信

1,505件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Hi again,

For a second (or more pulses) you should call Emios_Pwm_Ip_InitChannel() and Emios_Pwm_Ip_SetFlagRequest() functions.

Please find attached project.

It use another eMIOS channel performing GPT in one-shot mode to generate a second DAOC pulse after 100ms:

_Leo__0-1747780760686.png

Or in continuous mode every 100ms:

_Leo__1-1747780776508.png

Hope it helps!

0 件の賞賛
返信