Inquiry About Measuring Frequency Using S32K3 eMIOS Input Capture

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

Inquiry About Measuring Frequency Using S32K3 eMIOS Input Capture

774 Views
NewbieNerd
Contributor IV

Hello NXP Team,

I’m reaching out as I am experiencing difficulties using the S32K3 eMIOS for input capture.
I would like to measure arbitrary frequencies in the range of 0-300 Hz.

Currently, the MCL-eMIOS and ICU-eMIOS settings are as shown in the attached image.

NewbieNerd_0-1732167227317.png
NewbieNerd_1-1732167242064.png
NewbieNerd_3-1732167268003.png

 

NewbieNerd_4-1732167293088.png

After configuring these settings:

  • I use the Icu_StartSignalMeasurement function to start the measurement.
  • Then, I retrieve the measured values using the Icu_GetDutyCycleValues function.

The results are as follows:

NewbieNerd_5-1732167323258.png

What I am curious about is that the period value for 50 Hz differs significantly from the value for 10 Hz.
Could this be due to a conversion formula I might be unaware of?
core clk is 160Mhz.

Best Regard

 

0 Kudos
Reply
1 Reply

736 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

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

For PWM frequency of 50Hz with eMIOS clock frequency of 160MHz you need up to 3,200,000 ticks:
1s -> 160MHz (160,000,000 ticks)
50Hz = (1/50)s
->160,000,000 *(1/50) = 3,200,000 ticks

But the eMIOS is a 16 bits timer, which can count up to 65,535 ticks.

What you can do is try to slow down the eMIOS clock frequency.

Hope it helps you.

Have a nice day!

0 Kudos
Reply