altos: Get stm32l pwm driver working
authorKeith Packard <keithp@keithp.com>
Sat, 26 Dec 2015 07:20:29 +0000 (23:20 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Dec 2015 07:20:29 +0000 (23:20 -0800)
commit742f7c834bb5d651d2bebf2069d4e8facc33390d
tree3e788eb5b228717467a802a882a1d348a7b0acc1
parent8aa0ab9fe9ca41f6d520d388973164bc0c599a06
altos: Get stm32l pwm driver working

Fix the CCMR1_OC1PE and CCMR2_OC3PE values.
Disable clock when no PWM outputs are running.
Fix the apb1enr value for the timer.
Set ARR value to PWM_MAX - 1 -- ARR is off by one.
Sets the GPIO pins to 40MHz bandwidth for sharper edges.

Tested on EasyMega, but that code is not included as it breaks the
companion protocol.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_pwm_stm.c
src/stm/stm32l.h
src/telemega-v2.0/ao_pins.h