Skip to content

Commit 48f1269

Browse files
committed
sei() automatically invoked by AVR reti
1 parent a13441d commit 48f1269

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Marlin/src/module/stepper.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1613,8 +1613,11 @@ void Stepper::isr() {
16131613
// Set the next ISR to fire at the proper time
16141614
HAL_timer_set_compare(MF_TIMER_STEP, next_isr_ticks);
16151615

1616-
// Don't forget to finally reenable interrupts
1617-
hal.isr_on();
1616+
// Don't forget to finally reenable interrupts on non-AVR.
1617+
// AVR automatically calls sei() for us on Return-from-Interrupt.
1618+
#ifndef __AVR__
1619+
hal.isr_on();
1620+
#endif
16181621
}
16191622

16201623
#if MINIMUM_STEPPER_PULSE || MAXIMUM_STEPPER_RATE

0 commit comments

Comments
 (0)