Hello All,
I have a stm32f303 micro, and I am using Keil's uVision4. I am running at 8 Mhz. The function below is being called ok. But for some reason when I look at TIM7 CNT I don't have anything? Just 0x00, no up count?
void TimerInit ( void ) {
// 976 Hz 15625 Hz RCC->CFGR = 0x38F0; //(HCLK/16), (SYSCLK/512), (HSI Selected clock at SW) RCC->CR = 0x01; //HSI enabled RCC->APB2ENR = 0x01; //Enabling System Clock enabled RCC->APB1RSTR = 0x20; //Reseting TIM7 1=reset, 0=no-action RCC->APB1ENR = 0x20; //Enabling TIM7 Clock TIM7->CR1 = 0x85; //Clock enabled, URS enabled TIM7->SR = 0x00; //Clearing the UIF (Update Interrupt Flag) TIM7->DIER = 0x01; //Enabling the interrupt for the overflow of the Timer 7 TIM7->EGR = 0x01; //Event Generation Register to Update Registers TIM7->ARR = 0x8E; //The value required for the Event to occur, Counter value.
}
Does anyone have any ideas on what to check? Any suggestions?
I really appreciate the help, Jim