How to configure MPC5748G controller for eMIOS OPWFMB mode?

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

How to configure MPC5748G controller for eMIOS OPWFMB mode?

Jump to solution
663 Views
Charith
Contributor I

Hi,

I am using MPC5748G controller, I want to configure a PIN  for PWM OPWFMB mode for controlling the LED. I am configuring the pin PI2 as mentioned below but I am not able to get the PWM output. Please suggest if any corrections required.

 

eMIOS_UC_0.UC[30].C.R = 0x0; /* Disable channel pre-scaler (reset default) */
eMIOS_UC_0.UC[30].A.R = 20; /* OPWFMB mode: duty cycle count */ //19
eMIOS_UC_0.UC[30].B.R = 200; /* OPWFMB mode: period will be 200 counts */
eMIOS_UC_0.UC[30].CNT.R = 1; /* OPWFMB start counter between 1 & B register value*/
eMIOS_UC_0.UC[30].C.B.EDPOL = 1; /* Output polarity on A match */
eMIOS_UC_0.UC[30].C.B.MODE = 0x58;/* Output Pulse Width & Frequency Modulation*/
eMIOS_UC_0.UC[30].C.B.UCPRE = 0; /* Pre-scale channel clock by 0+1=1 */
eMIOS_UC_0.UC[30].C.B.UCPREN= 1; /* Enable pre-scaler */

SIUL2.MSCR[PI2].B.SSS = 1; /* Pad PE6: Source signal is E0UC_23_X */
SIUL2.MSCR[PI2].B.OBE = 1; /* Pad PF6: OBE=1. */
SIUL2.MSCR[PI2].B.src=3; /* Pad PF6: Full strength slew rate */

 

Thanks,

Charith

0 Kudos
Reply
1 Solution
645 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

eMIOS_0 ch30 is the Y type channel which does not have internal counter and so do not support OPWFMB mode. Refer to chapter 35.1.1 Channel types of the RM.
You can use OPWMB mode on that channel, but global or local counter bus running in MCB mode must be selected using BSL bits.

BR, Petr

View solution in original post

0 Kudos
Reply
1 Reply
646 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

eMIOS_0 ch30 is the Y type channel which does not have internal counter and so do not support OPWFMB mode. Refer to chapter 35.1.1 Channel types of the RM.
You can use OPWMB mode on that channel, but global or local counter bus running in MCB mode must be selected using BSL bits.

BR, Petr

0 Kudos
Reply