1. A few days ago, I wrote a program for keyboard scanning, character input and simple shell on the development board. The program was modified based on the previous project. The source code was organized in a mess and there were no good comments. In the past two days, I organized the code and added more detailed comments to make it more readable and extensible.
2. Take this opportunity to study the part of the program related to STM32 hardware.
2. Development board configuration analysis
1. PA Exit
2. PB port
3. PC port
4. PD port
5. Power port
At this point, the IO configuration of the development board is basically clear.
3. Writing the initialization configuration program
The program uses the ucos operating system. Before calling OS_Init(), call BSP_Config() to configure the IO of the development board. The following is the source code of the program framework.
#include "stm32f10x_lib.h"
#include "bsp_config.h"
static GPIO_InitTypeDef GPIO_InitStructure;
static NVIC_InitTypeDef NVIC_InitStructure;
void RCC_Config(void);
void NVIC_Config(void);
void SysTick_Config(void);
void GPIO_Config(void);
void TIM_Config(void);
void USART_Config(void);
void BSP_Config(void)
{
}
The following is the source code of these specific configuration functions. I will post them as I modify them.
With such a program framework, it is easier to tailor the software to different applications.
Previous article:Analysis and arrangement of Zhilin STM32 program source code 02
Next article:Common ARM assembly instructions
- Popular Resources
- Popular amplifiers
- 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
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Things to note when using peelable adhesive
- Last day! TI Live Broadcast with Prizes | Application of Precision ADC in Transmitters
- Renesas CPK-RA6M4 development board evaluation + SHT20 sensor reading data
- Share 2018 Electronics Competition Paper - [B- Fire Extinguishing Aircraft] Fujian Province Ti Cup Special Prize / Xiamen University / Changmen University Team
- Constant voltage and constant current power supply design
- About the difference between CC1312R LAUNCHPAD versions
- About the signal input mode of the power amplifier
- My Journey of MCU Development (Part 1)
- How to understand the accuracy parameter (1.5% + 3) of the Fluke F17B+ multimeter?
- Another bottleneck.