How can I count TIM1 overflow when TIM1 was external clock mode 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-02 4: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);
}
Labels:
- Labels:
-
STM32F0 Series
-
TIM
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-02 6: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
