An Engineer’s guide to Microcontroller platform migration

by Mark Patrick, Mouser Electronics

The Covid epidemic is responsible for long-lasting disruption across the electronics supply chain. Whether the lead-up to shortages was coming before Covid or not, the reality is we are now experiencing long lead times and significant delays, impacting everything from passive components to wireless modules. Even the most prepared engineering and supply chain teams couldn’t be fully equipped to deal with the depth and breadth of shortages the industry now faces.

While some components are easier to find substitutions for than others, parts such as semiconductors and integrated circuits tend to be more complex and deeply rooted in a design. This article maps out some key considerations engineers should make before starting a product redesign project.

Unprecedented Component Shortages

When Covid hit two years ago, lockdowns became a regular occurrence worldwide. The global economy rapidly moved into uncharted territory, with companies facing an uncertain future. Manufacturing organizations revised production volumes downwards and cancelled forward component orders. Nobody could predict the rollercoaster ride that was about to happen. Rather than becoming hermits, consumers started spending online, with many online retailers facing a logarithmic increase in order volumes. Out of nowhere, demand for essential consumer tech rocketed as office staff moved to home working and educational establishments migrated to online teaching. With a significant drop in vehicle pollution and people spending more time in their local environment, many consumers looked to more eco-friendly and sustainable ways of transport for the future. As lockdowns eased, the automotive industry saw a quick rise in demand for electric vehicles, further stressing the automotive electronics supply chain.

In 2021, the electronics industry faced severe component shortages, from passive components to integrated circuits and displays. According to the research organization Gartner, by Q4 2021, the outlook was improving. Component manufacturing staff were returning to work, and production volumes were increasing. While demand is still out-pacing production, Gartner predicts that the situation will continue to improve (see Figure 1).

