The STM32F1 series products, in addition to interconnected products, have 8 timers
TIM6, TIM7: basic timer
TIM2/3/4/5: general timer
TIM1, TIM8: advanced timer
The difference between the three timers:
Basic timer:
The basic timers TIM6 and TIM7 each contain a 16-bit auto-load counter driven by their own programmable prescaler. They can be used as a general-purpose timer to provide a time base, in particular, they can provide a clock for a digital-to-analog converter (DAC). In fact, they are directly connected to the DAC inside the chip and directly drive the DAC through the trigger output. The two timers are independent of each other and do not share any resources.
Basic timer block diagram:
1. The timer clock source
TIM6 TIM7 is mounted on APB1 and is controlled by the pre-scaling coefficient. 1: 36M 2: 72M
2. Counter clock
After the timer clock passes through the PSC prescaler, that is, CK_CNT, it is used to drive the counter to count. The PSC prescaler is a 16-bit register, so the screen division coefficient is 1-65536
3. Counter
TIM6/7 is a counter that can only count up
4. Automatic Load Register
The automatic load register is a 26-bit register that contains the overflow value of the counter.
Calculation of timing time
The timer clock is: CK_CLK
pre-division value: PSC
automatic load register value: ARR number
of times entering interruption: time
t=time*(ARR+1)*(PSC+1)/(CK_CLK)
Previous article:STM32F103 series RTC crystal oscillator problem solving record
Next article:STM32 system clock setting, using external active crystal oscillator related configuration issues
- Popular Resources
- Popular amplifiers
- Learn ARM development(14)
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- [AT32WB415 Review] Initial Introduction and Development Environment Construction
- EEWORLD University Hall----Live Replay: TI innovates next-generation automotive gateway system
- TI DSP 28335 Programming Example
- [Prize Collection] Come and recommend a wave of cheap and easy-to-use power chips~
- Problems that should be paid attention to when using TTL circuits
- Is there a sensor that can sense the layers?
- How to draw the minimum system board for stm8l?
- What is the function of useModule in the Da Vinci routine video_copy?
- LPS35HW's waterproof function
- General Concept of Frequency Response