How to output a PWM signal from an MC1322x- SRB

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

How to output a PWM signal from an MC1322x- SRB

2,171件の閲覧回数
mitstudent
Contributor I
Hi,
I'm working on an application using the mc1322x dev kit and need to output a pwm signal from my sensor board. All of my code is using the SMAC codebase at the moment. I know that the boards have the capability to work in PWM but am having trouble figuring out how to output this signal. Any help to get this up and running would be greatly appreciated.
ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,041件の閲覧回数
addiyi
NXP Employee
NXP Employee
Hi,

In MC1322xRM, Chapter 12.15.11 FIXED-FREQUENCY PWM Mode and Chapter 12.15.12 VARIABLE-FREQUENCY PWM Mode, you'll find more information about working with PWM.

Regards,
Adrian

0 件の賞賛
返信

1,041件の閲覧回数
mitstudent
Contributor I
Thanks for the help. However, after looking over this and using the following code in an SMAC application, it's still not working. Am I not outputting my signal to any of the pins? I thought it would output to the TMR1 pin on my SRB board, but I'm not getting anything. Again, any help would be appreciated

void PWM_Output()
{
SetCtrlVal(1,0x3006); /* Run counter */
}
void PWM_Init()
{
SetCntrVal(1,0); /* Reset counter */
/* TMRA1_SCTRL: TCF=0,TCFIE=0,TOF=0,TOFIE=0,IEF=0,IEFIE=0,IPS=0,INPUT=0,
Capture_Mode=0,MSTR=0,EEOF=0,VAL=0,FORCE=1,OPS=0,OEN=1 */
SetSctrlVal(1,0x05);
SetComp1Val(1,1500); // Store initial value to the duty-compare register; sets compare value (COMP1) to 1500

/* TMRA0_CTRL: CM=1,PCS=8,SCS=0,ONCE=0,LENGTH=0,DIR=0,Co_INIT=0,OM=6 */
}
0 件の賞賛
返信

1,041件の閲覧回数
tpicon
Contributor II

I have the same problem...

 

if you solve the problem please contact me

my e-mail : tpicon@scenario.ind.br

 

 

Thanks!! 

0 件の賞賛
返信