cancel
Showing results for 
Search instead for 
Did you mean: 

problems with TIM2 oc pin output

Posted on November 23, 2010 at 16:45

problems with TIM2 oc pin output

4 REPLIES 4
lowpowermcu
Associate II
Posted on May 17, 2011 at 14:15

Hi kuczek,

Try  to change

TIM_OCInitStructure.

TIM_OCMode

= TIM_OCMode_Timing;

by

TIM_OCInitStructure.

TIM_OCMode

= TIM_OCMode_PWM1;

MCU Lüfter

Posted on May 17, 2011 at 14:15

TIM_TimeBaseInitStruct.

TIM_Prescaler

= 72 - 1; // 72 MHz

input, 1 MHz output

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 17, 2011 at 14:15

hi,

Plese note that i try to use chanel no 2 for generating signal on pin 1 of port A.

regards

krzysiek

Posted on May 17, 2011 at 14:15

Hi,

I'm going to have 1Mhz clocked timer, so the value is ok, but of course comments is not

it should be like this

    TIM_TimeBaseInitStruct.TIM_Prescaler = 72; // 72Mhz/72 = 1Mhz

Regards

krzysiek