Super Hard Engineer— Here is a simple and easy-to-understandlatest hardware technology and knowledge sharing, as well as experience in job hunting and career planning. Click the blue characters “Super Hard Engineer” below the title to follow us for free, we help you quickly improve your skills and experience! |
Embedded System (Embedded system), is a specialized computer system that is completely embedded within controlled devices, designed for specific applications, usually for controlling, monitoring or assisting devices, machines, or equipment used in factory operations. Unlike personal computers which are general-purpose computer systems, embedded systems typically perform predefined tasks with specific requirements. Because embedded systems are targeted at a specific task, designers can optimize them to reduce size and lower costs.
The commonly accepted definition of an embedded system is: an application-centered, computer technology-based, hardware and software customizable, dedicated computer system that meets strict requirements for functionality, reliability, cost, size, and power consumption. Typically, an embedded system is a control program stored in ROM on an embedded processor control board. In fact, all devices with digital interfaces, such as watches, microwaves, VCRs, cars, etc., use embedded systems, some embedded systems even contain operating systems, but most embedded systems implement the entire control logic with a single program.
The core of an embedded system consists of one or several microprocessors or microcontrollers pre-programmed to perform a few tasks. Unlike general-purpose computers that can run user-selected software, the software on embedded systems is usually static, hence often referred to as firmware. From the above definition, we can see several important characteristics of embedded systems:
1. The system kernel is small. Since embedded systems are generally used in small electronic devices, system resources are relatively limited, so the kernel is much smaller than that of traditional operating systems. This is incomparable to the Windows kernel used in personal computer systems.
2. Strong specificity. The personalization of embedded systems is very strong, and the combination of the software system and hardware is very tight, generally requiring system porting to target hardware; even within the same brand and series of products, modifications must be made according to changes and additions in system hardware. At the same time, for different tasks, significant changes to the system are often needed, and the compilation and downloading of programs must be integrated with the system; this modification is a completely different concept from the “upgrade” of general software.
3. System simplification. Most embedded systems generally do not have a clear distinction between system software and application software, and do not require overly complex functionality in design and implementation, which helps control system costs and enhances system safety.
4. High real-time system software (OS) is a basic requirement for embedded software. Moreover, the software requires solid-state storage to improve speed; software code requires high quality and high reliability.
5. Embedded system development requires development tools and environments. Because they do not possess self-booting development capabilities, even after the design is completed, users usually cannot modify the program functions within them; a complete set of development tools and environments is required for development, which is generally based on general-purpose computer hardware and software as well as various logic analyzers, signal oscilloscopes, etc. During development, there is often a concept of host and target machine, where the host is used for program development, and the target machine serves as the final execution machine, requiring alternating combinations during development.
6. Embedded systems are organically combined with specific applications, and upgrades are also synchronized. Therefore, once embedded system products enter the market, they have a long lifecycle.
7. To improve operational speed and system reliability, the software in embedded systems is generally solidified in memory chips.
In general, the architecture of embedded systems can be divided into four parts: processor, memory, input/output (I/O) and software. With the development of the times and technological innovations, the processors, memories, and input/output used in embedded systems have undergone significant changes. From the emergence of microcontrollers in the 1970s to the large-scale application of various embedded microprocessors and microcontrollers, embedded systems have undergone nearly 30 years of development history. Today, we will summarize the development history of embedded system hardware architecture.
Microcontroller System
The emergence of embedded systems was initially based on microcontrollers. The emergence of microcontrollers in the 1970s allowed cars, home appliances, industrial machines, communication devices, and thousands of products to achieve better performance through embedded electronic devices: easier to use, faster, and cheaper. These devices initially possessed the application characteristics of embedded systems, but at that time, the application only used 8-bit chips to execute some single-threaded programs, and the concept of “system” was not yet discussed.
The earliest microcontroller was Intel’s 8048, which appeared in 1976. Motorola simultaneously launched the 68HC05, and Zilog introduced the Z80 series; these early microcontrollers all contained 256 bytes of RAM, 4K of ROM, 4 8-bit parallel ports, 1 full-duplex serial port, two 16 bit timers. Later, in the early 1980s, Intel further improved the 8048, successfully developing the 8051, which is a significant milestone in the history of microcontrollers; to this day, the 51 series microcontroller remains the most successful microcontroller chip, widely used in various products. The following figure shows the basic architecture of an 8051 microcontroller chip, which mainly includes the 8051 controller core, RAM/ROM storage, as well as input/output serial interfaces and programmable I/O, along with other timers, counters, interrupt control internal logic, etc.
The following figure shows a typical system design based on the 8051 microcontroller.
32-bit Embedded Systems
From the early 1980s, embedded system programmers began to use commercial-grade “ operating systems” to write embedded application software, which led to shorter development cycles, lower development costs, and higher development efficiency, making “embedded systems” truly emerge. To be precise, the operating systems at that time were real-time kernels, which included many features of traditional operating systems, including task management, inter-task communication, synchronization and mutual exclusion, interrupt support, memory management, etc. Notable examples include ReadySystem’s VRTX, Integrated System Incorporation (ISI)’s PSOS and IMG’s VxWorks, QNX’s QNX etc. These embedded operating systems all have typical characteristics of embedded systems: they all adopt preemptive scheduling, have very short response times, and predictable task execution times; the system kernel is small, has cuttable, extensible, and portable features, and can be ported to various processors; strong real-time performance and reliability, suitable for embedded applications. The emergence of these embedded real-time multitasking operating systems has freed application developers from small-scale development and also promoted a broader application space for embedded systems.
After the 1990s, with the increasing demand for real-time performance, the scale of software continued to rise, and real-time kernels gradually evolved into real-time multitasking operating systems (RTOS), which gradually became the mainstream of international embedded systems as a software platform. At this time, more companies saw the broad development prospects of embedded systems and began to vigorously develop their own embedded operating systems.
From the perspective of hardware architecture, and in line with multitasking embedded operating systems, 32-bit embedded processors gradually became mainstream. It is particularly worth mentioning that the ARM company’s RISC processor core and instruction set have gradually occupied the main market space of embedded design due to their excellent performance, functionality, and unique business model. ARM is a microprocessor technology intellectual property supplier; it neither produces nor sells chips, but designs RISC microprocessors, and the intellectual property of these microprocessors is the company’s product. ARM has many users of its intellectual property; among the 20 largest semiconductor manufacturers in the world, 19 are ARM users, and more than 70 companies worldwide produce ARM processor products.
After years of development, ARM processors have formed multiple series to meet the needs of various industries and different performance requirements. The following figure summarizes the ARM processor series, including the Cortex-A series for the smartphone industry and the earlier ARM11/ARM9/ARM7 series; as well as the Cortex-M/R series, which focuses on embedded applications and system design.
The ARM Cortex-M processor series is a series of high-energy-efficient, easy-to-use processors designed to help developers meet the needs of future embedded applications. These needs include providing more functionality at a lower cost, increasing connectivity, improving code reuse, and enhancing energy efficiency. The Cortex-M series is optimized for cost and power-sensitive MCU and terminal applications (such as smart measurement, human-machine interface devices, automotive and industrial control systems, large household appliances, consumer products, and medical devices) mixed-signal devices. ARM Cortex-R real-time processors provide high-performance computing solutions for embedded systems that require reliability, high availability, fault tolerance, maintainability, and real-time response. The performance provided by the Cortex-R series processors is much higher than that of the Cortex-M series.
As mentioned earlier, many well-known semiconductor companies use the ARM architecture to design their embedded processors or microcontroller chips, including ST, Freescale, Samsung, etc. The following figure shows the architecture of the STM32 microcontroller based on Cortex-M4, which integrates internal SRAM and flash, external expansion SDARM controller, as well as display interfaces LCD controller, etc.
The following figure shows a practical application case of an embedded system designed based on the STM32 microcontroller.
The following figure is an embedded system architecture diagram based on a Samsung ARM microcontroller.
DSP System
DSP systems are also a type of embedded system, the most important of which is the DSP chip, also known as a digital signal processor. This is a microprocessor particularly suitable for performing digital signal processing operations, mainly used to quickly implement various digital signal processing algorithms in real time. Based on the requirements of digital signal processing, DSP chips generally have the following main characteristics:
(1) Can complete one multiplication and one addition in one instruction cycle;
(2) Program and data spaces are separate, allowing simultaneous access to instructions and data;
(3) Fast RAM is built-in, usually accessible simultaneously through independent data buses;
(4) Low overhead or no overhead loop and jump hardware support;
(5) Fast interrupt handling and hardware I/O support;
(6) Multiple hardware address generators that can operate in a single cycle;
(7) Can execute multiple operations in parallel;
(8) Supports pipelined operations, allowing fetching, decoding, and execution to overlap.
Broadly speaking, digital signal processing is a technical discipline that studies the analysis, transformation, filtering, detection, modulation, demodulation, and fast algorithms of signals using digital methods. With the development of digital circuits and systems technology as well as computer technology, digital signal processing technology has also developed accordingly, with a wide range of applications. Applications in digital control and motion control mainly include disk drive control, engine control, laser printer control, plotter control, motor control, power system control, robot control, high-precision servo system control, CNC machine tools, etc. Applications aimed at low power, handheld devices, and wireless terminals mainly include: mobile phones, PDA, GPS, data transmission radios, etc. The following figure is a typical block diagram of an embedded system based on DSP aimed at signal processing.
Many chip companies also design embedded processors focused on special industry applications, specializing in signal analysis and processing, such as TI Semiconductor Company. The following figure shows a practical application case of a DSP system based on TI’s TMS320F2812 processor.
To be continued. To stay updated on more knowledge and experience in embedded hardware system design, please scan or long press the QR code below to follow the WeChat public account: Super Hard Engineer.