2019-03-31 11:52 PM
Dear Member,
How can I generate 5Hz pulse on OC using TIM3 ?
Here is my setting on STM32CubeMx
Thanks
2019-04-01 11:10 PM
with this setting :
htim3.Init.Prescaler = 5;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 5;
What frequency do I get ?
What's the formula ?
2019-04-02 06:08 AM
htim3.Init.Prescaler = (SystemCoreClock/1000000)-1; //(2.097Mhz/1000000)-1
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 1000000/1000; //1Khz
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
Is my calculation right ?