DSPRelated.com
Forums

Configuring the timer in event manager to count up only or down only (PWM)

Started by "gareth4.john" March 3, 2008
Hello, I am fairly new to DSP's, I am using the example code from TI
to create PWM waves.
The PWM waves I am using are made from a timer that counts up and down.
I want to make PWM waves that only count up or only count down the timer.

The code I have that I think I need to add to is...

// EVA Configure T1PWM, T2PWM, PWM1-PWM6
// Initialize the timers
// Initialize EVA Timer1
EvaRegs.T1PR = 0x0F64; // Timer1 period
EvaRegs.T1CMPR = 0x07B2; // Timer1 compare
EvaRegs.T1CNT = 0x0000; // Timer1 counter
// TMODE = continuous up/down
// Timer enable
// Timer compare enable
EvaRegs.T1CON.all = 0x1042;

I have looked through the help files and have found some information
on getting the counter to count up only but I do not understand how to
implement this into my program.

I believe to my knowledge that I have to do something with Timer
Control Register A

Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467