Skip to content

Commit e453ebe

Browse files
stm32l4_timer.c: fix typo in pclk1/pclk2 lookup logic
1 parent eea31e5 commit e453ebe

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

system/libstm32l4_dragonfly/stm32l4_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ uint32_t stm32l4_timer_clock(stm32l4_timer_t *timer)
185185

186186
hclk = stm32l4_system_hclk();
187187

188-
if ((timer->instance >= TIMER_INSTANCE_TIM2) && (timer->instance >= TIMER_INSTANCE_TIM7))
188+
if ((timer->instance >= TIMER_INSTANCE_TIM2) && (timer->instance <= TIMER_INSTANCE_TIM7))
189189
{
190190
pclk = stm32l4_system_pclk1();
191191
}
-984 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)