stm32/timer: Fix deadtime config on Advanced Timer peripherals.
Newer MCU series have additional fields in the struct which need to be initialised to zero, eg Break2AFMode on WB55. This work was funded by Planet Innovation. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
parent
8dbdac8c82
commit
ff70bd1197
@ -507,7 +507,7 @@ STATIC mp_int_t compute_ticks_from_dtg(uint32_t dtg) {
|
||||
}
|
||||
|
||||
STATIC void config_deadtime(pyb_timer_obj_t *self, mp_int_t ticks, mp_int_t brk) {
|
||||
TIM_BreakDeadTimeConfigTypeDef deadTimeConfig;
|
||||
TIM_BreakDeadTimeConfigTypeDef deadTimeConfig = {0};
|
||||
deadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||
deadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||
deadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||
|
Loading…
Reference in New Issue
Block a user