title: STM32F103RC TIM3 not working
body: <p>I want to use TIM3 for controlling servos. I've already used TIM2 CH1CH2 for two servos but I need four more.The problem is that I found no PWM output in the pin.
  Below is my code and I'm rather confusing about how can it be wrong as long as TIM2 is already working.Will there be any conflict? I've checked my project and am sure that I haven't used TIM3 any where else.</p>
  
  <pre><code>GPIO_InitTypeDef GPIO_InitStructure;
  TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
  TIM_OCInitTypeDef  TIM_OCInitStructure;
  
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_6 | GPIO_Pin_7;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; 
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOA, &amp;GPIO_InitStructure);
  
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; 
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOB, &amp;GPIO_InitStructure);
  TIM_DeInit(TIM2);
  TIM_DeInit(TIM3);
  /* Time base configuration */
  TIM_TimeBaseStructure.TIM_Period =  500;
  TIM_TimeBaseStructure.TIM_ClockDivision =  TIM_CKD_DIV2;
  TIM_TimeBaseStructure.TIM_Prescaler = 7199; // 50 Hz
  TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
  
  TIM_TimeBaseInit(TIM2, &amp;TIM_TimeBaseStructure);
  TIM_TimeBaseInit(TIM3, &amp;TIM_TimeBaseStructure);
  
  /* PWM1 Mode configuration: Channel 1 */
  TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;           //produce output when counter &lt; CCR
  TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;   //set "high" to be effective output
  TIM_OCInitStructure.TIM_Pulse = 0;                          // ccr_val
  TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
  
  TIM_OC1Init(TIM2, &amp;TIM_OCInitStructure);
  TIM_OC2Init(TIM2, &amp;TIM_OCInitStructure);
  
  TIM_OC1Init(TIM3, &amp;TIM_OCInitStructure);
  TIM_OC2Init(TIM3, &amp;TIM_OCInitStructure);
  TIM_OC3Init(TIM3, &amp;TIM_OCInitStructure);
  TIM_OC4Init(TIM3, &amp;TIM_OCInitStructure);
  
  TIM_ARRPreloadConfig(TIM2, ENABLE);
  TIM_ARRPreloadConfig(TIM3, ENABLE);
  
  TIM_Cmd(TIM2, ENABLE);
  TIM_Cmd(TIM3, ENABLE);
  
  TIM_CtrlPWMOutputs(TIM2, ENABLE);
  TIM_CtrlPWMOutputs(TIM3, ENABLE);
  </code></pre>