31950 views|3 replies

411

Posts

9

Resources
The OP
 

What is the use of TIM_ClockDivision? Please explain [Copy link]

This post was last edited by shijizai on 2018-5-14 15:54 As a newbie, I am here again . This time I don't understand the role of TIM_ClockDivision. When I downloaded the PWM waveform program of the stm32f103c8t6 board, TIM_ClockDivision was useless. When I wrote the program without TIM_ClockDivision, the program could also output PWM waves normally. But when I wrote the PWM wave program of the stm32f405rgt6, I found that the board could not output PWM waves without adding TIM_ClockDivision, but it could output PWM waves by adding this sentence TIM_TimeBaseStructure.TIM_ClockDivision=TIM_CKD_DIV1;. Why? Can the masters help explain, what is the role of TIM_ClockDivision? What is the difference with TIM_Period? Why can F103 output PWM normally without adding TIM_ClockDivision, but F405 can't? Below is my F405 program. I have read the manual and posted the contents of the manual. Xiaobai said that he could not understand what the manual said.

3.png (67.55 KB, downloads: 0)

3.png

4.png (32.16 KB, downloads: 0)

4.png

5.png (43.19 KB, downloads: 0)

5.png
This post is from stm32/stm8

Latest reply

That is available in all timers, and can be divided into any number. It is mainly used. clkdiv can only be divided into two.  Details Published on 2018-5-16 09:54
 

4005

Posts

0

Resources
2
 
The DIV is used to pre-divide the timer clock. The divided clock is sent to the timer clock input, in order to achieve a longer timing effect. The period is the PWM period, which is the return value of the timer. First, make the period as large as possible. If it still doesn't work, adjust the DIV. The actual situation is that some timer DIVs don't work. You have to try it. The manual doesn't explain it clearly.
This post is from stm32/stm8

Comments

Prescaler, what is the difference between TIM_Prescaler and TIM_ClockDivision? Are the two frequency divisions different? Can someone please explain?  Details Published on 2018-5-15 09:40
 
 

411

Posts

9

Resources
3
 
huo_hu posted on 2018-5-15 08:22 That DIV is to pre-divide the timer clock, and the divided clock is sent to the timer clock input, the purpose is to achieve a longer timing effect. peri ...
Pre-dividing, what is the difference between this TIM_Prescaler and TIM_ClockDivision, are the two frequency divisions different? Can the master help explain
This post is from stm32/stm8

Comments

That is what all timers have, it can divide the frequency by any number, it is mainly used, clkdiv can only do binary division.  Details Published on 2018-5-16 09:54
 
 

4005

Posts

0

Resources
4
 
Shijizai posted on 2018-5-15 09:40 Prescaler, what is the difference between this TIM_Prescaler and TIM_ClockDivision, are the two frequency division things different? Da...
That is available in all timers, and can be divided into any number. It is mainly used. clkdiv can only be divided into two.
This post is from stm32/stm8
 
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list