MPC5777C IPWM function

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5777C IPWM function

跳至解决方案
1,604 次查看
Yumimi
Contributor II

Hi, I am configuring GPIO195 Emois16 as Emois IPWM channel.

Emois16 is confugred as emois0_16,and its CNT register has values while its A and B register has no change.

Here is values of registers about the channel.

Yumimi_0-1693296015838.png

The input has been detected on hardware.Why its S16.FLAG isn't set?

 

 

标记 (1)
0 项奖励
回复
1 解答
1,477 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I do not know EB and MCAL so cannot suggest here. I suppose ICU_DUTY_CYCLE sets channel for IPWM mode, so capture two successive edges of the PWM signal and driver returns duration of measured pulse. To get duty and period time together you would need next two successive edges and you can calculate all easily. Not sure how this is done in MCAL.
An example, you mentioned, uses 2 channels measuring same input signal, one channel in IPM mode second IPWM mode, thus first returns period time and second a pulse duration.

BR, Petr

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,576 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you need to enable IGF filter as well. IGF module is placed between MCU pad and eMIOS input. Emios_0 ch16 is mapped to IGF_0 ch22 so set IGF0.MCR22[FGEN] bit.

BR, Petr

0 项奖励
回复
1,537 次查看
Yumimi
Contributor II

Hi,

after configuring IGF module,A and B registers have values.Whlie I use EB25.1.1 MCAL configure ICU channel iCUSignalMeasurement mode as ICU_CUTY_CYCLE,I get the duty time.How to get the duty and period time together?

Meanwhile, I dont understand why your example code Example-MPC5646C-eMIOS-IPM-IPWM-v1.0-CW210 uses two Emois channels to get period and duty.I mean,the duty and period belongs to different channel, and u print it as one channel's result.

Thanks!

 

0 项奖励
回复
1,478 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I do not know EB and MCAL so cannot suggest here. I suppose ICU_DUTY_CYCLE sets channel for IPWM mode, so capture two successive edges of the PWM signal and driver returns duration of measured pulse. To get duty and period time together you would need next two successive edges and you can calculate all easily. Not sure how this is done in MCAL.
An example, you mentioned, uses 2 channels measuring same input signal, one channel in IPM mode second IPWM mode, thus first returns period time and second a pulse duration.

BR, Petr

0 项奖励
回复
1,467 次查看
Yumimi
Contributor II
Have solved,thanks a lot~
0 项奖励
回复