Proper AVR preemptive interrupt handling (#10496)
Also simplify logic on all ARM-based interrupts. Now, it is REQUIRED to properly configure interrupt priority. USART should have highest priority, followed by Stepper, and then all others.
This commit is contained in:
committed by
Scott Lahteine
parent
f423e54f77
commit
0c428a66d9
@ -90,5 +90,4 @@ void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
@ -65,8 +65,6 @@ typedef uint32_t hal_timer_t;
|
||||
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
||||
|
||||
#define HAL_ENABLE_ISRs() do { if (thermalManager.in_temp_isr) DISABLE_TEMPERATURE_INTERRUPT(); else ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0)
|
||||
|
||||
#define HAL_STEP_TIMER_ISR extern "C" void TIMER0_IRQHandler(void)
|
||||
#define HAL_TEMP_TIMER_ISR extern "C" void TIMER1_IRQHandler(void)
|
||||
|
||||
@ -129,5 +127,6 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
||||
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
#define HAL_timer_isr_epilogue(TIMER_NUM)
|
||||
|
||||
#endif // _HAL_TIMERS_DUE_H
|
||||
|
Reference in New Issue
Block a user