STM32f103c8t6 how to comfigure TIM3 for a period of 5ms
Hi community,
I am trying to port a project from old library maple leaf or older built for Arduino to to STM32cubeIDE
this function I couldn't find any ref to it, my guess it that is sets the period to 5ms
Timer3.setPeriod(1000 / 200);
browsing some threads in the community I found this formula for calculating the period
TIM Update = TIM Clock / (X * Y) Prescaler = X - 1 Period = Y - 1
according to it I put Presclaer X-1 = 59999 and Period to 5999
htim3.Instance = TIM3;
htim3.Init.Prescaler = 59999;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 5999;
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
Actually the entire code compiles but in the debug session TIM3 never starts, can any knowledgeable person help me to configure this timer for 5ms. thank you in advance.
Note: complete newby here I just started learning about electronics and mcu...
