diff --git a/config.gen3.h b/config.gen3.h index 2cd846c..ac58e57 100644 --- a/config.gen3.h +++ b/config.gen3.h @@ -368,12 +368,6 @@ DEFINE_TEMP_SENSOR(noheater, TT_INTERCOM, 0) */ #define STEP_INTERRUPT_INTERRUPTIBLE 1 -/* - how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535) -*/ -#define TICK_TIME 2 MS -#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000)) - /* 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 e9a5004..29068f3 100644 --- a/config.gen6.h +++ b/config.gen6.h @@ -357,12 +357,6 @@ DEFINE_HEATER(extruder, PORTD, PIND6, OCR2B) */ #define STEP_INTERRUPT_INTERRUPTIBLE 1 -/* - how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535) -*/ -#define TICK_TIME 2 MS -#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000)) - /* 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.h.dist b/config.h.dist index 36cc491..999cec9 100644 --- a/config.h.dist +++ b/config.h.dist @@ -385,12 +385,6 @@ DEFINE_HEATER(bed, PORTB, PINB4, OCR0B) */ #define STEP_INTERRUPT_INTERRUPTIBLE 1 -/* - how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535) -*/ -#define TICK_TIME 2 MS -#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000)) - /* 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.h b/config.ramps.h index dcd719e..c159229 100644 --- a/config.ramps.h +++ b/config.ramps.h @@ -371,12 +371,6 @@ DEFINE_HEATER(fan, PORTH, PINH6, OCR2B) */ #define STEP_INTERRUPT_INTERRUPTIBLE 1 -/* - how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535) -*/ -#define TICK_TIME 2 MS -#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000)) - /* 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/timer.c b/timer.c index 9481aed..fe60c65 100644 --- a/timer.c +++ b/timer.c @@ -4,6 +4,12 @@ #include "dda_queue.h" +/* + how often we overflow and update our clock; with F_CPU=16MHz, max is < 4.096ms (TICK_TIME = 65535) +*/ +#define TICK_TIME 2 MS +#define TICK_TIME_MS (TICK_TIME / (F_CPU / 1000)) + volatile uint32_t next_step_time; uint8_t clock_counter_10ms = 0;