How to configure MPC5748G controller for eMIOS OPWFMB mode?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure MPC5748G controller for eMIOS OPWFMB mode?

ソリューションへジャンプ
662件の閲覧回数
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 件の賞賛
返信
1 解決策
644件の閲覧回数
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 件の賞賛
返信
1 返信
645件の閲覧回数
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 件の賞賛
返信