Open
Description
The stm32l032 for example does not enable pin output. The root cause is that I assumed no BDTR register meant no need to enable pin output.
However, the BDTR register was just missing from the Go code generated by the gen-device
tool.
Root Cause
The BDTR field is missing because:
- not all TIM peripherals have all registers present (however they do have 'compatible' layout) - so if a particular register is present in a peripheral it WILL be at the same address on all peripherals
gen-device
assumes all peripherals in a 'group' are identical, so it takes the first and uses it's register layout as definitive- in some cases, gen-device first see's a TIM peripheral with the BDTR register not present