cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 - timer 6 interrupt

Omar Suárez
Senior
Posted on June 15, 2017 at 09:17

Hi,

I have been developping a HAL to configure and control the basic functions of the timers so I can configure an interrupt using timers 6 and 7.

The issue I am experimenting is that when I firstly initialize and enable the interrupts for the TIM6 I instantly have the first interrupt.

The way I am configuring the timer is :

   1. Configure all the parameters (operation mode, period, ARR preload enable, etc)

   2. Enable the TIM interrupt (UDIS and UIE)

   3. Enable the counter (CEN = 1) 

But I also tried to chage step 2 and 3 :

   1. Configure all the parameters (operation mode, period, ARR preload enable, etc)

   2. Enable the counter (CEN = 1) 

   3. Enable the TIM interrupt (UDIS and UIE) 

I obtain the same strange behaviour.

Is this the correct way to configure for the first time?

After this first instantaneous interrupt it works fine during the next interrupts (I re-init the TIM6 inside a callback).

Thanks in advanced,

Omar

#stm32f7 #timer #interrupt #timer-interrupt
0 REPLIES 0