Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22203

Why PWM Timer not work correctly first time MSP430i2041 ? Critical Problem !

$
0
0

Hello TI, I want to create PWM for Half Bridge, with Timer0.

Configuration here:

TA0R = 0;
TA0CCR0 = 0x120; //frequency ~20Khz
TA0CCR1 = 0x120 - 0x2;
TA0CCR2 = 0x120 - 0x2 - 0x7;

P1OUT &= ~(FET_HIGH + FET_LOW);
P1DIR |= FET_HIGH + FET_LOW;
P1SEL0 &= ~(FET_HIGH + FET_LOW);
P1SEL1 |= FET_HIGH + FET_LOW;

TA0CCTL1 = OUTMOD_6;
TA0CCTL2 = OUTMOD_2;

TA0CTL = TASSEL_2 + ID_0 + MC_3; //SMCLK, /1, Up/down

You can see configuration of all registers and also how Timer is create PWM on osciloscope.

Red is Low Side. Yellow is High Side. ~20Khz.

d There is detailed first time. There is detailed second time.

 There is show begin of PWM.


Viewing all articles
Browse latest Browse all 22203

Trending Articles