2017-06-26 04:17 AM
Hi community !,
I'm using STM32f1031RB Nucleo 64, and I wanted to know how can I programm my timer TIM2 (internal clock), in order to allow some of interruptions in my main programm. Actually; I'm using HAL_Delay and I want to replace it to TIM2's interruptions.Thank you in advance,Nicolas2017-06-26 07:22 AM
Do you mean you need to perform a periodical job using timer?
if so and suppose you are using HAL library,
please take a look at the cube example in
STM32Cube_FW_F1_V1.4.0\Projects\STM32F103RB-Nucleo\Examples\TIM
Basically, it just
initialize the timer, enable the Timer interrupt, write your own callback function, then start the timer.