Figure 1. STM32F10xxx Standard Peripheral Library architecture
2. With the above understanding, we open stm32f10x_conf.h and search for "stm32f10x_conf.h". We see the following code in lines 8291-8293:
#ifdef USE_STDPERIPH_DRIVER
#include "stm32f10x_conf.h"
#endif
Do you see the problem? This conditional compilation means: if the USE_STDPERIPH_DRIVER tag is defined, then stm32f10x_conf.h is included, and if it is not defined, it is not included. Needless to say, we want to use the firmware library, so we should predefine the USE_STDPERIPH_DRIVER tag. KEIL provides a way to predefine tags before compiling, which is mentioned above in the project settings "option for target" => "C/C++" tab => "define" to add USE_STDPERIPH_DRIVER. As shown in Figure 2 below:
Figure 2. Keil development environment (C/C++ preset window)
3. You must have noticed that I added another tag STM32F10X_HD in the preset area above, because you will find that lines 49-58 require us to specify the model of the period
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
/* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
/* #define STM32F10X_LD_VL */ /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
/* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
/* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
/* #define STM32F10X_HD */ /*!< STM32F10X_HD: STM32 High density devices */
/* #define STM32F10X_HD_VL */ /*!< STM32F10X_HD_VL: STM32 High density value line devices */
/* #define STM32F10X_XL */ /*!< STM32F10X_XL: STM32 XL-density devices */
/* #define STM32F10X_CL */ /*!< STM32F10X_CL: STM32 Connectivity line devices */
#endif
Previous article:Use of callback functions in STM32 USB firmware library
Next article:STM32 USB-HID communication migration steps
Recommended ReadingLatest update time:2024-11-15 11:59
- Popular Resources
- Popular amplifiers
- LwIP application development practical guide: based on STM32
- FreeRTOS kernel implementation and application development practical guide: based on STM32
- Deep understanding of brushless DC motor vector control technology
- BeagleBone Robotic Projects Build and control robots that walk, swim, roll, and fly
- 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)
- Learn ARM development (4)
- Learn ARM development (6)
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
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- [MSP430F5529 Review] 5. Timer output PWM wave to achieve breathing light
- The difference between various debugging interfaces (SWD, JTAG, Jlink, Ulink, STlink)
- Learn about motors with DDZZ669
- 【AT-START-F403A Review】4. Try 3 ADC synchronous triggering + AN11 simplified code
- Award-winning live broadcast | New requirements for connectors in 5G multi-scenario terminal applications and Molex's 5G connection solutions
- Problems encountered in simulating bridge rectifier using Multisim
- [SAMR21 new gameplay] 35. HCSR04 ultrasonic sensor
- Some interesting creative sharing
- [Evaluation of EC-01F-Kit, the NB-IoT development board of Anxinke] 05. Communication based on STM32+EC-01F Socket
- The evaluation plan for the current probe and signal generator winners is open! The instruments have been distributed, and we look forward to the sharing of the 6 little ones