Making the move to 32-bit

by

Simon Duggleby, Semiconductor Category Marketing Manager, RS Components

 

Migration to a high end MCU is made simpler by staying within a trusted supplier’s roadmap and performance curve.

Manufacturers have employed 8-bit microcontrollers (MCUs) for many years, riding both the price reduction and increased functionality curves as Integrated Device Manufacturers (IDMs) have competed to offer more for less. However, as the complexity of end applications continues to increase, many IDMs have shifted their focus from the relatively simple 8-bit architectures to more capable but complex 32-bit MCUs, in an attempt to meet demand for even more functionality.

Moving to a 32-bit architecture offers several benefits, not least of all a much greater address range. This translates to greater addressable memory (allowing for more complex algorithms and control software), as well as wider data paths (for better response time) and more extensive peripheral sets. This combination of flexibility and capability makes 32-bit devices attractive to many OEMs, but what are the risks in moving away from 8-bit?

Primarily, one potential risk is the loss of the engineering knowledge base a manufacturer may have built up over a long period of time for a specific instruction set or architecture. It is hard to deny that programming an 8-bit device in assembly code isn’t simpler than tackling the same task using a high level language like C or C++, but IDMs continue to go to extreme lengths to make the transition as painless as possible. While it may not be possible to retain software compatibility, most IDMs offer sophisticated integrated development environments (IDEs) and libraries of software that are much more comprehensive than the software support typically offered for 8-bit devices.

Another software-related challenge is the need for a scheduler, kernel or real-time operating system (RTOS) when using a 32-bit device. It’s true that one of the big production boosts a 32-bit MCU offers is the ability to integrate ‘off-the-shelf’ software designed to make application development simpler, and this typically includes some form of operating system, but the complexity (and learning curve) will vary depending on the application’s demands and will ultimately be well worth the effort.

 

Core capabilities

Any developer involved with embedded design will appreciate the position ARM has established with its Cortex-M family of cores, which have been adopted by many semiconductor manufacturers and, as a result, are supported by a strong ecosystem. The same is almost true for the 8051 architecture and it would be easy to assume that the Cortex-M is the obvious choice when considering a move to 32-bit MCUs. However, some manufacturers still offer alternatives and this can become an important factor when looking at moving further up the performance curve. Atmel’s AVR range spans 8-bit to 32-bit while Microchip selected the MIPS core when developing its 32-bit family. The reasons behind these choices form an important part of their migration strategy and how easily they can support developers in that transition.

 

Software solutions

Moving from Assembly to C can seem daunting, and many IDMs, including Atmel, appreciate this. Table 1 gives a simple overview of the benefits of both languages and Atmel has worked with IAR to provide advice on how to configure IAR’s C compiler for Atmel’s 8-bit AVR MCU in projects containing both C and Assembly code. This provides an excellent launch point to move to Atmel’s 32-bit AVR UC3 family, programmed using the AVR32Studio, which maintains support for C/C++ and Assembly.

Table 1

 

Tool support becomes more crucial as the complexity of the MCU and its application software increase. Supporting the migration from 8- to 32-bit can be further eased if the tool chain remains familiar and, if possible, consistent throughout. This was the philosophy Microchip adopted when it launched its latest all-encompassing IDE, MPLAB X, just a short while ago. Unlike some IDEs, MPLAB X can be used to develop software for any of Microchip’s MCUs — including its 8-bit PIC MCUs, the dsPIC digital signal controllers and the high-performance MIPS-based 32-bit PIC32 family. Microchip based MPLAB X on the NetBeans IDE from Oracle, which means it offers a range of professional features not always available in an IDE targeting embedded design.

 

Hardware dependencies

Software aside, the real benefits of moving to a 32-bit architecture will be the performance and extended functionality it offers. Despite the continued and extensive efforts of IDMs to adapt MCUs with an 8-bit core, they are inevitably limited in their capability, making the move to a 32-bit alternative equally inevitable. Smoothing the transition, therefore, is of the utmost importance.

A long-term strategy can be crucial in this respect. STMicroelectronics, for instance, has addressed the migration issue between its 8-bit STM8 family (based on a proprietary architecture) and STM32 (based on the ARM Cortex-M3 core) by developing the peripheral IP it uses in both to be easily designed in to either. It achieves this by using a bridge to connect the peripherals to the core in the STM32 family, allowing both families to share the same peripheral IP by modifying the internal bus specification. This means they only differ in terms of the register size, maximum clock frequency. They also share a similar clock system, as well as memory configurations.

 

 

Figure 1 shows a comparison of the STM8 and STM32 families

From a software point of view, ST points out that the peripheral compatibility promotes ‘platform design’, which can significantly simplify switching between the two product lines. In addition, extensive software libraries comply with a Hardware Abstraction Layer for MCU resources; there is not a single control or status bit that isn’t covered by a C function or an API.

 

Risk reduction

Moving from an 8-bit device to a 32-bit alternative may not be easily achieved, but by staying within the same family from the same manufacturer, developers are assured that their preferred supplier will have made every effort to make that transition as seamless as possible — from developing portable IP to investing in advanced tool chains. Ultimately, MCUs are optimised for relatively specific requirements and while not every manufacturer is willing or able to provide a roadmap from low-end to high-performance, it’s important to maintain sight of the fact that MCUs are incredibly flexible, and so always require an element of configuration. With 32-bit solutions such as ST’s STM32, Atmel’s AVR32 and Microchip’s PIC32, their legacy is clear and present, representing less of a one-way door and more of a smooth performance curve, with devices to suit every application and configuration.