From 1cd21251d28bc0aaba4bab6dbf1dcc2d29975621 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 15 Feb 2015 22:29:39 +0100 Subject: [PATCH] Get rid of STEP_INTERRUPT_INTERRUPTIBLE. It was certainly a good idea, but also always a suspect of malfunctions and as such, almost never used. Newer code organisation moves most of the code behind it to dda_clock() anyways, so it also became mostly obsolete. Rest In Peace, STEP_INTERRUPT_INTERRUPTIBLE, you were matter of quite a number of interesting discussions and investigations. Changes for Configtool by jbernardis --- config.3drag.h | 7 ------- config.gen3.h | 6 ------ config.gen6.h | 6 ------ config.gen7-v1.1-v1.3.h | 7 ------- config.gen7-v1.4.h | 7 ------- config.ramps-v1.2.h | 6 ------ config.ramps-v1.3.h | 7 ------- config.rumba.h | 7 ------- config.sanguinololu-v1.1.h | 7 ------- config.sanguinololu-v1.2.h | 7 ------- config.sanguish.h | 7 ------- config.teensy.h | 7 ------- config.teensypp.h | 7 ------- config/printer.mendel.h | 11 ----------- config/printer.wolfstrap.h | 11 ----------- configtool/miscellaneouspage.py | 14 +------------- dda.c | 9 --------- dda_queue.c | 2 -- testcases/config.h.Profiling | 7 ------- 19 files changed, 1 insertion(+), 141 deletions(-) diff --git a/config.3drag.h b/config.3drag.h index 59733f4..e2bd450 100644 --- a/config.3drag.h +++ b/config.3drag.h @@ -553,13 +553,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.gen3.h b/config.gen3.h index bcbbd75..185dfc4 100644 --- a/config.gen3.h +++ b/config.gen3.h @@ -559,12 +559,6 @@ DEFINE_TEMP_SENSOR(bed, TT_INTERCOM, AIO1, 0) */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.gen6.h b/config.gen6.h index 7b810e4..c426567 100644 --- a/config.gen6.h +++ b/config.gen6.h @@ -545,12 +545,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.gen7-v1.1-v1.3.h b/config.gen7-v1.1-v1.3.h index cf0c398..bd00a8e 100644 --- a/config.gen7-v1.1-v1.3.h +++ b/config.gen7-v1.1-v1.3.h @@ -556,13 +556,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.gen7-v1.4.h b/config.gen7-v1.4.h index da9128c..8cf862d 100644 --- a/config.gen7-v1.4.h +++ b/config.gen7-v1.4.h @@ -556,13 +556,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.ramps-v1.2.h b/config.ramps-v1.2.h index bcb9af8..5ff03e9 100644 --- a/config.ramps-v1.2.h +++ b/config.ramps-v1.2.h @@ -554,12 +554,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.ramps-v1.3.h b/config.ramps-v1.3.h index e204c1f..fabcd0c 100644 --- a/config.ramps-v1.3.h +++ b/config.ramps-v1.3.h @@ -556,13 +556,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.rumba.h b/config.rumba.h index 1bf5a0f..79889d8 100644 --- a/config.rumba.h +++ b/config.rumba.h @@ -557,13 +557,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.sanguinololu-v1.1.h b/config.sanguinololu-v1.1.h index 8bdbdc1..36f5fcd 100644 --- a/config.sanguinololu-v1.1.h +++ b/config.sanguinololu-v1.1.h @@ -552,13 +552,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.sanguinololu-v1.2.h b/config.sanguinololu-v1.2.h index 7a7bf8a..528960b 100644 --- a/config.sanguinololu-v1.2.h +++ b/config.sanguinololu-v1.2.h @@ -552,13 +552,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.sanguish.h b/config.sanguish.h index f848d23..d5402c7 100644 --- a/config.sanguish.h +++ b/config.sanguish.h @@ -556,13 +556,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.teensy.h b/config.teensy.h index 27098c0..91c1ff6 100644 --- a/config.teensy.h +++ b/config.teensy.h @@ -610,13 +610,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config.teensypp.h b/config.teensypp.h index fdec2cf..e164e84 100644 --- a/config.teensypp.h +++ b/config.teensypp.h @@ -624,13 +624,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time diff --git a/config/printer.mendel.h b/config/printer.mendel.h index e83b496..caa5410 100644 --- a/config/printer.mendel.h +++ b/config/printer.mendel.h @@ -276,17 +276,6 @@ */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - This option makes the step interrupt interruptible (nested). This should - help immensely with dropped serial characters, but may also make debugging - infuriating due to the complexities arising from nested interrupts. - - Note: disable this option if you're using a '168 or for some reason your - ram usage is above 90%. This option hugely increases likelihood of stack - smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** \def TH_COUNT Temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative diff --git a/config/printer.wolfstrap.h b/config/printer.wolfstrap.h index 0a56c96..cc1729b 100644 --- a/config/printer.wolfstrap.h +++ b/config/printer.wolfstrap.h @@ -276,17 +276,6 @@ */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - This option makes the step interrupt interruptible (nested). This should - help immensely with dropped serial characters, but may also make debugging - infuriating due to the complexities arising from nested interrupts. - - Note: disable this option if you're using a '168 or for some reason your - ram usage is above 90%. This option hugely increases likelihood of stack - smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** \def TH_COUNT Temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative diff --git a/configtool/miscellaneouspage.py b/configtool/miscellaneouspage.py index 1757258..ac3974d 100644 --- a/configtool/miscellaneouspage.py +++ b/configtool/miscellaneouspage.py @@ -23,7 +23,6 @@ class MiscellaneousPage(wx.Panel, Page): 'DC_EXTRUDER': "Heater:", 'DC_EXTRUDER_PWM': "PWM:", 'USE_WATCHDOG': "Use the Watchdog Timer", 'REFERENCE': "Analog Reference:", - 'STEP_INTERRUPT_INTERRUPTIBLE': "STEP Interrupt", 'TH_COUNT': "Temperature History Size:", 'FAST_PWM': "Fast PWM", 'ENDSTOP_STEPS': "Endstop Steps:", @@ -73,10 +72,6 @@ class MiscellaneousPage(wx.Panel, Page): cb = self.addCheckBox(k, self.onCheckBox) sz.Add(cb, pos = (4, 1)) - k = 'STEP_INTERRUPT_INTERRUPTIBLE' - cb = self.addCheckBox(k, self.onCheckBox) - sz.Add(cb, pos = (5, 1)) - k = 'FAST_PWM' cb = self.addCheckBox(k, self.onCheckBox) sz.Add(cb, pos = (6, 1)) @@ -279,14 +274,7 @@ class MiscellaneousPage(wx.Panel, Page): def getValues(self): result = Page.getValues(self) - k = 'STEP_INTERRUPT_INTERRUPTIBLE' - cb = self.checkBoxes[k] - if cb.IsChecked(): - result[k] = "1" - else: - result[k] = "0" - - k = "DC_EXTRUDER" + k = 'DC_EXTRUDER' s = self.choices[k].GetSelection() v = self.choices[k].GetString(s) if v == self.heaterNameNone: diff --git a/dda.c b/dda.c index 73f5b07..a239aca 100644 --- a/dda.c +++ b/dda.c @@ -628,15 +628,6 @@ void dda_step(DDA *dda) { } #endif - #if STEP_INTERRUPT_INTERRUPTIBLE && ! defined ACCELERATION_RAMPING - // Since we have sent steps to all the motors that will be stepping - // and the rest of this function isn't so time critical, this interrupt - // can now be interruptible by other interrupts. - // The step interrupt is disabled before entering dda_step() to ensure - // that we don't step again while computing the below. - sei(); - #endif - #ifdef ACCELERATION_REPRAP // linear acceleration magic, courtesy of http://www.embedded.com/design/mcus-processors-and-socs/4006438/Generate-stepper-motor-speed-profiles-in-real-time if (dda->accel) { diff --git a/dda_queue.c b/dda_queue.c index 6a4ce2c..2ea8a81 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -89,8 +89,6 @@ void queue_step() { } } else { - // NOTE: dda_step makes this interrupt interruptible for some time, - // see STEP_INTERRUPT_INTERRUPTIBLE. dda_step(current_movebuffer); } } diff --git a/testcases/config.h.Profiling b/testcases/config.h.Profiling index 28adfeb..c491042 100644 --- a/testcases/config.h.Profiling +++ b/testcases/config.h.Profiling @@ -556,13 +556,6 @@ PWM value for 'off' */ #define REFERENCE REFERENCE_AVCC -/** \def STEP_INTERRUPT_INTERRUPTIBLE - this option makes the step interrupt interruptible (nested). - this should help immensely with dropped serial characters, but may also make debugging infuriating due to the complexities arising from nested interrupts - \note disable this option if you're using a '168 or for some reason your ram usage is above 90%. This option hugely increases likelihood of stack smashing. -*/ -#define STEP_INTERRUPT_INTERRUPTIBLE 1 - /** temperature history count. This is how many temperature readings to keep in order to calculate derivative in PID loop higher values make PID derivative term more stable at the expense of reaction time