MPC5777C IPWM function

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

MPC5777C IPWM function

Jump to solution
1,602 Views
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?

 

 

Tags (1)
0 Kudos
Reply
1 Solution
1,475 Views
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

View solution in original post

0 Kudos
Reply
4 Replies
1,574 Views
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 Kudos
Reply
1,535 Views
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 Kudos
Reply
1,476 Views
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 Kudos
Reply
1,465 Views
Yumimi
Contributor II
Have solved,thanks a lot~
0 Kudos
Reply