TIMx is composed of a 16-bit counter, a prescaler, and an automatic load register.
Counter: 16 bits (0-65535)
Prescaler 16 bits (register controlled counter)
When the pre-scaling frequency is 1, the counter increases by 1 for each time pulse, and when the pre-scaling frequency is 2, the counter increases by 1 for every two time pulses.
Auto-load register: The count value set by auto-load on each overflow event.
In-depth analysis:
The range of the counter (0-65535)
Prescaler range (0-65535)
Since the maximum frequency supported by STM32F103 is 72Mhz, you should pay attention to the difference between the two when setting. Generally, the automatic reload counter is set larger. If you set it to 10000-1 and set the prescaler to 72-1, you can achieve 1s timing. It can be understood that the counter is increased by 1 every 72 clock pulses, and the timer generates an overflow event when the counter is increased to 10000-1.
Previous article:STM chip clock setting
Next article:STM32 timer efficient time slice learning
- Popular Resources
- Popular amplifiers
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
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Power Factor Correction
- Ultra-low standby power consumption < 90mW non-auxiliary AC/DC power supply reference design
- 3D Printer Project—STM32F7508-DK Environment Creation (I)
- Looking for the movie download website of "Miracle"!
- mosfet discrete devices
- MSP430 MCU Development Record (21)
- 【PLC based on the Internet of Things】---Purely handmade PLC controller
- stm32 PWM triggers adc delay acquisition problem
- Those wiring skills required for high-frequency circuit design
- 【Smart Network Desk Lamp】4. Using the onboard buttons of ESP32-S2