Microcontroller or FPGA
The Often Underestimated Design Decision
Does this system really need an FPGA, or is a microcontroller sufficient? This question comes up more often than one might think. Three real-world projects show why the answer today is often different than it was just a few years ago.
When a Problem Sounds Like an FPGA
High data rates, precise timing, extensive parallelism. In such scenarios, the decision initially seems obvious: this is a job for an FPGA.
We experienced exactly such a moment during a job interview. We presented a project, and the quick response was: That sounds like an FPGA.
Our answer was simple: No, we implemented it with a microcontroller.
This usually causes a brief pause, and that is exactly the point. Not everything that looks like an FPGA application actually requires one today.
What Has Changed in Recent Years?
The performance of microcontrollers is often measured by CPU power. In practice, however, this is not the decisive factor. The major difference today lies in the peripherals: high-resolution timers, flexible DMA mechanisms, trigger logic, and parallel interfaces are now integrated parts of many controllers. And it is precisely this integrated hardware that allows time-critical tasks to be executed on a microcontroller without significantly burdening its CPU. As a result, the boundaries are shifting. Requirements that previously clearly demanded an FPGA solution are now at least candidates for a microcontroller-based solution.
The Decision Is Never Purely Technical
The question of microcontroller versus FPGA is often discussed from a technical perspective. In real-world projects, that is only part of the story. It is also about the available team members, existing know-how, maintainability, and costs over the entire lifecycle.
FPGA development is a discipline of its own. The entry barrier is higher, and the required expertise is less widely available. If this expertise is missing on the customer side, it quickly becomes difficult to make modifications independently. Changes then become not only technically more demanding but also organizationally more complex, as they often require external support again. In addition, there are economic considerations. FPGA solutions frequently involve additional licensing costs for tools or IP cores, and depending on the application, component costs may also be higher than those of a microcontroller.
Another factor is handling changes in the field. While microcontroller systems can generally be updated relatively easily through software, FPGA solutions are often more complex to update, especially if no dedicated soft-core architecture is provided.
On the other hand, there are classic microcontroller projects based on C/C++. Many teams are already highly experienced in this area. Code can be adapted, reused, and maintained more easily over long periods of time. This is especially true when a structured software approach is used, such as the CSA C++ Framework: C++ Framework for Embedded Applications. Building on existing knowledge and providing greater flexibility regarding available resources also results in lower project risks and often a shorter time-to-market.
In the end, these factors are at least as important as pure performance figures.
Three Projects Where CSA Deliberately Chose an MCU Instead of an FPGA
Project 1:
Acoustic Measurement System
A piezo crystal had to be driven in the MHz range within a very narrow frequency window because it only operates optimally at its individual resonant frequency. Since this frequency varies from component to component, it must be finely adjustable for every device.
At the same time, the reflected signal has to be captured synchronously with the excitation signal within a precisely defined time window. The timing and resolution requirements are therefore clearly within a range traditionally associated with FPGAs.
However, the implementation revealed a different approach. By using a high-resolution timer with internally synchronized counters, very fine temporal resolution could be achieved. The interaction of multiple timers makes it possible to implement both signal generation and measurement accurately within the microcontroller.
Project 2:
Rotating LED System
The second project involved a rotating LED globe. Two LED rings, an inner and an outer ring, are controlled during rotation in such a way that a three-dimensional image appears to the viewer. The perception of depth results from the combination of both rings and the precisely synchronized control of the LEDs. The basic idea is simple, but the implementation is not.
While the system rotates, new “image columns” must be output at defined angular positions. Over the course of one rotation, many individual sampling points combine to form a stable image. Only a few hundred microseconds are available for each position. Within this short time window, data for all LEDs on both rings must be transmitted completely and with constant timing. At the same time, new image data is read from the SD card.
The LEDs are controlled serially, resulting in several thousand bits per image column. This leads to continuous data rates in the tens of megabits per second range. With the help of image data preprocessing, segmentation of the LED rings, and the use of timers and DMA, the output was successfully implemented. The complete project is described here:
rotating-led-globe-where-precision-and-innovation-merge
Here as well, the key lay in the consistent use of peripherals. Modern DMA mechanisms such as 2D DMA and Linked-List DMA make it possible to describe complex processes in hardware and execute them with precise timing, without requiring CPU intervention. Sequences of I/O operations can be prepared in advance and processed automatically.
The CPU therefore remains available for control logic, data processing, and Ethernet communication with the higher-level system, while time-critical tasks are executed deterministically by the peripherals.
All three projects could traditionally have been implemented using an FPGA as well. However, in these specific cases, the requirements matched the capabilities of the selected microcontrollers very well.
Where the Limits Still Exist
Despite these developments, there are still clear application areas for FPGAs. Whenever maximum parallelism is required or very high data rates must be processed, microcontrollers reach their limits. The same applies when the available peripherals are insufficient or when I/O requirements scale significantly. In such cases, an FPGA provides greater flexibility and can be tailored more specifically to the application.
In practice, hybrid approaches also exist, for example combinations of a microcontroller with external logic such as CPLDs or small FPGAs. However, these introduce additional interfaces, complexity, and maintenance effort and should therefore be evaluated critically.
Conclusion
The technology decision is a crucial milestone in every project and should not be underestimated. A later change is complex and associated with high costs.
It is therefore important to understand the capabilities of modern microcontrollers and to consistently take integrated peripherals such as DMAs and high-resolution timers into account. They enable significantly more use cases today than one might initially assume.
Ultimately, however, the question is not “microcontroller or FPGA”, but rather which tool is best suited for the specific task. And today, that answer may be different than it was just a few years ago.
By the way, the applicant from the beginning now works for us. He implemented one of the projects himself. With a microcontroller.
We Support You in Making the Right Architecture Decision
The right architecture rarely emerges from a first look at the requirements. It is often worth taking a step back and comparing different options. Especially at the intersection between MCU and FPGA, there are many gray areas. Experience shows that the decisive difference often lies in the details.
We help you make such decisions in a structured way. Technically, but also with regard to maintainability, team skills, and long-term costs. Contact CSA
The success of our customers is also our success.