2022-10-02 04:57 AM
Hi I am the new for stm32
I use perih. library for stm32f0. Could you show using register not hal library
My code is like below
void TIM1_BRK_UP_TRG_COM_IRQHandler(){
if(TIM_GetITStatus(TIM1,TIM_IT_Trigger) != RESET){
if((TIM1->CR1 &TIM_CR1_URS )== RESET ){
tut++ ;}
}
TIM_ClearITPendingBit(TIM1, TIM_IT_Trigger);
}
2022-10-02 06:16 AM
> TIM_IT_Trigger
No. Overflow causes the Update signal, so you want to use TIM_IT_Update at both places.
> if((TIM1->CR1 &TIM_CR1_URS )== RESET ){
There is no reason for this check.
JW