Merge pull request #129 from nviennot/timer_clock

Timers use the clock speed apb1_tim and apb2_tim
This commit is contained in:
Dario Nieuwenhuis 2022-03-20 20:51:45 +01:00 committed by GitHub
commit 5c2ec818f6

View File

@ -1189,8 +1189,10 @@ def parse_rcc_regs():
if field['name'].endswith('EN'):
peri = removesuffix(field['name'], 'EN')
# Timers are a bit special, they may have a x2 freq
peri_clock = f'{clock}_TIM' if re.match('^TIM\d+$', peri) else clock
res = {
'clock': clock,
'clock': peri_clock,
'enable': {
'register': reg,
'field': field['name'],