[riot-devel] PWM on STM32-L1
micheviv at e.ujf-grenoble.fr
Tue Mar 17 14:50:00 CET 2015
We are four students, working on riot-os implementation for STM32-L1. But we are facing some problems : we're trying to add PWM features in order to use a motor shield. We already have implemented the pwm.h for our board. And now we're having a hard time understanding how we should proceed with the periph_conf.h file.
Actually, our main confusion comes from the defines that we have to use to configure the pwm pins.
- Regarding the channels, we don't really get what it refers to ? Do the values defined for these channels directly correspond to the number written on the board near the pins (numbers 3, 5, 6, 9, 10 and 11 on the stm32l1) ? Why are there four channels defined for each pwm pins in the stm32f3discovery's periph_conf.h ?
- What values should we use for the PWM_X_DEV, PWM_X_CLKEN(), PWM_X_CLKDIS() and PWM_X_PORT_CLKEN() ?
- For the PWM_X_PORT, should we use GPIOC and GPIOD as it is done for the stm32f3 ?
- Should we disable the pins in the GPIO config if we want to use them as PWM ?
We would be very grateful for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel