cancel
Showing results for 
Search instead for 
Did you mean: 

Variable PWM generation

adamajames2
Associate II
Posted on August 29, 2008 at 16:42

Variable PWM generation

11 REPLIES 11
adamajames
Associate II
Posted on May 17, 2011 at 12:43

Hi,

Also just to state the obvious are you enabling the clock and pointing to the right int handler.

i.e.

            RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3 , ENABLE);

            NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;

            NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQChannel;

            NVIC_Init(&NVIC_InitStructure);

smart2
Associate II
Posted on May 17, 2011 at 12:43

based on your code, looks like you used interrupt for TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE);

and in Interrupt handler you are checking for  if (TIM_GetITStatus(TIM3, TIM_IT_CC3)!= RESET)

both should be same either you use CC3 or IT_Update