Skip to content

Commit 67fb713

Browse files
committed
limit use of tim15-17 to sm32h750xx
1 parent f8051bd commit 67fb713

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ports/stm/peripherals/timers.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ void tim_clock_enable(uint32_t mask) {
363363
__HAL_RCC_TIM14_CLK_ENABLE();
364364
}
365365
#endif
366+
367+
#ifdef STM32H750xx
368+
// only enabled on the H750 board for now
366369
#ifdef TIM15
367370
if (mask & (1 << 14)) {
368371
__HAL_RCC_TIM15_CLK_ENABLE();
@@ -378,6 +381,7 @@ void tim_clock_enable(uint32_t mask) {
378381
__HAL_RCC_TIM17_CLK_ENABLE();
379382
}
380383
#endif
384+
#endif
381385
}
382386

383387
void tim_clock_disable(uint32_t mask) {
@@ -442,6 +446,9 @@ void tim_clock_disable(uint32_t mask) {
442446
__HAL_RCC_TIM14_CLK_DISABLE();
443447
}
444448
#endif
449+
450+
#ifdef STM32H750xx
451+
// only enabled on the H750 board for now
445452
#ifdef TIM15
446453
if (mask & (1 << 14)) {
447454
__HAL_RCC_TIM15_CLK_DISABLE();
@@ -457,6 +464,7 @@ void tim_clock_disable(uint32_t mask) {
457464
__HAL_RCC_TIM17_CLK_DISABLE();
458465
}
459466
#endif
467+
#endif
460468

461469
}
462470

@@ -551,6 +559,8 @@ void TIM8_TRG_COM_TIM14_IRQHandler(void) {
551559
}
552560
#endif
553561

562+
#ifdef STM32H750xx
563+
// only enabled on the H750 board for now
554564
#ifdef TIM15
555565
void TIM15_IRQHandler(void) {
556566
callback_router(15);
@@ -568,3 +578,4 @@ void TIM17_IRQHandler(void) {
568578
callback_router(17);
569579
}
570580
#endif
581+
#endif

0 commit comments

Comments
 (0)