stm32l5: add pwm

This commit is contained in:
Kenneth Bell
2021-05-08 09:39:29 -07:00
committed by Ron Evans
parent ee167f15de
commit 2c4b507d34
5 changed files with 259 additions and 16 deletions
-14
View File
@@ -26,20 +26,6 @@ const (
PLL_R = 2 // RCC_PLLR_DIV2
)
/*
timer settings used for tick and sleep.
note: TICK_TIMER_FREQ and SLEEP_TIMER_FREQ are controlled by PLL / clock
settings above, so must be kept in sync if the clock settings are changed.
*/
const (
TICK_RATE = 1000 // 1 KHz
SLEEP_TIMER_IRQ = stm32.IRQ_TIM15
SLEEP_TIMER_FREQ = 110000000 // 110 MHz
TICK_TIMER_IRQ = stm32.IRQ_TIM16
TICK_TIMER_FREQ = 110000000 // 110 MHz
)
type arrtype = uint32
func init() {