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?
I am using the eMIOS ICU for PWM measurement.
The measurement pin configuration has an external pull-down resistor
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!
Are there any other solutions?
Which pin or pins are you using? Are this or those are fixed?
The pins are configured as EMIOS ports.
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?
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!
"Is adding a callback useful here?"