Browse Source

[2.0.x] Correct step pulse width on LPC1768, DUE & Teensy35_36 (#10016)

pull/1/head
Bob-the-Kuhn 7 years ago
committed by Scott Lahteine
parent
commit
3c58ca181c
  1. 2
      Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
  2. 2
      Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
  3. 2
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h

2
Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h

@ -48,7 +48,7 @@ typedef uint32_t hal_timer_t;
#define TONE_TIMER_NUM 6 // index of timer to use for beeper tones
#define HAL_TIMER_RATE ((F_CPU) / 2) // frequency of timers peripherals
#define STEPPER_TIMER_PRESCALE 1.0 // prescaler for setting stepper frequency
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs

2
Marlin/src/HAL/HAL_LPC1768/HAL_timers.h

@ -47,7 +47,7 @@ typedef uint32_t hal_timer_t;
#define TEMP_TIMER_NUM 1 // index of timer to use for temperature
#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals
#define STEPPER_TIMER_PRESCALE 1.0 // prescaler for setting stepper frequency
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE)
#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
#define HAL_TEMP_TIMER_RATE 1000000

2
Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h

@ -55,7 +55,7 @@ typedef uint32_t hal_timer_t;
#define FTM1_TIMER_RATE (F_BUS / FTM1_TIMER_PRESCALE) // 60MHz / 4 = 15MHz
#define STEPPER_TIMER STEP_TIMER_NUM // Alias?
#define STEPPER_TIMER_PRESCALE 0 // Not defined anywhere else!
#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / HAL_TICKS_PER_US)
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE

Loading…
Cancel
Save