In 32 applications, we generally reset in two ways:
1. Press the reset button to reset the program
2. Pull the jumper on the microcontroller to complete the 32
In the above two reset methods, for the chip, they are actually just programs triggered after the pin receives a jump delay signal. In the firmware library that comes with Keil, we can see the following program:
Here is the reset program code snippet from the library. EXPORT defines a global variable Reset_Handler. IMPORT means a function is referenced. The _main function introduced here is used to make the main function in the main function we usually write work, connecting the C program with the underlying assembler program to make the program work. When we first start learning, we often find that there is always a function in the environment written by others that we don’t know what it means: SystemInit(). We can see that the SystemInit function is introduced in line 150 of the picture, and the function is called in the next line, but it is not declared. Therefore, if we do not declare a new SystemInit function outside main when writing the main program, the program will report an error when compiling.
Just write an empty function as shown in the figure, the purpose is to trick the compiler into not reporting an error. Note that the function name here should be the same as the function name in the firmware library.
If you get this error in Keil:
..\OBJ\Template.axf: Error: L6218E: Undefined symbol assert_param (referred from misc.o).
This means that you have not defined the SystemInit() function. Therefore, you can solve the problem by defining SystemInit() in any .c function. The function can be empty.
Previous article:STM32 Problem Record: This time Keil compiler is to blame
Next article:Summary of LPC1788 debugging in external RAM
- 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
- EEWORLD University Hall----Live Replay: Maxim nanoPower Technology: Extending Battery Life and Improving Sensor Performance
- What knowledge do you need to do LED lighting?
- Various types of timers and clocks for MSP430
- Lisp Badge (uList Badge)
- UART1 idle interrupt exception occurs when STM32F407VE replaces STM32F429VI
- C++ inheritance important understanding
- [SC8905 EVM Evaluation] + Use of the setting tool SC9805tool
- FPGA Learning Experience
- The best NUCLEO-G474RE has arrived
- I don't know if it counts as a benefit. LIS3DHTR