From 7257308b599dacd1adc8d5f5a23ce51d4d6aee16 Mon Sep 17 00:00:00 2001 From: xC0000005 <32139633+xC0000005@users.noreply.github.com> Date: Mon, 30 Oct 2017 08:34:58 -0700 Subject: [PATCH] # This is a combination of 5 commits. # This is the 1st commit message: Choose the timer based on MCU defintion. Timer5 is not valid on C8/CB class boards, so use Timer4 for the step timer. # This is the commit message #2: Readme.md update # This is the commit message #3: Readme.md update # This is the commit message #4: Trying to get readme.md updated # This is the commit message #5: readme.md update --- Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h index 58ed1b9161ea..b71cb33f44f1 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h @@ -46,7 +46,12 @@ typedef uint16_t hal_timer_t; #define HAL_TIMER_TYPE_MAX 0xFFFF -#define STEP_TIMER_NUM 4 // index of timer to use for stepper +#ifdef MCU_STM32F103CB || defined(MCU_STM32F103C8) + #define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4 +#else + #define STEP_TIMER_NUM 5 // for other boards, five is fine. +#endif + #define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts #define TEMP_TIMER_NUM 2 // index of timer to use for temperature #define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts