cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F051R8 missing interrupt response

rfrech
Associate II
Posted on December 16, 2012 at 14:20

During programming trials on a STM32F051 discovery cardlet I found out that the TIM1 update interrupt does not work while using TIM1 channel 4 for PWM input signal evaluation. The update flag UIF is set, but no interrupt happens. Other interrupt events of TIM1 function correcly. I circumvented that problem by using the compare feature of a free channel of TIM1. Is this missing interrupt a design problem or a single failure on my specific chip?

Any help is appreciated.

Here are the specific F051 chip data:

STM32F051

R8T6

GH221 W6

CHN GH 207

#stm32f051 #tim1 #uif
3 REPLIES 3
crt2
Associate II
Posted on December 17, 2012 at 16:56

Hey,

I havent tried the described situation but you might want to check out the interrupt priority/subpriority levels. If PWM interrupt has higher priority then it cannot be triggered/interrupted over the timer interrupt.

rfrech
Associate II
Posted on December 21, 2012 at 10:01

Hi Crt,

thank you for your comment. I think there is no conflict with priorities because the UI is the only pending event. I have also tried to trigger the UI by setting the UG bit in the TIM1_EGR register. The UIF switches on correctly, but software does not branch to the interrupt routine. I think interrupt setup is correct because other interrupt responses of TIM1 (e.g. CC4IF) function correctly.

I have now a new cardlet with ST32F050C6 up and running, but this chip version shows the same problem: UIF of TIM1 does not generate interrupt. The UIF can be set by a counter update or by EG.

rfrech
Associate II
Posted on December 21, 2012 at 16:08

Problem solved   :-))

TIM1 uses 2 interrupt vectors instead just 1 as all the other timers do. I assumed UI to be supported by the same interrupt as CC1/2/3/4. That's not the case. I have fixed the error and TIM1 UIF function is as expected now.

Roland