STM32 – Timer Methode 1- Initialisation du timer 2- Timer

STM32–Timer
Methode
1- Initialisationdutimer
2- Timer
Methode
Initialisationdutimer
RCC->APB1ENR|=(1<<0);
TIM2->PSC=160;
TIM2->ARR=9999;
Timer
TIM2->CR1|=0x01;
while(tmp3==0){
tmp3|=TIM2->SR;
}
TIM2->SR&=(0<<0);
tmp3=0;
TIM2->CR1&=(0<<0);