Figure 1: (Semiconductor inventory forecasts (source Gartner 2022)


End-product manufacturers still have considerable risk and fragility in their component supply chains, making many teams re-evaluate current product designs.


Identifying Risk, and Importance of a Collaborative Approach

Supply chain disruptions are not unique to the Covid era. Natural disasters, from floods to earthquakes, impacting key manufacturing regions occur occasionally, so electronics supply chain professionals are well versed in coping. Most product designs feature a high proportion of passive components followed by a few ICs and modules such as microcontrollers, power management devices (PMICs), sensors, and wireless transceivers. The passive components are a commodity purchase unless they have unique values or characteristics. Ideally, second-source alternatives have already been identified as part of a design for manufacturing (DFM) strategy. Even so, particular types of capacitors—for example, multi-layer ceramic capacitors (MLCC)—are regularly ‘on allocation.’

Undoubtedly, the collaboration between the engineering and supply chain teams has been essential as the electronics industry has dealt with component shortages. Constantly reviewing second-source or third-source candidates requires careful analysis of component values, physical dimensions, form factors, and formal certifications.

A DFM strategy should also identify components that are not as easy to second-source. Specialist ICs such as microcontrollers are far more complex to find alternatives for. These devices and many other ICs are deeply rooted in a design, so finding an alternative microcontroller probably requires a far more fundamental change of the product’s design. To do this requires the engineering team to audit the product’s architecture and analyse if the desired action involves keeping with the same microcontroller vendor and opting for a more readily available part or changing vendor. The ramifications of these decisions are far-reaching and require an informed approach. Another aspect of this process is keeping in touch with your component suppliers and their authorised distributors. It may be that the supplier is already working hard to increase production within your timescales, and that inventory will become available. Although it may be that parts will initially be supplied by allocation, the shortages will likely be short-term.


Auditing a Design

In this section of the article, we’ll focus on the microcontroller. It is, perhaps, the component that has the most consideration when reviewing the likelihood of change. It also represents other ICs and modules, such as wireless and specialist analogue ICs. During this auditing process, the supply chain team must also analyse the availability of replacements the engineering team may consider.

Factors to review when migrating the microcontroller platform include:

Code portability: Could the code easily migrate to another device? Is it written in a portable high-level language, such as C, or a lower-level or more hardware-dependent language? Does the code utilise vendor-specific hardware abstraction routines to communicate with peripheral ports? The nature of any embedded development involves a lot of interaction with the real world through MCU ports and channels, so there will always be these challenges. Well-structured code with global port assignments and declarations significantly eases the need for major code alterations.

Libraries, device drivers and other firmware: Vendor-supplied device drivers and libraries assist in speeding the development of any MCU application. Using a library function, for example, to control a MEMS accelerometer, allows the developer to focus on the desired application rather than the intricacies of the sensor’s internal workings. However, it may not be available for all languages, or it may utilise functions on the host MCU to operate.

Cross-platform RTOS/Operating Systems: More complex embedded systems may use a real-time operating system (RTOS) to schedule tasks and prioritise time-dependent activities. Does your current design use an RTOS? What other microcontroller platforms does it support, and what are the required hardware specifications it imposes on the MCU?

Microcontroller platform decisions: These broadly fall into three categories.

MCU architecture: What is the architecture of the current device you are using? 8-bit, 32-bit? The instruction set architecture is vital information, too—Arm, 8051, AVR, RISC-V? Perhaps your current vendor offers a similar device with the same internal architecture and is widely available. There will be board layout issues moving to a different package form factor that would incur significant rework and non-recoverable engineering costs. A utopian scenario is finding a pin and software-compatible alternative to the current MCU; however, the chances of that are slim.

MCU functionality: Modern microcontrollers feature a host of peripheral and essential functions. Examples include analogue-to-digital converters, timers, counters, and pulse-width modulators. Then, there are secure elements, cryptographic accelerators, and floating-point units. Connectivity options are varied, from simple GPIO to more complex protocol-based communications like USB, CAN, and Ethernet. What functionality does your current design utilize? Also, the pin arrangement of a potential device will impact the board layout immensely, requiring an expensive complete board redesign.

Changing the microcontroller also introduces the need to review the power consumption profile of a new IC. Complications may arise with an alternative microcontroller’s sleep modes and methods, so this also needs careful review. Battery life is an essential aspect of many portable and hand-held devices, so this aspect requires a detailed analysis.

Toolchain support: Embedded developers depend on an integrated development environment (IDE) to program and debug microcontrollers. Which one does your company use? The popular commercial IDEs involve software licenses that might require changes for a different MCU series. Also, many engineering teams develop and support a wide range of end products, utilizing a platform approach across their portfolio. A change of MCU and IDE has far-reaching implementations for ongoing product development and post-design support activities.


More Microcontroller Migration Considerations

Aside from the microcontroller decision, engineers must review several associated factors before embarking on a migration project. The topics discussed below are some of the major ones, but the engineering team should check all aspects of a product’s design that apply.

PCB rework and redesign: Although this has already been highlighted, its impact should not be overlooked. Board redesign necessitated by a change of such a complex component will, depending on the product’s features, incur significant engineering effort and cost. For the product’s longer-term support, it introduces the complication of a product variant. It might present an opportunity to update the product’s specifications and incorporate new features that had already been considered viable.

Regulatory compliance and safety certifications: Product compliance includes wireless type approval, country and regional product safety, and functional and electrical safety. Even the slightest change of components and operating software may invalidate product compliance, necessitating lengthy product testing and engaging an authorized product testing laboratory. Before commencing any migration project, the product engineering team should prepare a detailed analysis of product changes, associated costs, and likely timescales for company management.

Cloud and wireless connectivity: Many product designs may rely on wireless connectivity to a cloud-based system or a smartphone app. Would any proposed hardware changes impact the product’s connectivity and feature set? These actions might involve changing the software libraries or wireless module drivers and will require sufficient time for complete testing.

Interfacing with 3rd party ecosystems: Alongside potential connectivity alterations, your product might interact with other systems outside your company’s remit. This is particularly the case with IoT/IIoT (Internet of Things/Industrial Internet of Things) or home automation applications. It would be prudent also to investigate whether any potential changes will require re-certification to the 3rd party application.


Careful Analysis is Key to Migrating a Microcontroller Platform

Component shortages will continue to challenge the electronics industry for a while, so product manufacturers are constantly reviewing the impact on their production schedules.

In this short article, we’ve highlighted just some of the challenges and critical review topics for end-product manufacturers who may decide changing to another microcontroller platform might be necessary.

Engineering teams should continue to maintain close collaboration with their supply chain colleagues and make full use of the tools, forecasts, and advice available from component distributors and suppliers.


Mouser Electronics

Authorised Distributor