How to output a PWM signal from an MC1322x- SRB

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

How to output a PWM signal from an MC1322x- SRB

2,169 Views
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.
Labels (1)
0 Kudos
Reply
3 Replies

1,039 Views
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 Kudos
Reply

1,039 Views
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 Kudos
Reply

1,039 Views
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 Kudos
Reply