What is STM32 and how to learn it?

Publisher:东土大唐88Latest update time:2015-04-02 Source: eechinaKeywords:STM32  Cortex-M3 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The core Cortex-M3 processor of STM32 is a standardized microcontroller structure. I hope you will think about what standardization means. In short, the Cortex-M3 processor has a 32-bit CPU, a parallel bus structure, a nested interrupt vector control unit, a debugging system, and a standard memory map.

The Nested Vector Interrupt Controller (NVIC) is a key component in the Cortex-M3 processor. It provides a standard interrupt architecture and excellent interrupt response capabilities for microcontrollers based on Cortex-M3, provides dedicated interrupt entries for more than 240 interrupt sources, and can give each interrupt source a separate priority. Using NVIC, you can achieve extremely fast interrupt response speed. It only takes 12 cycles from receiving an interrupt request to executing the first instruction of the interrupt service. This extremely fast response speed is due to the automatic stack processing mechanism of the Cortex-M3 core, which is implemented by the microcode solidified in the CPU. On the other hand, when interrupt requests appear continuously, NVIC uses a technology called "tail chaining" to enable continuous interrupts to be serviced within 6 clock cycles. During the stacking phase of the interrupt, a higher priority interrupt can complete the action of embedding a low priority interrupt without consuming any additional CPU cycles. I will summarize the details later. Users can set the CPU to automatically enter a low power state and use interrupts to wake it up. The CPU will remain in sleep mode until the interrupt time comes. I will summarize this later.

The Cortex-M3 CPU supports two operating modes: Thread Mode and Handler Mode. It should be noted that both modes have their own independent stacks. This design allows developers to perform more sophisticated programming and better support for real-time operating systems. The

Cortex-M3 processor also includes a 24-bit automatically reloadable timer that can provide a periodic interrupt for the kernel (RTOS).

In terms of instruction sets, ARM7 and ARM9 have two instruction sets (32-bit instruction sets and 16-bit instruction sets), while the Cortex-M3 series processors support the Thumb-2 instruction set. Because the Thumb-2 instruction set combines the Thumb instruction set and the ARM instruction set, it achieves a balance between the performance of the 32-bit instruction set and the code density of the 16-bit instruction set.

Moreover, ARM Thumb-2 is specially designed for C/C++ compiler, which means that the development and application of Cortex-M3 series processors can be completed in the C language environment.

The launch of STM32 microcontrollers marks a major step forward for ST in two main product lines (low-cost main line and high-performance main line). When STM32 was first released, there were 14 different models, divided into two versions: "enhanced" with a maximum CPU clock of 72MHZ and "basic" with a maximum CPU clock of 36MHZ. The built-in Flash of these different STM32 models can reach up to
128KB and the maximum SRAM is 20KB. At the beginning of the release of STM32, versions with larger Flash, RAM and more complex peripherals were already planned. Regardless of the version and model of STM32 devices, they are compatible in pin functions and application software. This allows developers to change device models as needed without changing the PCB when using the STM32 series microcontrollers.

At first glance, the equipment configuration of STM32 is somewhat similar to the familiar 51 single-chip microcomputer in the past. Generally, STM32 is equipped with common peripherals, such as multi-channel ADC, general timer, I2C bus interface, SPI bus interface, CAN bus interface, USB controller, real-time clock RTC, etc. However, each of its external devices has its own unique features. For example, the 12-bit precision ADC has multiple conversion modes and an internal temperature sensor. The STM32 device with dual ADC can also make two ADCs work at the same time, thus deriving more advanced 9 conversion modes; each timer of STM32 has 4 capture comparison units, and each timer can work in conjunction with other timers to generate more precise timing; STM32 has an advanced timer specially designed for motor control, with 6 PWM output channels with programmable dead time, and its emergency brake channel can force the PWM signal output to remain in a predetermined safe state when abnormal conditions occur; the SPI interface contains a hardware CRC unit that supports CRC calculation of 8-bit byte and 16-bit half-word data. It is very useful when accessing data from storage media such as SD or MMC.

Keywords:STM32  Cortex-M3 Reference address:What is STM32 and how to learn it?

Previous article:About CORTEX-M0+ Architecture Essay
Next article:Cortex-A8 development board, S5PV210 or AM335X?

Recommended ReadingLatest update time:2024-11-16 20:49

IAR + STM32 implements printf() to output to the serial port
  Searching the Internet, there are a lot of articles and information about solutions to this kind of problem, but I still encountered a lot of problems according to their ideas.   First, post the code. Most of the codes are similar solutions, rewriting the putchar or fputc function. #ifdef  USE_IAR   #define PUT
[Microcontroller]
STM32 custom frequency and duty cycle PWM output method
Figure 1 Figure II PWM is widely used, but different projects have special requirements for the output PWM. To meet these requirements, we need more experiments to verify. Next, we will describe the output method steps of the waveform shown in Figure 1 (Figure 2 is an abnormal waveform). 1. Resources used in this
[Microcontroller]
STM32's 8 IO port modes
1. Push-pull output: can output high and low levels and connect digital devices; push-pull structure generally means that two transistors are controlled by two complementary signals, and one transistor is always turned on while the other is turned off. The high and low levels are determined by the power supply of the
[Microcontroller]
STM32 delay to eliminate jitter personal understanding
Today I found this sentence in an interrupt service subroutine. delay_ms(10); //De-jittering   So I am very curious about what jitter is, why we need to eliminate jitter, and how to eliminate jitter. 1. Let’s first talk about what jitter is: Usually the switches used for buttons are mechanical elastic switches.
[Microcontroller]
STM32 delay to eliminate jitter personal understanding
STM32 DAC principle
1.DAC module 1. Digital-to-analog conversion function 2. Can be configured as 8-bit and 12-bit mode (8-bit right-aligned, 12-bit left-aligned, 12-bit right-aligned) 3. The DAC module has two separate controllers, each channel has a separate converter, which can be converted independently or simultaneously 4. Can
[Microcontroller]
STM32 DAC principle
The real culprit of STM32 hardware error HardFault_Handler
There are two main reasons why the HardFault_Handler fault occurs in STM32: 1. Memory overflow or out-of-bounds access. 2. Stack overflow. The problem I encountered recently is stack overflow. The situation is as follows. Let me give you an example: static char data ; void fun1(unsigned char *buf) { int i=0; for(i=0
[Microcontroller]
stm32 variable type
During the stm32 programming process, variable types are often defined, and there is often a worry that the data will exceed the variable type range during the data operation. Because different CPUs have different meanings of data types during the programming process, you must pay attention to the definition and conve
[Microcontroller]
Analysis of GPIO_Init() function in STM32
When learning STM32, you must first be familiar with the running light routine. Here we will analyze the GPIO_Init() function in the running light. For example: the port used in the running light example is macLED1_GPIO_PORT=GPIOB,      The controlled pin is GPIO_Pin_0,      The pin mode is GPIO_Mode_Out_PP (general p
[Microcontroller]
Analysis of GPIO_Init() function in STM32
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号