eMIOS_IC Data acquisition problem

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

eMIOS_IC Data acquisition problem

2,098 Views
shijie_zheng
Contributor III

Hi:

I have a problem using the eMIOS_IC function. Can anyone help me?

I'm using eMIOS IC to collect data on a square wave,The eMIOS return a value stable at 20183,

However, an unusual triangular wave occurs(The abnormal waveform is shown in the red coil in the picture below),

I found that when this situation occurs, eMIOS will return multiple values, such as 8023、32。

in this abnormal waveform,EMIOS IC return values are not stable,Is this normal?

Anybody know why,thank you.

pwm.jpg

Labels (1)
Tags (1)
0 Kudos
6 Replies

1,988 Views
joãopaulo
Contributor III

Hello,

I'm trying to use EMIOS_IC component but it's not working..

I'd like to read the frequency of a square wave.

I have a DEVKIT-MPC5748G and use S32-Design with processor expert.

EMIOS_DRV_IC_InitInputCaptureMode(INST_EMIOS_MC1, 11, &eMIOS_Ic1_ICChnConfig0);

EMIOS_DRV_IC_GetLastMeasurement(INST_EMIOS_MC1, 11, &Period);

The input signal period is 50ms but 'Period' variable is always 0.

Config.PNG

Other doubt is if the emios_qd component works? If so, is there any example of how to use?

 

Thanks,

Best Regards

João Paulo

0 Kudos

2,013 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

multiple values means you do not capture single value on this falling triangular "edge" but you get several captures?

Could be caused by noisy signal and output signal from input buffer oscillate along the threshold.

Try to enable hysteresis on input pin or enable input filter, if available on your MCU, not sure what you use.

BR, Petr    

0 Kudos

2,013 Views
shijie_zheng
Contributor III

Hi Petr

Thanks for your reply,I have got the actual waveform input to the MCU from the hardware department.

Please look at the following picture:

11.jpg

I used the "EMIOS_DRV_IC_GetLastMeasurement()" interface in the SDK to get the data returned by eMIOS,

At t1 and t2, the return data were normal(eMIOS return data is 20183),After t3, the input signal remains high,and  the value returned by the "EMIOS_DRV_IC_GetLastMeasurement()" will remain the value collected in t3(eMIOS return data is 14190) and will not be updated anymore.

I want to know why the eMIOS return data is keep in t3(return data is 14190) when the input signal is keep high?

Is there a way to update the data when the input signal keep high?

I used the eMIOS IC function, and the configuration contents are as follows(by S32 Design Studio for Power):

1、eMIOS_MC Configuration

3.jpg

2、eMIOS_IC Configuration

2.jpg

0 Kudos

2,013 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it looks like correct behavior. Channel 11 is configured to measure width of low pulse, thus after t3 no further captures are done as there is no low pulse so it keeps last value.

BR, Petr

0 Kudos

2,013 Views
shijie_zheng
Contributor III

Dear Petr

Thanks for your reply,

I also tried configuring eMIOS_IC to  measure width of high pulse mode(Positive captured pulse / active high),

however,when the input signal keep high,eMIOS return data also keep last value.

It that mean eMIOS_IC cannot measure 100% duty signal?

No matter  positive captured mode or negative captured mode, they both need a high pulse and a low pulse to complete the measure?

0 Kudos

2,013 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

in IPWM mode on the trailing edge the flag is set and captured values for both edges can be read from respective registers, because they are updated on this edge.

See mode description in the device Reference Manual.

If there is no trailing edge, registers are not updated and keep last values.

So yes, you cannot measure 100% duty signal, you need 2 opposite edges, it is pulse width measurement.

BR, Petr

0 Kudos