Increase STM32F1 Servo Timer Interrupt Priority (#18637)

This commit is contained in:
Jason Smith
2020-07-14 17:07:27 -07:00
committed by GitHub
parent c9718504c5
commit 95b76a65c3
3 changed files with 18 additions and 6 deletions

View File

@@ -91,8 +91,9 @@ typedef uint16_t hal_timer_t;
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
#endif
#define STEP_TIMER_IRQ_PRIO 1
#define TEMP_TIMER_IRQ_PRIO 2
#define STEP_TIMER_IRQ_PRIO 2
#define TEMP_TIMER_IRQ_PRIO 3
#define SERVO0_TIMER_IRQ_PRIO 1
#define TEMP_TIMER_PRESCALE 1000 // prescaler for setting Temp timer, 72Khz
#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency
@@ -193,4 +194,6 @@ FORCE_INLINE static void timer_no_ARR_preload_ARPE(timer_dev *dev) {
bb_peri_set_bit(&(dev->regs).gen->CR1, TIMER_CR1_ARPE_BIT, 0);
}
void timer_set_interrupt_priority(uint_fast8_t timer_num, uint_fast8_t priority);
#define TIMER_OC_NO_PRELOAD 0 // Need to disable preload also on compare registers.