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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,441件の閲覧回数
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 件の賞賛
返信
4 返答(返信)

468件の閲覧回数
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 件の賞賛
返信

1,328件の閲覧回数
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 件の賞賛
返信

1,415件の閲覧回数
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 件の賞賛
返信

1,399件の閲覧回数
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 件の賞賛
返信