Skip to content

Commit 4a8ca11

Browse files
committed
sei() automatically invoked by AVR reti
1 parent 0c1057c commit 4a8ca11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Marlin/src/module/stepper.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,8 @@ 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
1616+
// Don't forget to finally reenable interrupts on non-AVR.
1617+
// AVR automatically calls sei() for us on Return-from-Interrupt.
16171618
#ifndef __AVR__
16181619
hal.isr_on();
16191620
#endif
@@ -1831,7 +1832,7 @@ void Stepper::pulse_phase_isr() {
18311832

18321833
#define PAGE_PULSE_PREP(AXIS, BITS) do{ \
18331834
step_needed.set(_AXIS(AXIS), (steps >> BITS) & 0x1); \
1834-
if (step_needed.test(_AXIS(AXIS))) \
1835+
if (step_needed.test(_AXIS(AXIS))) \
18351836
page_step_state.bd[_AXIS(AXIS)]++; \
18361837
}while(0)
18371838

0 commit comments

Comments
 (0)