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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,747 次查看
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,690 次查看
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,668 次查看
_Leo_
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复

1,651 次查看
CCY_Yu
Contributor I

Hi, NXP:

   Please help to check the project, thanks.

0 项奖励
回复

1,425 次查看
_Leo_
NXP TechSupport
NXP TechSupport

Please check your email.

0 项奖励
回复

1,706 次查看
_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 项奖励
回复