What are some advanced applications of MCUs?

2025-05-30 10:32:35 413

It is often said that MCUs themselves are not particularly advanced. During MCU development, certain standardized procedures must be followed, such as defining variables and functions, determining their lifecycle, scope of use, and access conditions; commonly used communication protocols should be abstracted, with fixed input/output specifications to facilitate product portability.
However, in practice, there are often multiple implementation options for the same requirement, but there is always an optimal solution. Therefore, during this process, there are inevitably some “out-of-the-box” approaches that provide valuable insights. Today, I will share a few examples for reference.

 

Those truly impressive uses
When receiving a string of variable-length data via a serial port, you can use a serial port idle interrupt; this avoids entering an interrupt for processing every time a character is received, thereby reducing the number of interrupt entries and improving efficiency.
When measuring the frequency of a waveform, many people opt for external interrupts. However, by using the external clock input of a timer to count waveform edges and then periodically reading the count value to calculate the frequency, the frequency of interrupt triggers can be significantly reduced, thereby improving program execution efficiency.
In complex multi-tasking scenarios, a real-time operating system (RTOS) can be utilized to manage task scheduling, enhancing system responsiveness and resource utilization.
For scenarios requiring low-power operation, Dynamic Voltage and Frequency Scaling (DVFS) technology can be adopted to dynamically adjust the MCU's operating voltage and frequency based on system load, thereby reducing power consumption.
When storing data, wear-leveling algorithms for flash memory can be used to extend the lifespan of the flash memory.
Hardware encryption modules (such as AES encryption engines) can be utilized to ensure data security and confidentiality, rather than implementing encryption via software, thereby improving encryption efficiency and security.
For sensor data processing, digital filtering algorithms (such as Kalman filtering) can be used to improve data accuracy and stability.
When communicating with multiple devices, bus arbitration mechanisms and priority settings can be used to ensure efficient and stable communication.
During power management, monitoring power voltage and current enables intelligent power management strategies, such as entering low-power mode when battery levels are low.
For control tasks with extremely high real-time requirements, hardware-triggered interrupts are used instead of software polling to reduce response latency.
Dynamic control of any nonlinear system running on a microcontroller is an advanced application.
Using a microcontroller to implement a specific motion control system to generate significant revenue is an advanced application.


GPIO emulates everything
Recently, I undertook a challenging project. Using an STM32F1 to simulate a camera interface via GPIO to drive an OV2640 camera module. This was a very challenging process, and I could only optimize it to 1.5 FPSQ, so selecting the right components is crucial to avoid unnecessary challenges. The system uses an STM32F103C8T6 and an OV2640, with the following implementation results:

OV2640 actual timing diagram:

Figure 1

The challenges of this project include:
1. SCCB simulation: SCCB is a modified version of the I²C bus. The main issue is that the OV2640 module lacks pull-up resistors, making communication impossible. It took a significant amount of time to identify this problem;
2. Parallel interface simulation: If using IO simulation, only 1 FPS can be achieved. However, by utilizing Timer and DMA, 1.5–2 FPS can be attained.
Regarding image sensor data reception and processing Problem background: Existing OV2640 image sensor with DCMI (parallel interface) Problem: The existing STM32H7 aims to obtain the OV2640's MJPG stream data and transmit it to PC software.
1. Should USART or USB be used?
2. Which interrupt should be selected for data reception: Line interrupt or Frame interrupt?
3. DCMI transfers data to a buffer in RAM via DMA. How should the buffer be designed? Should a large contiguous buffer be set up, or is a ring buffer needed to prevent data overwriting and data corruption?
4. Should DCMI and DMA be disabled after triggering an interrupt?
Embedded software architecture is quite important, especially for large-scale projects. This is the software architecture for STM32. I wonder if anyone else has other architectures.

Figure 2

