cancel
Showing results for 
Search instead for 
Did you mean: 

Using Interruption without Delay

Nicolas Cmb
Associate III
Posted on June 26, 2017 at 13:17

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,

Nicolas
1 REPLY 1
Zt Liu
Senior III
Posted on June 26, 2017 at 16:22

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.