2MHz timer was not working on Taranis
This commit is contained in:
@@ -62,11 +62,10 @@ void init2MhzTimer()
|
||||
// Now for timer 7
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM7EN ; // Enable clock
|
||||
|
||||
TIM7->PSC = 0 ; // Max speed
|
||||
TIM7->ARR = (PERI1_FREQUENCY * TIMER_MULT_APB1) / 2000000 - 1 ; // 0.5 uS, 2 MHz
|
||||
TIM7->CR2 = 0 ;
|
||||
TIM7->CR2 = 0x20 ;
|
||||
TIM7->CR1 = TIM_CR1_CEN ;
|
||||
TIM7->PSC = (PERI1_FREQUENCY * TIMER_MULT_APB1) / 2000000 - 1 ; // 0.5 uS, 2 MHz
|
||||
TIM7->ARR = 65535;
|
||||
TIM7->CR2 = 0;
|
||||
TIM7->CR1 = TIM_CR1_CEN;
|
||||
}
|
||||
|
||||
// Starts TIMER at 200Hz, 5mS period
|
||||
|
||||
Reference in New Issue
Block a user