Skip to content

Commit

Permalink
⚡️ Exit from ISR on AVR already does sei
Browse files Browse the repository at this point in the history
Co-Authored-By: tombrazier <68918209+tombrazier@users.noreply.github.com>
  • Loading branch information
thinkyhead and tombrazier committed Apr 7, 2023
1 parent 75aa880 commit 3ec5d6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,11 @@ void Stepper::isr() {
// Set the next ISR to fire at the proper time
HAL_timer_set_compare(MF_TIMER_STEP, hal_timer_t(next_isr_ticks));

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

#if MINIMUM_STEPPER_PULSE || MAXIMUM_STEPPER_RATE
Expand Down

0 comments on commit 3ec5d6d

Please sign in to comment.