I am using stm32f100, and when debugging SysTick_Handler(), I use the following configuration
if (SysTick_Config(SystemCoreClock / 1000))
{
/* Capture error */
while (1);
} 周期为1ms,
/*******************************************************
**Function: Delay() delay function
**Input: TimeI, TimeI ms;
************************************************************/
void Delay(u32 TimeI)
{
u32 TimeJ;
TimeNum = TimeI;
while(TimeNum);
}
/*******************************************************
**Function: DelayCount() counting function, put it into the tick interrupt to decrement
**Input: None
**********************************************************/
void DelayCount(void)
{
if(TimeNum)TimeNum--;
}
void SysTick_Handler(void)
{
while(TimeNum);
}
Call Delay(10); and find that it keeps getting stuck in while(TimeNum);. When debugging, I see that the TimeNum value keeps decreasing. I really don’t understand. . . .
Previous article:Thoughts on the Implementation of Systick Interrupt Function SysTick_Handler
Next article:STM32 system learning-SysTick (system timer)
Recommended ReadingLatest update time:2024-11-16 19:43
- Popular Resources
- Popular amplifiers
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
- Standard USB keyboard data packet
- 【Small home weather station】+ Hardware design, board proofing
- Forever power_A tiny device that turns your universal power bank into an uninterruptible power supply
- 【NUCLEO-WL55JC2 Review 2】Introduction to NUCLEO-WL55JC2 Development Board
- Award-winning live broadcast: Keysight Technologies 100G/400G optical communication test solutions
- [Full cash back for orders, capped at 300 yuan] MPS Mall Power Design Products Recommendation, Huge Discount Experience Season!
- Crazy Shell AI open source drone GPIO (remote control indicator light control)
- Where can I get an evaluation board for Toshiba's rice-sized Bluetooth module?
- 16. Low-power intelligent TWS in-ear detection chip VK233DS, Shenzhen Yongjia Microelectronics is the first choice
- [Atria AT32WB415 Series Bluetooth BLE 5.0 MCU] PWM breathing light