/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / PWM on the STM32F051 in the channel #3

Username:     
Password:     
             

Forum

# 1   2013-05-21 19:34:53 PWM on the STM32F051 in the channel #3

fjrg76
Member
Registered: 2010-03-05
Posts: 10

PWM on the STM32F051 in the channel #3

Hi

The STM32F05xx Discovery board includes to user leds on PC8 and PC9 ports. Those ports are attached to the timer TIM3, and accordingly to the user manual, timer TIM3 is able to generate PWM. However, the official API for timers on the STM32F05xx doesn't include the TIM3 as a PWM generator:

/**
  * @brief  Enables or disables the TIM peripheral Main Outputs.
  * @param  TIMx: where x can be 1, 15, 16 or 17 to select the TIMx peripheral.
  * @param  NewState: new state of the TIM peripheral Main Outputs.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void TIM_CtrlPWMOutputs(TIM_TypeDef* TIMx, FunctionalState NewState)
{...}

As you can see, the API doesn't mention neither TIM3 nor the TIM2. And this is what the user manual says about it:

3.14.2 General-purpose timers (TIM2..3, TIM14..17)
There are six synchronizable general-purpose timers embedded in the STM32F051x
devices (see Table 7 for differences). Each general-purpose timer can be used to generate
PWM outputs, or as simple time base.

Of course I've tried calling that API function with TIM3 as first argument, but nothing happens.

Did I miss something? Any ideas?

Offline

 

# 2   2013-05-22 00:56:46 PWM on the STM32F051 in the channel #3

fjrg76
Member
Registered: 2010-03-05
Posts: 10

Re: PWM on the STM32F051 in the channel #3

SOLVED:

http://wp.me/pPoQq-7x

Last edited by fjrg76 (2013-05-22 00:57:01)

Offline

 

Board footer