Different Perspectives on MCUs
Despite this, many people still believe that MCUs are not advanced, and using microcontrollers is not advanced either. Advanced content is something you can publish in a paper, but using microcontrollers cannot be published in a paper. However, using microcontrollers to solve specific tasks is indeed advanced.
Especially the examples mentioned above, which are indeed some advanced applications of MCU peripherals. However, these mechanisms may simply be standard usage. After all, many hardware mechanisms were added only after there was a practical need for them. For example, when receiving variable-length data, without a timeout interrupt, it could only be implemented in software, which greatly wasted CPU efficiency. Therefore, a timeout interrupt was designed to reduce software workload, thereby forming a standard usage method.
Of course, this is also a benefit of advancements in chip design and manufacturing processes. In the early days, when chip design and manufacturing processes couldn't handle complex peripheral circuits, no one would have dared to think about implementing such complex functions in hardware. The development of any product is driven by specific business needs, and MCUs are no exception.
For a product, MCU peripheral drivers are just the basic elements for development. Most of the work involves developing applications centered around business logic. At this stage, data structures and algorithms, various control algorithms and numerical calculation methods, design patterns, software engineering, and design philosophies become advanced concepts.
For example, the design of driver subsystems in the Linux kernel, such as device objects and driver objects, which adopt the object-oriented programming approach of C++, can also be applied to MCU development. By separating devices from drivers, the same driver algorithm can be used to implement different driver methods for similar devices. For example, the same UART driver can be configured to drive UARTO or UART1, and the baud rate can also vary (simply create different instance objects for the UART class using C language). This demonstrates the benefits of separating methods and attributes in C++.
Similarly, in the business application layer, design patterns such as the singleton pattern and factory pattern, along with the use of state machine models, can greatly simplify development, clarify system structure, effectively reduce the number of bugs, and make the system easier to maintain and extend.
Of course, some argue that when it comes to advanced technology, FPGA is the way to go. For instance, with AMD (Xilinx) ZYNQ, when you need to receive a string of variable-length data via a serial port, you can directly use the Programmable Logic section to write a dedicated program, store the final result in DRAM, and send a signal to notify the ARM processor to read it; when you need to measure the frequency of a waveform, you can directly use the Programmable Logic section to write a dedicated program for real-time, uninterrupted measurement. This is truly advanced.

Figure. 3

So, what are your thoughts on this? Do you have any “advanced” use cases you'd like to share?

Tags:

Share

Related News more>

Comprehensive Guide to Harmonic Drives: Working Principle, Features, Installation, and Selection Tips
Definition of Harmonic DriveA harmonic drive is a high-precision, high-efficiency speed reduction device widely used in mechanical equipment, industrial automation, robotics, and other fields. Its core operating principle is based on harmonic transmission, which utilizes the elastic deformation and interlocking between a flexible wheel and an inner gear ring to achieve power transmission and speed reduction. The harmonic reducer primarily consists of three fundamental components: the drive shaft, the harmon....
Renesas Electronics Adds Capacitive Touch Functionality to Ultra-Low Power RA0 Series MCUs
BEIJING, China, September 17, 2025 - Renesas Electronics Corporation, a global supplier of semiconductor solutions, today announced the RA0L1 microcontroller (MCU) product family based on the Arm® Cortex®-M23 processor. This ultra-low-power series delivers industry-leading capacitive touch solutions for battery-powered devices, consumer electronics, home appliances, white goods, and industrial system controls, enabling rapid and cost-effective deployment. Figure. 1 Renesas' RA0 MCU series, launched....
MT29F2G08ABAEAH4-IT:E Memory: Features, Applications and Datasheet
MT29F2G08ABAEAH4-IT:E Description The MT29F2G08ABAEAH4-IT:E is a 2Gb (256MB) SLC NAND Flash memory device from Micron, designed for non-volatile data storage in embedded and industrial applications. It uses a x8 I/O interface, operates from a 3.3V power supply, and delivers high endurance and fast page program/erase performance. Its industrial temperature rating (–40°C to +85°C) ensures reliable operation in harsh environments such as automotive systems, networking equipment, and industrial co....
Digital Power Modules: The Ideal Choice for FPGA Power Supply Design
In modern electronic systems, field-programmable gate arrays (FPGAs) are widely adopted across diverse product domains due to their numerous advantages, including short development cycles, cost-effectiveness, and flexible field reconfiguration and upgrades. From communication equipment to industrial control, automotive electronics to aerospace, FPGAs are ubiquitous. To fully leverage the high performance of FPGAs, their power supply design is critical, and digital power modules are increasingly becoming the....