There is a Systick timer in the ARM Cortex-M3 core, which is a 24-bit countdown timer. When the count reaches 0, it will automatically reload the initial value of the timer from the Load register. As long as the ENABLE in the CTRL register is not cleared to 0, it will never stop. The understanding of the tick timer is mainly divided into the following items:
1. Clock source of tick timer
Looking at the above picture, you may have an illusion that the tick timer is 1/8 of the system clock. In fact, it is not. The clock of the tick timer can be either HCLK/8 or HCLK. This is set through the CTRL register. Knowing this is very important for the clock calculation of the operating system, because the clock time must be calculated accurately.
2. Tick timer register
From here we can see that there are two options for the clock source
3. Tick timer library function
(1) Where are the registers defined? ————In core_cm3.h.
typedef struct {
__IO uint32_t CTRL;
__IO uint32_t LOAD;
__IO uint32_t VAL;
__I uint32_t CALIB;
} SysTick_Type; …
#define SysTick ((SysTick_Type *) SysTick_BASE)
(2) Setting steps
①. Select the clock source
②Set the number of reloads (reload)
③ Enable interrupt
④Start the tick timer
Previous article:STM32 uses SysTick for accurate timing
Next article:SysTick timer and delay function
Recommended ReadingLatest update time:2024-11-16 11:27
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【AT-START-F403A Review】+OLED screen driver and application
- Inverting adder schematic and circuit diagram
- EEWORLD University - TI gate drivers for every FET
- Please help analyze the role of this voltage regulator diode in the circuit!
- MEMS pressure sensors solve new pain points in human-machine interface
- 2021 Electronic Competition Topic--Nanjing University of Information Science and Technology On-campus Selection Competition Topic
- [Learning Resources] Current Sense Amplifiers from Beginner to Advanced
- About transfer function
- MSP430F5438A serial port
- How to design a minimal system?