Browse Source

Remove ADC pullup checks

Setting pullups on the ADC should trigger the model-based check, making
this redundant and wasteful.

Keep the DEBUG_PULLUP_CRASH menu so that we can verify this behavior in
the future.
Yuri D'Elia 2 years ago
parent
commit
82e221e3c7
4 changed files with 0 additions and 24 deletions
  1. 0 1
      Firmware/Marlin.h
  2. 0 4
      Firmware/Marlin_main.cpp
  3. 0 9
      Firmware/stepper.cpp
  4. 0 10
      Firmware/temperature.cpp

+ 0 - 1
Firmware/Marlin.h

@@ -477,7 +477,6 @@ void raise_z_above(float target, bool plan=true);
 
 
 extern "C" void softReset();
 extern "C" void softReset();
 void stack_error();
 void stack_error();
-void pullup_error(bool fromTempISR);
 
 
 extern uint32_t IP_address;
 extern uint32_t IP_address;
 
 

+ 0 - 4
Firmware/Marlin_main.cpp

@@ -1693,10 +1693,6 @@ void stack_error() {
     crash_and_burn(dump_crash_reason::stack_error);
     crash_and_burn(dump_crash_reason::stack_error);
 }
 }
 
 
-void pullup_error(bool fromTempISR) {
-    crash_and_burn(fromTempISR ? dump_crash_reason::bad_pullup_temp_isr : dump_crash_reason::bad_pullup_step_isr);
-}
-
 #ifdef PRUSA_M28
 #ifdef PRUSA_M28
 void trace();
 void trace();
 
 

+ 0 - 9
Firmware/stepper.cpp

@@ -287,15 +287,6 @@ ISR(TIMER1_COMPA_vect) {
 	if (sp < SP_min) SP_min = sp;
 	if (sp < SP_min) SP_min = sp;
 #endif //DEBUG_STACK_MONITOR
 #endif //DEBUG_STACK_MONITOR
 
 
-#ifdef DEBUG_PULLUP_CRASH
-    // check for faulty pull-ups enabled on thermistor inputs
-    if ((PORTF & (uint8_t)(ADC_DIDR_MSK & 0xff)) || (PORTK & (uint8_t)((ADC_DIDR_MSK >> 8) & 0xff)))
-        pullup_error(false);
-#else
-    PORTF &= ~(uint8_t)(ADC_DIDR_MSK & 0xff);
-    PORTK &= ~(uint8_t)((ADC_DIDR_MSK >> 8) & 0xff);
-#endif // DEBUG_PULLUP_CRASH
-
 #ifdef LIN_ADVANCE
 #ifdef LIN_ADVANCE
     advance_isr_scheduler();
     advance_isr_scheduler();
 #else
 #else

+ 0 - 10
Firmware/temperature.cpp

@@ -1400,16 +1400,6 @@ void adc_ready(void) //callback from adc when sampling finished
 
 
 FORCE_INLINE static void temperature_isr()
 FORCE_INLINE static void temperature_isr()
 {
 {
-#ifdef DEBUG_PULLUP_CRASH
-    // check for faulty pull-ups enabled on thermistor inputs
-    if ((PORTF & (uint8_t)(ADC_DIDR_MSK & 0xff)) || (PORTK & (uint8_t)((ADC_DIDR_MSK >> 8) & 0xff)))
-        pullup_error(true);
-#else
-    PORTF &= ~(uint8_t)(ADC_DIDR_MSK & 0xff);
-    PORTK &= ~(uint8_t)((ADC_DIDR_MSK >> 8) & 0xff);
-#endif // DEBUG_PULLUP_CRASH
-
-
 	if (!temp_meas_ready) adc_cycle();
 	if (!temp_meas_ready) adc_cycle();
 	lcd_buttons_update();
 	lcd_buttons_update();