In Keil's project settings, you need to change the macro definition according to the selected microcontroller. If the macro definition is not changed after the program is transplanted, an error may sometimes be reported.
This macro definition represents the type of chip, as follows:
Therefore, you need to change the macro definition according to the type of your chip.
How do I know the resource names of my chip? For example, what is the name of the timer?
You can open the stm32f10x.h file and scroll down to see:
These macros represent:
STM32F10X_LD_VL corresponds to LowDensity ValueLine, i.e. the small capacity STM32F100
STM32F10X_MD_VL corresponds to MediumDensity ValueLine, i.e. the medium-density STM32F100
STM32F10X_HD_VL corresponds to HighDensity ValueLine, i.e. the large capacity STM32F100
STM32F10X_CL corresponds to ConnectivityLine, i.e. STM32F105, STM32F107
In fact, the more commonly used one is STM32F103:
STM32F10X_LD corresponds to LowDensity, i.e. small capacity STM32F103, 101
STM32F10X_MD corresponds to MediumDensity, which is the medium-density STM32F103, 101
STM32F10X_HD corresponds to HighDensity, i.e. the large capacity STM32F103, 101
For example, the chip is STM32F103C8T6, the flash is 64K, which is a medium-capacity STM32F103, that is, STM32F10X_MD, so it corresponds to the following in the stm32f10x.h file:
It can be seen that the chip has three ordinary timers, TIM2, TIM3, and TIM4, one advanced timer, TIM1, and three serial ports. . .
Previous article:Keil code overall offset and search function
Next article:Keil Chinese garbled code solution and personal font setting
Recommended ReadingLatest update time:2024-11-16 16:49
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
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
- The live broadcast entrance is now open | Infineon BMS solutions protect electric vehicles and energy storage systems!
- Long loading time for ALTERA CYCLONE II and CYCLONE III
- Review summary: Chuanglong TL570x-EVM is here, TI AM5708 industrial board
- 【TI recommended course】#Consumer electronics application and design seminar#
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board]——6. Digital tube display clock (hour, minute, second)
- Advantages and disadvantages of totem pole compared to single transistor driver
- RT-thread studio hardware timer counting issue
- Highly recommend a good introductory book on digital signal processing
- python3,snake
- [TI recommended course] #[High Precision Laboratory] Interface: 3 Ethernet#