Abstract: ** This chapter takes STM32F103 as a case to explain the relationship between ARM company and ST Company and how we need to find the correct manual when developing STM32.

The relationship between ARM and ST

Here we start with the production of a chip. For example, if we want to generate a chip, we can involve the kernel by ourselves and call it XXX architecture chip after the kernel is involved. However, under normal circumstances, we will not do this, because the design of the kernel is very complicated.

At present, the mainstream kernels on the market include ARM kernel corresponding to “compact instruction set” and x86 kernel corresponding to “complex instruction set”.

Why does the schema determine the instruction set? Because the essence of design architecture is to build logic circuits that decide to perform operations when given certain binary data (instructions).

Here to ARM instruction set example, mov r0, r1 to read data from the r1 registers r0 register, STM32 chip see is a string of length is 4 bytes of the binary data, the kernel of the “gate” will this string of binary data parsing and carry on a series of operations (read data from the r1 registers r0 register). So the architecture of the kernel determines the instruction set, and the more complex the kernel supports the more instruction sets, and the more things a single instruction can do.

Is the instruction set as complex as possible? This is not the case. Complex instruction sets bring some problems: too much power consumption, too much heat, 80% instructions are not used often, etc., so we have to make trade-offs according to the purpose of the chip.

Here is a case of Kunpeng server: The CPU of Kunpeng server is based on ARM architecture, and the reasons are as follows:

1. ARM instruction set is sufficient for Kun Peng’s field. Even if you need to handle an operation not supported by ARM instruction, you only need to point multiple instructions together to complete the operation.

2. As the CPU of x86 architecture has more and more gate circuits in the core, due to process problems and heat dissipation problems, it gradually fails to reach “Moore’s Law”. Therefore, the CPU of ARM architecture and the idea of “multiple” core with parallel computing can be based on “Moore’s Law”.

3. Academic studies have found that 80% of instructions in complex instruction sets are not frequently used, so there is no waste in using simplified instruction sets.

4. Huawei has a permanent license for ARMv8.

The ARM architecture

Arm architecture is designed and authorized by Arm Company, and its corresponding instruction set is “Abbreviated Instruction Set (RISC)”. Most of the main controls used in our mobile phones, smart TVS and other products are based on Arm architecture kernel.

X86 architecture

The X86 architecture is designed by Intel, and its representative products are I5, I7 and other CPUS used in our computers. The corresponding instruction set is complex instruction set, which means that the instruction in a complex instruction set can complete operations that can only be completed by multiple simplified instruction sets, but it also faces many problems.

ARM

ARM is a company that makes profits by selling ARM kernel licenses. It never generates chips by itself. Instead, it provides the design drawings of the kernel and other materials to the companies that have purchased the kernel licenses for secondary development and production of chips by itself. Below is the part designed by ARM:

The kernel includes R0-R15 registers, PC registers and so on. Therefore, we need to refer to the reference manual provided by ARM company to query the information of kerl-related peripherals given in the figure above, such as the ARM Cortex-M3 Reference Manual.

ST company

ST company purchased the license of ARM kernel from ARM Company. Here is an example: The Cortex-M3 kernel of STM32F103 is a license. ST Company will carry out secondary development of the design of the purchased ARM kernel.

The following figure shows the part of secondary development designed by ST Company:

The red box is designed for the ARM kernel, and the rest is secondary developed and designed by ST Company. It is finally packaged into a small black box and leads to pins for us to use. Common kernels are equipped with timers, GPIO controllers, serial ports and so on. If we need to know about such devices, we need to refer to the reference manual provided by ST Company, such as STM32F103 Reference Manual.

How to access the manual

① Determine whether the “peripheral” you want to query is in the kernel or outside the kernel, for example, interrupt controller (NVIC) is in the kernel, “timer” is outside the kernel.

② Peripherals in the kernel by referring to the reference manual provided by ARM company

③ Peripherals outside the kernel by referring to the reference manual provided by ST Company

ARM Company

Infocenter.arm.com/help/index….

ST Company Information Download:

www.st.com/content/st_…

If you need to download information, you only need to register a corresponding website account can be downloaded for free, do not go to buy information.

Click to follow, the first time to learn about Huawei cloud fresh technology ~