S32K344 eMIOS/ICU problem about measure PWM pulse width and period

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

S32K344 eMIOS/ICU problem about measure PWM pulse width and period

1,070 Views
xkr
Contributor I

Hi, now I'm working on S32K344 platform using MCAL pakage.I want to measure more than 4 channels PWM to get their pulse width and period. IPWM mode and interrupt mode are used.I complete the configuration ,and use "void Icu_StartSignalMeasurement(Icu_ChannelType Channel);""void Icu_StopSignalMeasurement(Icu_ChannelType Channel);""void Icu_GetDutyCycleValues(Icu_ChannelType Channel, Icu_DutyCycleType* DutyCycleValues);".

In the test , I find one problem that I can not get exact period value.In the fact, the period value from the function Icu_GetDutyCycleValues() is undulate.Sometimes the period time value is some times than the exact value.At the same time,PWM pulse width value is exact.

This problem has been bugging me for more than two weeks.How can I solve it?

Best regards!

0 Kudos
4 Replies

97 Views
KeyurKulkarni
Contributor I

Hello

I am facing similar troubles. I am able to measure the duty cycle & the period when the interrupts are enabled. I am not able to measure the Period when interrupts are disabled.

0 Kudos

957 Views
gumu
Contributor IV

Hi @xkr,

I had the same issue in my project and fixed that by increasing the divider value of MCL_Emiosx.

0 Kudos

1,044 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

probably you got overflows (or several one) when using timebase running from high clock. I think ICU driver does not support overflows. You should set timebase with respect of input signal. Try to increase prescaler of used timebase, then you should get right result too.

BR, Petr

0 Kudos

1,028 Views
xkr
Contributor I

No,I review the MCAL code and find that ICU driver supports  overflow.I ask some people,someone says that ICU hardware does not support measure period function in IPWM mode.And it is supported by hardware and software but the interrupt can not be delayed.In my project,I have a deep distrust of delayed Interrupt and ISRs.Do you think so?Thanks!

0 Kudos