s32k312 pwm measure

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

s32k312 pwm measure

1,780 Views
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 Kudos
Reply
8 Replies

1,773 Views
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 Kudos
Reply

1,739 Views
_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 Kudos
Reply

1,720 Views
fengba_360
Contributor III

Are there any other solutions?

0 Kudos
Reply

1,692 Views
_Leo_
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,658 Views
fengba_360
Contributor III

The pins are configured as EMIOS ports.

0 Kudos
Reply

1,674 Views
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 Kudos
Reply

1,604 Views
_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 Kudos
Reply

1,552 Views
fengba_360
Contributor III

"Is adding a callback useful here?"

微信图片_20250427161558.png

 

0 Kudos
Reply