[riot-devel] [ ST32L152RE ] [periph_conf.h]
hauke.petersen at fu-berlin.de
Wed Apr 1 20:24:51 CEST 2015
the alternate function definition (PWM_x_PIN_x_AF) is meant for defining
which alternate function the referneced pin is using. You can find the
correct values for your configuration in the devices data sheet  on
page 43ff, Table 9.
If you for example want to use PWM_0 with timer TIM2 and you want to map
the PWM channel 0 to pin PA3, the value of AF is 1.
Let me know if anything is unclear!
On 01.04.2015 02:19, Tararaina Klipffel wrote:
> Hi everybody,
> I have few questions about the PWM configuration pin on the
> periph_config.h  on STM32L152RE. The pwm.c file is already done, we
> were based on pwm.c stm32f3 discovery file. We also used this two
> manuals  .
> What is the link between PWM_0_PIN_CH0 and PWM_0_PIN_AF ? Does
> PWM_0_PIN_AF refer to the GPIO_AFRL_AFRLX (X € [0..7] ) or the
> GPIO_AFRH_AFRHX (X € [8..15] ) in stm32l1xx.h ?
>  : http://pastebin.com/bthJXJFP
>  :
>  :
> Kind regards
> devel mailing list
> devel at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel