cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Counter Mode Change

nxp
Associate II
Posted on October 30, 2016 at 18:17

I'm an engineer who is working on a project using STM32F103 microcontroller.

There is a problem in the programming of this element which is mentioned as follows

First, I activated Timer Counter through HAL Driver library. Now, I want to change the Counter Mode from UP to DOWN or vice versa during the running process in order to get a range of positive and negative counter numbers. But, I do not know what should I do.

I would be grateful if you give me some information to solve this problem.

1 REPLY 1
Posted on October 30, 2016 at 19:55

Couldn't you just modify the DIR bit in TIMx->TIM_CR1 ??

Either explicitly, or via the hTIM instance

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..