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
@ -353,6 +353,11 @@
|
||||
// Install interrupt handler
|
||||
install_isr(HWUART_IRQ, UART_ISR);
|
||||
|
||||
// Configure priority. We need a very high priority to avoid losing characters
|
||||
// and we need to be able to preempt the Stepper ISR and everything else!
|
||||
// (this could probably be fixed by using DMA with the Serial port)
|
||||
NVIC_SetPriority(HWUART_IRQ, 1);
|
||||
|
||||
// Enable UART interrupt in NVIC
|
||||
NVIC_EnableIRQ(HWUART_IRQ);
|
||||
|
||||
|
Reference in New Issue
Block a user