What are some advanced applications of MCUs?

2025-05-30 10:32:35 354

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>

EN6347QI DC-DC Converters: Features, Applications and Datasheet
EN6347QI Description Intel EN6347QI is a compact, high-efficiency DC-DC converter designed for point-of-load (PoL) applications. It integrates a controller, power MOSFETs, compensation circuitry, and an inductor into a single 38-pin QFN package, delivering up to 4A continuous current with output voltages ranging from 0.6V to 6.24V . EN6347QI Features Integrated PowerSoC Design: Combines controller, MOSFETs, compensation, and inductor in a single package . High Efficiency: Achieves up to 95% efficiency, re....
What are some advanced applications of MCUs?
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 s....
STMicroelectronics ST4SIM-300 IoT eSIM card successfully certified by GSMA
STMicroelectronics ST4SIM-300 IoT eSIM card successfully certified by GSMA May 28, 2025, China - STMicroelectronics ST4SIM-300 embedded SIM (eSIM) has completed certification to the GSMA SGP.32 eSIM IoT standard. The certification ensures that the ST4SIM-300 is interoperable with global cellular mobile networks and IoT service platforms, and supports users in remotely configuring network connectivity and easily switching networks. The ST4SIM-300 is one of the first eSIM products to be certified to SGP.32. T....
5CGXFC9E6F35I7N FPGAs: Alternatives, Applications and Datasheet
5CGXFC9E6F35I7N Description The 5CGXFC9E6F35I7N is a high-performance FPGA from Intel’s Cyclone® V GX family, designed for mid-range applications requiring high logic density, transceiver capabilities, and low power consumption. Built on a 28nm process, it combines programmable logic, hard memory controllers, and high-speed serial transceivers, making it ideal for bandwidth-intensive and cost-sensitive systems. This device is packaged in an F35 896-ball FineLine BGA and supports industrial-grade t....