STM32 timer simplification (#11995)
Prescalers aren't calculated for the given target frequency. Stepper timer should run at 2 Mhz and temperature timer at 72 Khz.
This commit is contained in:
committed by
Scott Lahteine
parent
8daadd2c8c
commit
fcf6d127fd
@@ -71,7 +71,7 @@ bool timers_initialised[NUM_HARDWARE_TIMERS] = {false};
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
|
||||
if (!timers_initialised[timer_num]) {
|
||||
constexpr uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
|
||||
uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
|
||||
temp_prescaler = TEMP_TIMER_PRESCALE - 1;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
|
||||
Reference in New Issue
Block a user