TIM1_GetCounter() Results
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-02 12:33 AM
I have initialized TIM1 timer with:
TIM1_DeInit();
TIM1_TimeBaseInit(16, TIM1_COUNTERMODE_UP, 1000, 0);
TIM1_SetCounter(0);
TIM1_ITConfig(TIM1_IT_UPDATE, ENABLE);
TIM1_Cmd(ENABLE);
But calls to TIM1_GetCounter(); return the value 2. I can see the counter interrupt running and can increment a variable which provides an accurate enough timer, but I want to use the value of the counter, why does it always return 2? What am I missing?
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
