cancel
Showing results for 
Search instead for 
Did you mean: 

timer calculation and clock configuration setting in mxcube

dee1
Associate II

i am using stm32h735g-dk board,trying to interface servo motor with it by using timer5 channel1.please give me step by step explination to set prescalar and arr value

3 REPLIES 3
AScha.3
Chief

What is the "servo motor" ?

show pic.

What signal it needs ? (frequ., pulse timing ...)

If you feel a post has answered your question, please click "Accept as Solution".

motor name is MG90.for every 1sec im trying to run it so how to configure clock for this

sysclock delay also not working.

Ok, this :

AScha3_0-1714740738339.pngAScha3_1-1714742281466.png

So set TIM5 ch1 : i have clock -> timers 200MHz, so div 199 -> 1us timer tick ; 

AScha3_3-1714743906341.png

AScha3_2-1714743678282.png

ccr 1500 -> mid position ; set to 1000...2000 for full left/right position.

then in main:

 HAL_TIM_PWM_Start(&htim5, TIM_CHANNEL_1);
If you feel a post has answered your question, please click "Accept as Solution".