MPC5606S PWM output without using a Unified Channel

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

MPC5606S PWM output without using a Unified Channel

844 Views
akhilprasad
Contributor III

In MPC5606S, can we get PWM output in any particular channel without using a Unified Channel(23,16,8).

Labels (1)
6 Replies

644 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

No, this is not possible for eMIOS channels 9-15. See Tables 9-2 and 9-3 of the Reference manual.

BR, Petr

644 Views
akhilprasad
Contributor III

Thank you Petr. 

Is there any way i can get pwm output in eMIOSB channels 16 to 23 without using Unified channels(16 or 23).

I got pwm output when i configured unified channel 23/16. But i need to get output in channels(16 to 23) without using unified channels. Is it possible to do so ?

0 Kudos
Reply

644 Views
PetrS
NXP TechSupport
NXP TechSupport

Configure channels to OPWFMB mode which is available for all channels on eMIOS 1 module as per Table 9-3.

The internal channel counter is automatically selected as the time base when this mode is selected.

BR, Petr

0 Kudos
Reply

644 Views
akhilprasad
Contributor III

ok.. 

I configured channels in OPWMB mode.

Can u ples share me a code configuring channel in OPWMB and without using any unified channels.

0 Kudos
Reply

644 Views
PetrS
NXP TechSupport
NXP TechSupport

The OPWMB mode have to use other counter bus (channels 16 or 23). The OPWFMB mode does not...

Here is basic code for OPWFMB mode...

void initEMIOS(void) {

 

  EMIOS_1.MCR.B.GPRE= 63;     /* Divide 64 MHz sysclk by 63+1 = 64 for 1MHz eMIOS clk*/

  EMIOS_1.MCR.B.ETB = 0;      /* External time base is disabled; */

  EMIOS_1.MCR.B.GPREN = 1;     /* Enable eMIOS clock */

  EMIOS_1.MCR.B.GTBE = 1;                         /* Enable global time base */

  EMIOS_1.MCR.B.FRZ = 1;                            /* Enable stopping channels when in debug mode */

}

 

void initEMIOSch(void) {       /* EMIOS CH : Output Pulse Width & Freq Modulation*/

                                /*           Provide 10KHz output (100usec period) */

                                /* Input clock is eMIOS clk of 1MHz (1 usec period)*/

  EMIOS_1.CH[17].CBDR.R = 99;      /* Period = 1 usec x (99+1) = 100 usec, 10KHz*/

  EMIOS_1.CH[17].CADR.R = 30;       /* Duty cycle  */

  EMIOS_1.CH[17].CCR.B.UCPRE = 0;  /* Channel counter uses divide by (0+1) prescaler */

  EMIOS_1.CH[17].CCR.B.UCPEN = 1; /* Channel counter's prescaler is loaded & enabled*/

  EMIOS_1.CH[17].CCR.B.EDPOL = 1;         /* Polarity is active high */

  EMIOS_1.CH[17].CCR.B.MODE= 0x58; /* Mode= 0PWFMB */

}

BR, Petr

0 Kudos
Reply

644 Views
akhilprasad
Contributor III

Thanks a lot Petr. The information was very much useful. I will try the code.

0 Kudos
Reply