How to Learn Embedded Systems and Microcontrollers (STM32)

How to Learn Embedded Systems and Microcontrollers (STM32)

Overview of Embedded Systems

//From Hardware Perspective“Embedded” integrates peripheral devices based on the CPU into the CPU chip itself. For example, early computers based on the X86 architecture had CPUs that only performed computation and accumulation functions. All chips needed external bridges to expand functionality, such as serial ports that relied on external 16C550/2 serial controller chips. Nowadays, such serial controller chips are integrated into the CPU. PC machines have graphics cards, while most embedded processors have built-in LCD controllers, which are essentially equivalent to graphics cards. Advanced ARM-based Intel Xscale architecture IXP network processors integrate PCI controllers (which can support four PCI slave devices or configure themselves as a PCI slave device) and include three NPE network processing engines, two of which correspond to two MAC addresses for gateway switching, while the other NPE engine supports DSL. With an external PHY chip, DSL internet access can be achieved. The IXP series can reach a maximum frequency of 1.8G, supporting 2G memory, and has Ethernet ports of 1G×10 or 10G×1 or Fiber channel optical channels. The IXP series is the highest processor based on the ARM architecture integrated by Intel into the Xscale core.
How to Learn Embedded Systems and Microcontrollers (STM32)
// From Software Perspective:”Embedded” means selecting applications to be included in a customized operating system kernel, compiling them, and then downloading the kernel to ROM. The selected application components during the custom operating system kernel setup complete the software “embedding”. For example, when customizing the Windows kernel, there are options such as wordpad, PDF, MediaPlayer, etc. If selected, these can be found in the interface after CE starts. In contrast, most components in older PC Windows operating systems require reinstallation. Burning software kernels or application file systems into the ROM of the embedded system hardware platform achieves true “embedding”.
How to Learn Embedded Systems and Microcontrollers (STM32)

How to Learn Embedded Systems

Embedded systems are divided into four layers: hardware layer, driver layer, operating system layer, and application layer.

Hardware Layer

The hardware layer is the foundation of the entire embedded system. If you are already familiar with microcontrollers and interfaces, and can program in C and assembly language, it is relatively easy to start from the hardware layer of embedded systems. The hardware layer is also the foundation for the driver layer. An excellent driver engineer should be able to understand hardware circuit diagrams and complete CPLD logic design independently, while also being quite familiar with the operating system kernel and its scheduling. However, the hardware platform is fundamental, and added value relies on software. The hardware layer is more suitable for professionals in electronics, communications, automation, mechatronics, and information engineering. The foundational knowledge required includes microcontroller principles and interface technology, microcomputer principles and interface technology, and C language.

Driver Layer

The driver layer is relatively difficult. Driver engineers must not only understand circuit diagrams but also be very proficient in the operating system kernel, so that the driver programs they write do not monopolize the operating system’s time slices during system calls, preventing other tasks from functioning. Without knowledge of operating system kernel architecture and real-time scheduling, and without good driver writing styles, many people can implement drivers as described in most books, but to be a good driver engineer requires three to four years of experience. Without studying the operating system kernel, success is not easily achieved, but salaries in the embedded system’s four layers are the highest. The driver layer is particularly suitable for professionals in electronics, communications, automation, mechatronics, and information engineering, especially those with a focus on computer architecture. In addition to the foundational disciplines required for the hardware layer, one must also have a thorough understanding of data structures and algorithms, operating system principles, and compiler principles.

Operating System Layer

Currently, the operating system layer can only be said to be a simple porting, as few people write operating systems themselves or create incomplete operating systems. Most of this work is done by driver engineers. The operating system is responsible for debugging system tasks, managing disks and files, and the real-time nature of embedded systems is very important. It is said that the XP operating system took Microsoft 300 people two years to complete, with a total man-hours of 600 person-years. The software institute of the Chinese Academy of Sciences’ own Nuwa Hopen operating system is estimated to require hundreds of person-years to complete. Therefore, this part of the work is relatively insignificant.

Application Layer

The application layer is relatively easier. If you know how to perform programming interface function calls under Windows, moving to an operating system just involves changes in the compilation and development environment. The same applies to programming in Java. However, if algorithms are involved in embedded systems, they should be handled by professionals in algorithms, and do not need to be categorized under embedded systems. But if it involves embedded databases, network programming based on embedded systems, and application development based on certain protocols (such as SIP, H.323, Asterisk), it becomes more complex and challenging.

Introduction to STM32

The STM32F103 device uses the Cortex-M3 core, with a maximum CPU speed of 72 MHz. This product series has Flash memory ranging from 16KB to 1MB, various control peripherals, USB full-speed interface, and CAN. ST has successively launched chips with Cortex-M0+ and Cortex-M4 cores in the following years, continuously optimizing them.
How to Learn Embedded Systems and Microcontrollers (STM32)
Divided by core architecture into different products, the STM32F1 series includes:
Basic Type: STM32F101R6, STM32F101C8, STM32F101R8, STM32F101V8, STM32F101RB, STM32F101VB
Enhanced Type: STM32F103C8, STM32F103R8, STM32F103V8, STM32F103RB, STM32F103VB, STM32F103VE, STM32F103ZE
Connectivity Type: STM32F105, STM32F107

Learning STM32

To learn STM32 embedded systems, from the hardware perspective, one must learn interface circuit design and board-level programming in assembly and C language. From the software perspective, it involves learning driver development and porting for ARM processor-based operating systems. Understanding hardware registers is also necessary, along with mastering board-level assembly and C programming.
How to Learn Embedded Systems and Microcontrollers (STM32)
Key areas to learn include:
Basic Operations: GPIO operations, serial port operations, timer operations, NVIC and interrupts, watchdog, DMA operations, ADC operations, SPI interface communication, IIC interface communication, CAN bus communication, etc.
Advanced Operations: Low power operations, STM32 clock tree, STM32 bit-banding feature implementation, detailed analysis of STM32 startup process, implementation of circular buffers, design of software timers, simulation of IIC using IO ports.
Comprehensive Applications: Implementation of STM32-IAP, implementation of STM32-DAPLink.
Learning and Developing Programs with Operating Systems: Operating system analysis, rt-thread system porting and learning, FreeRTOS porting and learning.
How to Learn Embedded Systems and Microcontrollers (STM32)

End

Recommended Highlights

● What Level is Considered Proficient in Linux?

● Nostalgia: Homemade Snake Game, What More Do You Need?

● Huawei’s Harmony OS May Enter the European Market Next Year, Competing with iOS and Android

How to Learn Embedded Systems and Microcontrollers (STM32)
How to Learn Embedded Systems and Microcontrollers (STM32)
→ Follow Us for More Surprises ←

Leave a Comment