Migrating to ARM Cortex M3Follow article
As if fans of rival sports teams, some developers shout PIC and others ARM Cortex M3/4. Most of these developers are more comfortable on one or the other. As you can assume from the title I am on the ARM Cortex side and I will lay out some reasons why it makes complete and logical sense to switch to an ARM based MCU from a PIC. Don’t get me wrong though the PIC has great features and is the better choice for specific application.
There are many reasons to base a new design on a device incorporating a Cortex-M3 processor. Most, if not all, of these reasons also apply to the decision to migrate an existing product to Cortex-M3.
While exact performance is dependent on the individual device and implementation, the Cortex-M3 processor is capable of providing 1.25 Dhrystone MIPS/MHz at clock speeds up to 135 MHz which equates to about 130 DMIPS @ 135 MHz.
Since the Cortex-M3 is a full 32-bit processor, including 32-bit address and data buses, it has a 4GB address space. Within the fixed address space, up to 2GB of this is available for code execution (either in flash or RAM) and up to 2GB for RAM (either on or off chip). Significant space is also allocated for peripherals, system control registers and debug support. I know that there are 32 bit PIC devices so this is more of a selling point for choosing a 32bit of the 16/24 PIC.
The Cortex-M3 is well supported by a wide range of tools from many suppliers. In particular, the RealView Developer Suite (RVDS), Keil Microcontroller Developer Kit (MDK) and tools from the individual vendors like Silicon Labs’ Simplicity Studio support Cortex-M3. Models are also available to accelerate software development.
Can program in C
Unlike many microcontrollers, the Cortex-M3 can be programmed entirely in C. This includes exception handling, reset and initialization as well as application software. Doing away with assembly code improves portability, maintainability and debugging and also encourages code reuse. Easier programming, improved reusability and greater availability of device libraries also reduces time-to-market.
More efficient interrupt handling
The interrupt architecture of the Cortex-M3 is designed for efficient interrupt entry and exit and also to minimize interrupt latency. The integrated Nested Vectored Interrupt Controller supports hardware prioritization, pre-emption and dispatch of external and internal interrupts. The core also supports late arrival, tail-chaining and nesting with minimal software intervention.
The Cortex-M3 will meet the needs of the majority of today’s microcontroller applications but, crucially, it provides an upwards migration path to the rest of the ARM architecture family of products. Since programming is entirely in C, achieving extra performance by migrating to a higher class of ARM processor is achievable with minimal engineering effort. A single toolset also supports multiple Cortex-M architecture from multiple MC vendors.
Better consistency between suppliers
Using a microcontroller based on an industry-standard architecture reduces risk by ensuring that products available from different suppliers are highly consistent and standardized. The engineering effort involved in moving from one supplier to another is minimized.
Better debug facilities
The Cortex-M3 supports full in-circuit debug using standard debug adapters. There is full support for breakpointing, single-stepping and program trace as well as standard instrumentation features.
The Cortex-M3 architecture is implemented by many device manufacturers and supported by many tools vendors. This gives the developer significantly improved choice. The high degree of standardization across Cortex-M3 microcontrollers means that there is a large range of standard software components available.
Some will disagree with what has been said and with the field of MCUs always changing the comparisions made in this post may not apply as of recently or even tomorrow. Comment whether you agree or disagree with the choice to migrate to ARM M3!