cancel
Showing results for 
Search instead for 
Did you mean: 

TIMx_RCR IRQ?

SWenn.1
Senior III

I am using TIM16 as a one second counter on an STM32WB55. I would like to generate an interrupt after it rolls x times (as example 2). I set the TIMx_RCR to a 1. Can someone tell me what function I need to call in the HAL library and should I place that function within the "HAL_TIM_PeriodElapsedCallback" which I am using?

I only see the "HAL_TIM_GenerateEvent" which to me sounds like if you want to do a software generate of an event????

Thank you.

2 REPLIES 2

Only Advanced TM support repetition counts, so typically TIM1, TIM8 in most STM32.

It decimates the Update IRQ calls.

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

TIM16 on STM32WB55 has a setting for (see below)....My ISR goes off every 1 second....I am under the impression that using this 'event' (ie RCR) that I can generate interrupts every 2 seconds or 3 seconds, etc. I am not sure what the value of this is because I could just as easily create a variable to count how many times I go into the ISR??

0693W00000NpvolQAB.png