s32k312 pwm measure

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

s32k312 pwm measure

1,776 次查看
fengba_360
Contributor III

Dear NXP Engineer,
I am using the S32K312 for PWM measurement. I noticed that if the external PWM input signal is disconnected, the measured value retains the state before disconnection. What causes this issue, and how can I resolve it?

0 项奖励
回复
8 回复数

1,769 次查看
fengba_360
Contributor III

I am using the eMIOS ICU for PWM measurement.

The measurement pin configuration has an external pull-down resistor

微信图片_20250422144852.png

0 项奖励
回复

1,735 次查看
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

If there is no PWM input, there is no edges and therefore no measurement. Overflow (theoretically) should happen, but due to hardware implementation, the Icu Overflow Notification is out of sync with the event for ICU_MODE_SIGNAL_MEASUREMENT, ICU_MODE_TIMESTAMP and ICU_MODE_SIGNAL_EDGE_DETECT modes.

You can perform a solution like in the following post:

https://community.nxp.com/t5/S32K/Measure-input-pulse-measure-with-edge-count/td-p/2075926

Which route the external signal to be measured to a pin configured as trgmux_inX. And then, route its trgmux ouput to a two eMIOS channels, performing different functionalities. One for measurement and the other one to emulate overflow.

Hope it helps you.

Have a nice day!

0 项奖励
回复

1,716 次查看
fengba_360
Contributor III

Are there any other solutions?

0 项奖励
回复

1,688 次查看
_Leo_
NXP TechSupport
NXP TechSupport

Which pin or pins are you using? Are this or those are fixed?

0 项奖励
回复

1,654 次查看
fengba_360
Contributor III

The pins are configured as EMIOS ports.

0 项奖励
回复

1,670 次查看
fengba_360
Contributor III

The pins aren't fixed, but I still don't want to trigger through the Trgmux module. I want to keep using the current emios_icu method for measurement. Are there any other solutions to address the issue where the PWM signal generator suddenly goes offline, causing the measurement value to retain the previous value?

0 项奖励
回复

1,600 次查看
_Leo_
NXP TechSupport
NXP TechSupport

TRGMUX is the only way that comes to my mind to address such issue. You need one eMIOS channel for measurement and the other one to emulate overflow.

Please double-check this issue with Field Application Engineer assigned to you - either NXP FAE and Distribution FAE. If don’t have such contact yet, please contact our local distributor: https://www.nxp.com/support/sample-and-buy/distributor-network:DISTRIBUTORS

For new questions, please help me creating new posts.

Have a nice day!

0 项奖励
回复

1,548 次查看
fengba_360
Contributor III

"Is adding a callback useful here?"

微信图片_20250427161558.png

 

0 项奖励
回复