How to get a Timer started without interrupt?
The code generated looks fine so far, however it isn't included the call to the timer start function, hence the timer is initialized but not started. To start it in non interruption mode use HAL_TIM_Base_Start(&amp;htim2); after the initialization.