figure 1
Keywords:STM32
Reference address:Summary of doubts about STM32 serial communication
As shown in the figure above, in line 1420, USART1_BASE is the base address of USART1. The function of (USART_TypeDef*) USART1_BASE is to convert USART1_BASE into a pointer of type USART_TypeDef*. The overall function of this statement is to convert USART1_BASE into a pointer of type USART_TypeDef*, and then name this pointer USART1. (Personal understanding: USART1 is a pointer to the USART_Typedef structure type, which is equivalent to USART1 being the address (first address) of a space. In this space, the members of this structure are arranged in sequence according to the order of the USART1 register address of STM32. The address (order) of each structure member corresponds to the corresponding register address on the STM32 hardware, and then the registers can be used at will through USART1.
As shown in Figure 2 and Figure 3, it is easy to see that the order of members in USART_TypeDef corresponds to the order of register addresses on the STM32 hardware.
figure 2
)
image 3
As shown in line 156 of Figure 4, the USART_DR register can be accessed through the pointer USART1.
Figure 4
Previous article:Notes on stm32 free control of io ports
Next article:ARM Assembly
Recommended ReadingLatest update time:2024-11-17 00:40
Comparative Analysis of STM32 and ARM Startup Code
From ARM to STM development, the development tools also changed from ADS to Keil. With the help of STM firmware library, the development efficiency is more efficient. For example, you don't need to care about the specific implementation of the startup code, you only need to focus on the specific application code, and
[Microcontroller]
STM32 SPI debugging HAL library debugging
uint8_t aTxBuffer __attribute__((at(0x20000200))) = {0xaa, 0x00, 0x00}; When there is no __attribute__((at(0x20000200)) above, the program will enter Hardfault because the program cannot read data from an odd address. This reason is very difficult to find, and I am speechless. The API should not be used in the inter
[Microcontroller]
STM32 IO analog IIC I2C
#define I2C_Speed 100000 #define I2C_EE I2C1 #define uStatus 0x80 #define dTime 5 #define I2C_EE_GPIO GPIOB #define I2C_EE_SCL GPIO_Pin_5 #define I2C_EE_SDA GPIO_Pin_4 #define I2C_EE_CLK RCC_APB1Periph_I2C1 #define SCL_H GPIOB- BSRR = GPIO_Pin_5 #define SCL_L
[Microcontroller]
STM32---IWDG watchdog and Debug
Today's problem: After adding a watchdog, the program can reach the breakpoint during online debugging, but it will continue to run automatically and cannot be stopped. Reason: Watchdog Main features of the independent watchdog (IWDG) 1. Free-running down counter 2. The clock is provided by an independent RC oscilla
[Microcontroller]
STM32 Notes: Using SysTick to measure program running time
This experiment is used to measure the running time of the delay function (as shown below) void Delay(__IO u32 nCount) { for(; nCount != 0; nCount--); } //SysTick.c #include "SysTick.h" __IO u32 TimingDelay = 0; void SysTick_Init(void) { /* SystemFrequency / 1000 1ms interrupt once * SystemFrequency / 1
[Microcontroller]
Using DMA to generate and capture square waves in STM32 microcontrollers
1 Introduction to STM32 Microcontrollers
The STM32 series microcontrollers are highly integrated microcontrollers based on the Cortex-M3 core from ST. It sets a new benchmark in terms of performance, price, power consumption and real-time performance. It integrates the Cortex-M3 core, as well as a rich set of p
[Microcontroller]
STM32 TIM1 output pulse example
TIM module timer overflow & output comparison First of all, we must affirm the strength of ST company and admit that STM32 is indeed a very good Cortex-M3 core microcontroller. However, its manual is really incomprehensible, especially the TIM module, which is disorganized. After reading it for two days, I still don’t
[Microcontroller]
Voice guidance system based on STM32 control
Abstract: A sound guidance system based on STM32 control is designed. The system consists of a movable sound source S and three sound receivers A, B, and C. A slave STM32 microcontroller controls the wireless transmission module to send the sound guidance signal. The master microcontroller determines the start and s
[Microcontroller]
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- 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
Guess you like
- msp430f5529 interrupt notes
- Detailed explanation of multi-layer PCB stacking structure
- Looking for part-time engineers to cooperate
- Modern Communication Technology (4th Edition)
- Are there other ways to reduce heat and power consumption of MOS besides parallel connection? The current cannot be changed. Although the internal resistance can be...
- Can lemons generate electricity?
- Free review | Anxinke Bluetooth development board PB-02-Kit
- Qinheng third generation USB to dual serial port chip CH342
- FPGA_100 Days Journey_Matrix Keyboard Design
- Solution to the low success rate of Bluetooth connection of EFR32BG22 series