From d35164c46f7a880704e2f29f265b25c6cf286115 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Fri, 5 Jun 2015 23:30:37 +1000 Subject: [PATCH] Minor timing protections --- decoders.ino | 9 +- reference/Speeduino base tune.msq | 315 +++++++++++++++++++++++------- reference/speeduino.ini | 6 +- scheduler.ino | 24 +-- speeduino.ino | 7 +- timers.ino | 2 +- 6 files changed, 265 insertions(+), 98 deletions(-) diff --git a/decoders.ino b/decoders.ino index 152511b8..f4f98941 100644 --- a/decoders.ino +++ b/decoders.ino @@ -36,11 +36,10 @@ void triggerPri_missingTooth() { // http://www.msextra.com/forums/viewtopic.php?f=94&t=22976 // http://www.megamanual.com/ms2/wheel.htm - noInterrupts(); curTime = micros(); curGap = curTime - toothLastToothTime; - if ( curGap < triggerFilterTime ) { interrupts(); return; } //Debounce check. Pulses should never be less than triggerFilterTime, so if they are it means a false trigger. (A 36-1 wheel at 8000pm will have triggers approx. every 200uS) + if ( curGap < triggerFilterTime ) { return; } //Debounce check. Pulses should never be less than triggerFilterTime, so if they are it means a false trigger. (A 36-1 wheel at 8000pm will have triggers approx. every 200uS) toothCurrentCount++; //Increment the tooth counter //High speed tooth logging history @@ -56,7 +55,7 @@ void triggerPri_missingTooth() if(configPage2.triggerMissingTeeth == 1) { targetGap = (3 * (toothLastToothTime - toothLastMinusOneToothTime)) >> 1; } //Multiply by 1.5 (Checks for a gap 1.5x greater than the last one) (Uses bitshift to multiply by 3 then divide by 2. Much faster than multiplying by 1.5) //else { targetGap = (10 * (toothLastToothTime - toothLastMinusOneToothTime)) >> 2; } //Multiply by 2.5 (Checks for a gap 2.5x greater than the last one) else { targetGap = ((toothLastToothTime - toothLastMinusOneToothTime)) * 2; } //Multiply by 2 (Checks for a gap 2x greater than the last one) - if ( curGap > targetGap ) + if ( curGap > targetGap || toothCurrentCount > triggerActualTeeth) { toothCurrentCount = 1; toothOneMinusOneTime = toothOneTime; @@ -67,7 +66,7 @@ void triggerPri_missingTooth() toothLastMinusOneToothTime = toothLastToothTime; toothLastToothTime = curTime; - interrupts(); + //interrupts(); } void triggerSec_missingTooth(){ return; } //This function currently is not used @@ -83,8 +82,10 @@ int getRPM_missingTooth() int getCrankAngle_missingTooth(int timePerDegree) { //This is the current angle ATDC the engine is at. This is the last known position based on what tooth was last 'seen'. It is only accurate to the resolution of the trigger wheel (Eg 36-1 is 10 degrees) + noInterrupts(); int crankAngle = (toothCurrentCount - 1) * triggerToothAngle + configPage2.triggerAngle; //Number of teeth that have passed since tooth 1, multiplied by the angle each tooth represents, plus the angle that tooth 1 is ATDC. This gives accuracy only to the nearest tooth. crankAngle += ( (micros() - toothLastToothTime) / timePerDegree); //Estimate the number of degrees travelled since the last tooth + interrupts(); if (crankAngle > 360) { crankAngle -= 360; } return crankAngle; diff --git a/reference/Speeduino base tune.msq b/reference/Speeduino base tune.msq index c0d4caef..d97458f7 100644 --- a/reference/Speeduino base tune.msq +++ b/reference/Speeduino base tune.msq @@ -1,7 +1,7 @@ - - + + "0" @@ -41,37 +41,63 @@ 71.0 - - - 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 - 29.0 32.0 33.0 35.0 36.0 36.0 36.0 36.0 - 35.0 37.0 38.0 39.0 41.0 46.0 46.0 46.0 - 46.0 53.0 55.0 56.0 56.0 56.0 55.0 55.0 - 59.0 64.0 65.0 65.0 65.0 65.0 65.0 65.0 - 71.0 74.0 75.0 75.0 75.0 75.0 75.0 74.0 - 90.0 91.0 92.0 92.0 92.0 92.0 92.0 91.0 - 102.0 102.0 103.0 103.0 103.0 103.0 103.0 103.0 + + + 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0 + 28.0 29.0 29.0 30.0 30.0 30.0 31.0 31.0 31.0 31.0 31.0 31.0 31.0 31.0 31.0 31.0 + 29.0 30.0 31.0 32.0 32.0 33.0 34.0 35.0 35.0 35.0 35.0 35.0 35.0 35.0 35.0 35.0 + 31.0 33.0 34.0 34.0 35.0 36.0 36.0 37.0 38.0 38.0 39.0 40.0 40.0 40.0 40.0 40.0 + 34.0 35.0 36.0 37.0 37.0 38.0 38.0 39.0 40.0 41.0 43.0 45.0 45.0 45.0 45.0 45.0 + 39.0 40.0 42.0 43.0 43.0 44.0 44.0 45.0 46.0 47.0 48.0 49.0 49.0 49.0 49.0 49.0 + 44.0 47.0 49.0 51.0 51.0 52.0 52.0 53.0 53.0 53.0 54.0 54.0 54.0 53.0 53.0 53.0 + 49.0 52.0 56.0 57.0 57.0 58.0 58.0 58.0 58.0 58.0 58.0 58.0 58.0 58.0 58.0 58.0 + 56.0 58.0 61.0 62.0 62.0 62.0 63.0 63.0 63.0 63.0 63.0 63.0 62.0 62.0 62.0 62.0 + 61.0 64.0 66.0 66.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 + 67.0 69.0 70.0 71.0 72.0 72.0 72.0 72.0 72.0 72.0 72.0 72.0 72.0 72.0 72.0 71.0 + 74.0 75.0 76.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 77.0 76.0 + 82.0 83.0 84.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 85.0 84.0 + 91.0 91.0 92.0 92.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 92.0 92.0 + 96.0 97.0 97.0 97.0 98.0 98.0 98.0 98.0 98.0 98.0 98.0 98.0 98.0 98.0 98.0 97.0 + 102.0 102.0 102.0 102.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 103.0 - + 1000.0 + 1200.0 1500.0 - 2000.0 - 3000.0 - 4500.0 - 6000.0 - 7500.0 + 1700.0 + 1900.0 + 2300.0 + 2800.0 + 3400.0 + 4100.0 + 4800.0 + 5500.0 + 6200.0 + 6900.0 + 7600.0 + 8300.0 9000.0 - + 2.0 + 4.0 6.0 - 10.0 - 25.0 - 45.0 - 65.0 - 85.0 + 8.0 + 9.0 + 15.0 + 22.0 + 30.0 + 40.0 + 49.0 + 58.0 + 68.0 + 77.0 + 86.0 + 93.0 100.0 + + 6.5 3.5 15.0 @@ -103,7 +129,7 @@ "RPM" "RPM" "RPM" -12.4 +12.2 2.0 "Alternating" 1.0 @@ -122,46 +148,72 @@ "Narrow band" "Alpha-N" "Off" -"Semi-Sequential" +"Bank" 1.5 -0.0 -59.94 +3500.0 +4200.0 0.0 0.0 0.0 252.0 - - - 10.0 20.0 25.0 27.0 32.0 38.0 38.0 40.0 - 10.0 21.0 23.0 27.0 32.0 35.0 38.0 40.0 - 12.0 23.0 23.0 27.0 32.0 35.0 38.0 40.0 - 12.0 15.0 23.0 28.0 27.0 28.0 31.0 33.0 - 10.0 15.0 19.0 24.0 24.0 25.0 27.0 29.0 - 10.0 15.0 13.0 18.0 18.0 19.0 21.0 23.0 - 10.0 15.0 12.0 17.0 17.0 18.0 20.0 22.0 - 10.0 15.0 15.0 17.0 17.0 18.0 20.0 23.0 + + + 10.0 15.0 19.0 22.0 24.0 26.0 27.0 28.0 31.0 33.0 36.0 38.0 38.0 38.0 39.0 40.0 + 10.0 15.0 20.0 22.0 24.0 25.0 26.0 28.0 31.0 33.0 35.0 37.0 37.0 38.0 39.0 40.0 + 10.0 15.0 20.0 22.0 23.0 24.0 26.0 28.0 31.0 33.0 34.0 36.0 37.0 38.0 39.0 40.0 + 11.0 16.0 21.0 22.0 23.0 24.0 26.0 28.0 31.0 33.0 34.0 35.0 37.0 38.0 39.0 40.0 + 12.0 17.0 22.0 23.0 23.0 24.0 26.0 28.0 31.0 33.0 34.0 35.0 37.0 38.0 39.0 40.0 + 12.0 16.0 20.0 21.0 23.0 24.0 26.0 28.0 30.0 31.0 32.0 33.0 34.0 36.0 37.0 38.0 + 12.0 14.0 16.0 19.0 22.0 25.0 27.0 28.0 28.0 28.0 29.0 30.0 31.0 33.0 33.0 34.0 + 11.0 13.0 15.0 18.0 21.0 24.0 26.0 27.0 26.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 + 11.0 13.0 15.0 17.0 19.0 22.0 24.0 25.0 25.0 25.0 25.0 26.0 27.0 28.0 29.0 30.0 + 10.0 12.0 15.0 16.0 17.0 19.0 22.0 23.0 23.0 23.0 23.0 24.0 25.0 26.0 27.0 28.0 + 10.0 12.0 15.0 15.0 15.0 17.0 19.0 20.0 20.0 20.0 21.0 21.0 22.0 23.0 24.0 25.0 + 10.0 12.0 15.0 14.0 13.0 15.0 17.0 18.0 18.0 18.0 19.0 19.0 20.0 21.0 22.0 23.0 + 10.0 12.0 15.0 14.0 13.0 14.0 16.0 17.0 17.0 18.0 18.0 19.0 20.0 21.0 21.0 22.0 + 10.0 12.0 15.0 14.0 13.0 14.0 16.0 17.0 17.0 17.0 18.0 18.0 19.0 20.0 21.0 22.0 + 10.0 12.0 15.0 14.0 14.0 15.0 16.0 17.0 17.0 17.0 18.0 18.0 19.0 20.0 21.0 23.0 + 10.0 12.0 15.0 15.0 15.0 16.0 17.0 17.0 17.0 17.0 18.0 18.0 19.0 20.0 22.0 23.0 - + 1000.0 + 1200.0 1500.0 - 2000.0 - 3000.0 - 4500.0 - 6000.0 - 7500.0 + 1700.0 + 1900.0 + 2300.0 + 2800.0 + 3400.0 + 4100.0 + 4800.0 + 5500.0 + 6200.0 + 6900.0 + 7600.0 + 8300.0 9000.0 - + 2.0 + 4.0 6.0 - 10.0 - 25.0 - 45.0 - 65.0 - 85.0 + 8.0 + 9.0 + 15.0 + 22.0 + 30.0 + 40.0 + 49.0 + 58.0 + 68.0 + 77.0 + 86.0 + 93.0 100.0 + + 1.0 0.0 11.6 @@ -222,37 +274,81 @@ 85.0 - - - 14.7 14.7 15.0 15.1 14.9 14.7 14.7 14.7 - 14.7 14.7 15.0 15.1 14.9 14.7 14.7 14.7 - 14.7 14.7 14.8 15.0 14.8 14.6 14.4 14.0 - 14.3 14.3 14.7 14.7 14.6 14.1 13.8 13.4 - 14.1 14.2 14.5 14.3 14.0 13.5 13.1 12.9 - 14.1 14.2 13.7 13.6 13.4 13.1 13.0 12.8 - 13.5 13.5 12.8 12.9 12.8 12.7 12.7 12.7 - 12.8 12.8 12.8 12.7 12.5 12.5 12.5 12.5 + + + 14.7 14.7 14.7 14.8 15.0 15.0 15.1 15.0 15.0 14.9 14.8 14.7 14.7 14.7 14.7 14.7 + 14.7 14.7 14.7 14.8 15.0 15.0 15.1 15.0 15.0 14.9 14.8 14.7 14.7 14.7 14.7 14.7 + 14.7 14.7 14.7 14.8 15.0 15.0 15.1 15.0 15.0 14.9 14.8 14.7 14.7 14.7 14.7 14.7 + 14.7 14.7 14.7 14.8 14.9 15.0 15.0 15.0 14.9 14.8 14.7 14.6 14.6 14.6 14.5 14.4 + 14.7 14.7 14.7 14.8 14.8 14.9 15.0 15.0 14.9 14.8 14.7 14.6 14.5 14.4 14.3 14.1 + 14.6 14.6 14.6 14.6 14.7 14.8 14.9 14.9 14.8 14.7 14.5 14.4 14.3 14.2 14.0 13.8 + 14.4 14.4 14.4 14.5 14.7 14.7 14.8 14.7 14.7 14.6 14.3 14.2 14.0 13.9 13.7 13.5 + 14.2 14.3 14.3 14.4 14.6 14.6 14.6 14.6 14.5 14.3 14.1 13.9 13.7 13.6 13.4 13.3 + 14.2 14.2 14.2 14.4 14.5 14.5 14.4 14.3 14.2 14.1 13.8 13.6 13.4 13.3 13.2 13.0 + 14.1 14.1 14.2 14.3 14.3 14.3 14.2 14.1 14.0 13.8 13.6 13.4 13.2 13.1 13.0 12.9 + 14.1 14.1 14.2 14.1 14.0 13.9 13.9 13.8 13.7 13.5 13.4 13.2 13.1 13.0 12.9 12.8 + 14.0 14.1 14.1 13.9 13.7 13.6 13.5 13.5 13.4 13.3 13.1 13.0 13.0 12.9 12.9 12.8 + 13.7 13.8 13.8 13.5 13.2 13.2 13.2 13.1 13.1 13.0 12.9 12.9 12.8 12.8 12.8 12.7 + 13.5 13.5 13.5 13.2 12.9 12.8 12.9 12.9 12.8 12.8 12.7 12.7 12.7 12.7 12.7 12.7 + 13.1 13.1 13.1 13.0 12.8 12.8 12.8 12.8 12.7 12.6 12.6 12.6 12.6 12.6 12.6 12.6 + 12.8 12.8 12.8 12.8 12.8 12.8 12.7 12.6 12.6 12.5 12.5 12.5 12.5 12.5 12.5 12.5 - + 500.0 + 800.0 1200.0 - 2000.0 - 3000.0 - 3500.0 - 4200.0 - 5000.0 + 1500.0 + 1900.0 + 2300.0 + 2800.0 + 3100.0 + 3400.0 + 3600.0 + 4000.0 + 4300.0 + 4700.0 + 5100.0 + 5500.0 6000.0 - + 2.0 + 3.0 4.0 + 5.0 6.0 + 7.0 8.0 - 10.0 - 15.0 - 20.0 + 9.0 + 9.0 + 11.0 + 13.0 + 16.0 + 18.0 + 21.0 + 25.0 30.0 + + +24300.0 +24300.0 +100.0 +0.0 +0.0 +4000.0 +1000.0 +800.0 +2300.0 +6500.0 +3200.0 +3500.0 +3800.0 +100.0 +24300.0 +4500.0 +3000.0 +6000.0 "No correction" "Wide Band" 100.0 @@ -282,8 +378,8 @@ 151.0 107.0 100.0 - 95.0 - 89.0 + 100.0 + 100.0 -40.0 @@ -307,6 +403,81 @@ 81.0 74.0 +24300.0 + + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 7.0 + 11.0 + 16.0 + 19.0 + 24.0 + 29.0 + 34.0 + 38.0 + 43.0 + + + 108.0 + 81.0 + 52.0 + 28.0 + 14.0 + 1.0 + -12.0 + -21.0 + -31.0 + -37.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 27.0 + 33.0 + 42.0 + 59.0 + + + 127.0 + 80.0 + 39.0 + -13.0 + +"None" +"1" +0 +-40.0 +0.0 +0.0 diff --git a/reference/speeduino.ini b/reference/speeduino.ini index 36a263f5..512ece92 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -1071,9 +1071,11 @@ help = helpEnrichments, "Enrichments Help" throttle = { tps }, "%" altDiv = { alternate ? 2 : 1 } - cycleTime = { 60000.0 / rpm * (2.0-twoStroke) } + ;cycleTime = { 60000.0 / rpm * (2.0-twoStroke) } + cycleTime = { 60000.0 / rpm } nSquirts = { nCylinders/divider } - dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime } + ;dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime } + dutyCycle = { 100.0*pulseWidth/cycleTime } #if EXPANDED_CLT_TEMP clt_exp = { 1 } diff --git a/scheduler.ino b/scheduler.ino index 6bd5f1fc..e485f577 100644 --- a/scheduler.ino +++ b/scheduler.ino @@ -185,7 +185,7 @@ void setIgnitionSchedule4(void (*startCallback)(), unsigned long timeout, unsign //This calls the relevant callback function (startCallback or endCallback) depending on the status of the schedule. //If the startCallback function is called, we put the scheduler into RUNNING state //Timer3A (fuel schedule 1) Compare Vector -ISR(TIMER3_COMPA_vect) //fuelSchedule1 +ISR(TIMER3_COMPA_vect, ISR_NOBLOCK) //fuelSchedule1 { if (fuelSchedule1.Status == PENDING) //Check to see if this schedule is turn on { @@ -202,7 +202,7 @@ ISR(TIMER3_COMPA_vect) //fuelSchedule1 TIMSK3 &= ~(1 << OCIE3A); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } } -ISR(TIMER3_COMPB_vect) //fuelSchedule2 +ISR(TIMER3_COMPB_vect, ISR_NOBLOCK) //fuelSchedule2 { if (fuelSchedule2.Status == PENDING) //Check to see if this schedule is turn on { @@ -219,9 +219,8 @@ ISR(TIMER3_COMPB_vect) //fuelSchedule2 TIMSK3 &= ~(1 << OCIE3B); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } } -ISR(TIMER3_COMPC_vect) //fuelSchedule3 +ISR(TIMER3_COMPC_vect, ISR_NOBLOCK) //fuelSchedule3 { - noInterrupts(); if (fuelSchedule3.Status == PENDING) //Check to see if this schedule is turn on { fuelSchedule3.StartCallback(); @@ -236,11 +235,9 @@ ISR(TIMER3_COMPC_vect) //fuelSchedule3 fuelSchedule3.Status = OFF; //Turn off the schedule TIMSK3 &= ~(1 << OCIE3C); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } - interrupts(); } -ISR(TIMER4_COMPB_vect) //fuelSchedule4 +ISR(TIMER4_COMPB_vect, ISR_NOBLOCK) //fuelSchedule4 { - noInterrupts(); if (fuelSchedule4.Status == PENDING) //Check to see if this schedule is turn on { fuelSchedule4.StartCallback(); @@ -255,9 +252,8 @@ ISR(TIMER4_COMPB_vect) //fuelSchedule4 fuelSchedule4.Status = OFF; //Turn off the schedule TIMSK4 &= ~(1 << OCIE4B); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } - interrupts(); } -ISR(TIMER5_COMPA_vect) //ignitionSchedule1 +ISR(TIMER5_COMPA_vect, ISR_NOBLOCK) //ignitionSchedule1 { if (ignitionSchedule1.Status == PENDING) //Check to see if this schedule is turn on { @@ -276,7 +272,7 @@ ISR(TIMER5_COMPA_vect) //ignitionSchedule1 TIMSK5 &= ~(1 << OCIE5A); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } } -ISR(TIMER5_COMPB_vect) //ignitionSchedule2 +ISR(TIMER5_COMPB_vect, ISR_NOBLOCK) //ignitionSchedule2 { if (ignitionSchedule2.Status == PENDING) //Check to see if this schedule is turn on { @@ -295,9 +291,8 @@ ISR(TIMER5_COMPB_vect) //ignitionSchedule2 TIMSK5 &= ~(1 << OCIE5B); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } } -ISR(TIMER5_COMPC_vect) //ignitionSchedule3 +ISR(TIMER5_COMPC_vect, ISR_NOBLOCK) //ignitionSchedule3 { - noInterrupts(); if (ignitionSchedule3.Status == PENDING) //Check to see if this schedule is turn on { ignitionSchedule3.Status = RUNNING; //Set the status to be in progress (ie The start callback has been called, but not the end callback) @@ -314,11 +309,9 @@ ISR(TIMER5_COMPC_vect) //ignitionSchedule3 ignitionCount += 1; //Increment the igintion counter TIMSK5 &= ~(1 << OCIE5C); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } - interrupts(); } -ISR(TIMER4_COMPA_vect) //ignitionSchedule4 +ISR(TIMER4_COMPA_vect, ISR_NOBLOCK) //ignitionSchedule4 { - noInterrupts(); if (ignitionSchedule4.Status == PENDING) //Check to see if this schedule is turn on { ignitionSchedule4.Status = RUNNING; //Set the status to be in progress (ie The start callback has been called, but not the end callback) @@ -335,5 +328,4 @@ ISR(TIMER4_COMPA_vect) //ignitionSchedule4 ignitionCount += 1; //Increment the igintion counter TIMSK5 &= ~(1 << OCIE4A); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3) } - interrupts(); } diff --git a/speeduino.ino b/speeduino.ino index 6c7b9ec9..f63efd18 100644 --- a/speeduino.ino +++ b/speeduino.ino @@ -425,9 +425,6 @@ void loop() //How fast are we going? Need to know how long (uS) it will take to get from one tooth to the next. We then use that to estimate how far we are between the last tooth and the next one timePerDegree = ldiv( 166666L, currentStatus.RPM ).quot; //There is a small amount of rounding in this calculation, however it is less than 0.001 of a uS (Faster as ldiv than / ) - //Determine the current crank angle - int crankAngle = getCrankAngle(timePerDegree); - //*********************************************************************************************** //BEGIN INJECTION TIMING //Determine next firing angles @@ -542,6 +539,10 @@ void loop() //Finally calculate the time (uS) until we reach the firing angles and set the schedules //We only need to set the shcedule if we're BEFORE the open angle //This may potentially be called a number of times as we get closer and closer to the opening time + + //Determine the current crank angle + int crankAngle = getCrankAngle(timePerDegree); + if (injector1StartAngle > crankAngle) { if (configPage1.injTiming == 1) diff --git a/timers.ino b/timers.ino index 85636b5a..decb8f8e 100644 --- a/timers.ino +++ b/timers.ino @@ -29,7 +29,7 @@ void initialiseTimers() //Timer2 Overflow Interrupt Vector, called when the timer overflows. //Executes every ~1ms. -ISR(TIMER2_OVF_vect) +ISR(TIMER2_OVF_vect, ISR_NOBLOCK) { //Increment Loop Counters