Fix wrong timer disable on idle setup

This commit is contained in:
Josh Stewart 2016-02-05 06:25:07 +11:00
parent 03968f61cf
commit 6cc62cf8dc
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ void initialiseAuxPWM()
boost_pwm_max_count = 1000000L / (16 * configPage3.boostFreq * 2); //Converts the frequency in Hz to the number of ticks (at 16uS) it takes to complete 1 cycle. The x2 is there because the frequency is stored at half value (in a byte)
vvt_pwm_max_count = 1000000L / (16 * configPage3.vvtFreq * 2); //Converts the frequency in Hz to the number of ticks (at 16uS) it takes to complete 1 cycle
TIMSK1 |= (1 << OCIE1A); //Turn on the A compare unit (ie turn on the interrupt)
TIMSK1 |= (1 << OCIE1A); //Turn on the A compare unit (ie turn on the interrupt)
TIMSK1 |= (1 << OCIE1B); //Turn on the B compare unit (ie turn on the interrupt)
}

View File

@ -16,7 +16,7 @@ void initialiseIdle()
{
//By default, turn off the PWM interrupt (It gets turned on below if needed)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
else { TIMSK1 &= ~(1 << OCIE1A); } // Disable timer channel
TIMSK4 &= ~(1 << OCIE4C); // Disable timer channel for idle
#endif
//Initialising comprises of setting the 2D tables with the relevant values from the config pages