2022-05-13 06:15 AM
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.
2022-05-13 06:54 AM
Only Advanced TM support repetition counts, so typically TIM1, TIM8 in most STM32.
It decimates the Update IRQ calls.
2022-05-13 06:59 AM
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??