Abnormal period values when using eMIOS IPM mode

cancel
Showing results for 
Search instead for 
Did you mean: 

Abnormal period values when using eMIOS IPM mode

199 Views
sx
Contributor III

Hi,

I want to use 5748G to control a pwm fan . And i configured an eMIOS channel as IPM mode to measure the fan's speed. Sadly the period calculated by the IPM seems not quite right. I found someabnormal values, and the longer the period is, the more abnormal values are. So please help me to fix it.

There are some codes from my application:

IPM-7.PNG

IPM-8.PNG

And there are some results: 

when period = 24000 us

IPM-1.PNG

when period = 12000 us

IPM-2.PNG

when period = 1000 us

IPM-4.PNG

when period = 50 us

IPM-3.PNG

Labels (1)
Tags (3)
5 Replies

85 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the eMIOS contains a 16bit counter on MPC5748G. So if you use 100000 (0x186A0) as boundary for Counter Bus A, then a time base is counting up to 0x86A0 (34464) only.

If you will use 34464 as MAXCNT in your calculation, you got right period values.

BR, Petr 

85 Views
sx
Contributor III

Another question: How can i calculate the period if there are several overflows? Or how can i determine the number of overflows?

0 Kudos

85 Views
PetrS
NXP TechSupport
NXP TechSupport

you can enable interrupt for channel 23 and increment some global variable indicating oveflows. Then use this variable value within period calculation.

BR, Petr

0 Kudos

85 Views
sx
Contributor III

Ok, thanks for your help!

0 Kudos

85 Views
sx
Contributor III

Oh, i forgot this, thanks!

0 Kudos