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.
The input has been detected on hardware.Why its S16.FLAG isn't set?
已解决! 转到解答。
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
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!
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