A good place for the timer to be reset is when it is enabled via rcc. I don't think there is any reason not to- if you are enabling the timer via rcc, code must be assuming it was not rcc enabled and is not going to write to any timer register until the timer is enabled in rcc. If the timer was previously rcc enabled (and timer registers are now in an unknown state), and code (re-) enables the timer in rcc, by also first doing a timer reset in rcc that code will always get the reset state it was expecting.
An example from my stm32g071, which rcc resets/enables in the constructor, and also gives access to the rcc reset when you want to reconfigure-
//other includes also
#include "Tim67.hpp"
auto tim7_callback(Tim67&){ led.toggle(); };
auto tim7 = Tim67(MCU::TIM7) //constructor resets/enables timer in RCC
.periodHz(10) //period will be calculated from Hz (5Hz, since we toggle led)
.callback(tim7_callback); //set callback for irq
int
main ()
{
uart, "tim7 Hz: ", tim7.periodHz(), endl, //hz should match what we set (now computed from registers)
"tim7 count: ", tim7.count(), endl; //should be 0
tim7.irqOn(); //blink at 5Hz for 10s (all irq work is taken care of in function- cortex-m, peripheral)
wait(10s);
tim7.reset().periodHz(2).irqOn(); //now blink at 1Hz, reset is an rcc reset
while(1){}
}
The difference in creating your own code vs using the hal, is that for the hal you have to decode a bunch of macros in various files to understand what is actually happening. In general, it appears to me the typical hal code is somewhere between low level and high level- you get more than low level but they still leave enough for the user to do such as in this case where for whatever reason you are not getting registers in a reset state.
If I were to use the hal, I would put my own functions on top of it whether using LL or not. You get what you want, get an interface you like using the arguments you need, and the hal code becomes hidden in those functions and you do not have to interact with it at the app level. I do this for a few mcu's such as an efr32 (ble) where I do not have much to do so just use what they provide but wrap it inside c++ classes so when I get to the app level I'm writing in my code and not theirs.