Browse Source

Enable ISRs inside temperature ISR

to capture chars at UART at 250000 baud.
Sebastianv650 7 years ago
parent
commit
912704a0d8
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      Marlin/temperature.cpp

+ 5
- 0
Marlin/temperature.cpp View File

1489
 ISR(TIMER0_COMPB_vect) { Temperature::isr(); }
1489
 ISR(TIMER0_COMPB_vect) { Temperature::isr(); }
1490
 
1490
 
1491
 void Temperature::isr() {
1491
 void Temperature::isr() {
1492
+  //Allow UART and stepper ISRs
1493
+  CBI(TIMSK0, OCIE0B); //Disable Temperature ISR
1494
+  sei();
1492
 
1495
 
1493
   static uint8_t temp_count = 0;
1496
   static uint8_t temp_count = 0;
1494
   static TempState temp_state = StartupDelay;
1497
   static TempState temp_state = StartupDelay;
1940
       if (!endstop_monitor_count) endstop_monitor();  // report changes in endstop status
1943
       if (!endstop_monitor_count) endstop_monitor();  // report changes in endstop status
1941
     }
1944
     }
1942
   #endif
1945
   #endif
1946
+  
1947
+  SBI(TIMSK0, OCIE0B); //re-enable Temperature ISR
1943
 }
1948
 }

Loading…
Cancel
Save