Four Steps to Creating Great 32-Bit Microcontroller Applications
A series of four step-by-step guides to using the ARM RealViewÂ
Microcontroller Development KitÂ
Â
Guide 1: Selecting the right microcontroller for yourÂ
applicationÂ
Â
Rod Crawford June 2006Â
Â
Â
Abstract: Selecting the right ARM® processor-based microcontroller (MCU) for yourÂ
application can be a daunting task. With more than 125 ARM processor-basedÂ
microcontrollers available, finding one with the right peripheral set and performanceÂ
criteria could take extensive research. This white paper describes how theÂ
parametric search engine in the Device Database®, which integrates with theÂ
RealView® Microcontroller Development Kit, can be used to quickly choose the rightÂ
MCU for your application. In addition, we show how the Device Database can beÂ
used to configure the tools in the RealView Microcontroller Development Kit for theÂ
chosen MCU part.Â
Â
OverviewÂ
In the modern world of embedded development, the demand to stay ahead ofÂ
competitors, coupled with the ready availability of low-cost, high-performance 32-bitÂ
microcontrollers, is leading to widespread adoption of these parts in new products,Â
taking over from the 8-bit and 16-bit microcontrollers of yesteryear. When choosing aÂ
microcontroller, embedded developers have four main criteria by which they makeÂ
their choice: functionality, availability, cost and familiarity. In this paper, we discussÂ
how an online Device Database can be used to aid developers in making the rightÂ
choice for their application. We also demonstrate how the Device DatabaseÂ
integrates with the RealView Microcontroller Development Kit to allow developers toÂ
automatically configure their toolchain for development with the chosen MCU.Â
Â
The problem of choiceÂ
Today, when selecting an MCU that will deliver the required peripheral set andÂ
performance at the right price-point, developers are faced with a considerableÂ
breadth of choice. There are more than sixteen semiconductor companies shippingÂ
ARM processor-based MCUs, including some of the largest providers of MCUs in theÂ
world. Each semiconductor vendor offers not just one MCU but several families ofÂ
MCUs that target specific market areas. At the time of writing, there are more thanÂ
125 ARM processor-based MCUs available and that number is growing week onÂ
week.Â
Â
Some vendors offer some form of online search tool that allows developers toÂ
compare and contrast the MCUs in their product portfolio. However that doesn’t helpÂ
when wanting to compare the MCUs of one vendor with those of another vendor.Â
What is really is needed is a tool that allows developers to compare and contrastÂ
MCUs within product families, across product families and across vendors. That’sÂ
where the Device Database comes in.Â
Â
The Device DatabaseÂ
The Device Database is a searchable database that contains information about theÂ
various MCUs supported by software development tools from Keilâ„¢ — an ARMÂ
Company, including those ARM processor-based MCUs supported by the RealViewÂ
Microcontroller Development Kit. There are two editions of the Device Database, oneÂ
online at www.keil.com/dd and one built into the RealView MicrocontrollerÂ
Development Kit. The parametric search function is available only on the Web-basedÂ
edition.Â
Â
The database includes the following information for supported MCUs:Â
Â
Entry                          DescriptionÂ
Part Description         A brief description of each device including partÂ
                       number, core and peripheral set.Â
Header Files           C and assembly language header files thatÂ
                       describe the SFRs (Special Function Registers)Â
                       available for this MCU.Â
Example Code         Code snippets and example programs that haveÂ
                       been written for the selected MCU or MCU family.Â
Peripheral Simulation    List of the on-chip peripherals that are fullyÂ
                       simulated by the µVision® Integrated DevelopmentÂ
                       Environment (IDE), which is integrated with theÂ
                       RealView Microcontroller Development Kit.Â
Data Sheets            Data sheets related to the MCU part that may beÂ
                       downloaded from the Keil web site.Â
Boards                The available evaluation boards for the selected MCU.Â
Emulators              The available emulators for the selected MCU.Â
Third-Party Software    Software that can run on the MCU, such as Real-Â
                       Time Operating Systems and application libraries.Â
Consultants            A list of software and hardware consultingÂ
                       companies familiar with this MCU.Â
Â
Â
In addition to the above, the database contains links to FindChips.com, which can listÂ
what distributors carry a particular MCU.Â
Â
Database searchesÂ
The Device Database can be searched for MCUs in the following ways:Â
• Architecture, which shows all MCUs that support a particular processorÂ
architecture. E.g., searching by ARM Architecture will list all of the vendorsÂ
that support the ARM architecture at the heart of an MCU.Â
• Vendor, which shows all MCUs produced by particular silicon vendor. E.g.,Â
searching for Philips as a vendor will list all MCU families and MCUs thatÂ
Philips produces.Â
• Parametric, which allows developers to enter the requirements for the MCUÂ
they want to find.Â
Â
Using the power of the parametric searchÂ
The parametric search capability of the Device Database is perhaps of the mostÂ
interest to developers, since it enables them to search for specific peripheral setsÂ
and performance criteria across the whole range of MCUs without being constrainedÂ
by the search capabilities of any single processor vendor. Using this kind of search,Â
developers can quickly home in on a single MCU part or MCU family that will offerÂ
the best match of performance, peripheral set and scalability for future-proofing.Â
Â
Parametric search exampleÂ
To show some of the advanced capabilities of the parametric search of the DeviceÂ
Database, we will use the following example:Â
Â
Example: Remote Temperature Logging DeviceÂ
The device we are creating is a remote temperature sensing device with the ability toÂ
log information from a sensor over time and store it locally. The device should run onÂ
batteries when in the field and should have failsafe reboot should it crash. When theÂ
device is docked via USB, the device should be able to dumps its log via USB andÂ
synchronize its clock for further data collection. Based on these criteria, we can distillÂ
the requirements for the MCU to the following:Â
Â
Peripheral              ParameterÂ
On-chip RAM Â Â Â Â Â Â Â Â Â Â Â >8KÂ
On-chip Flash           >64KÂ
A/D Channels           8+Â
Power-Down Mode      YesÂ
Idle Mode               YesÂ
Real-Time Clock         YesÂ
Watchdog Timer         YesÂ
USB Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Yes
Â
If we feed these parameters as a parametric search into the Device Database, weÂ
find that there are currently two ARM processor-based MCU families from differentÂ
MCU vendors, each with four MCU parts that fit the bill. Using this kind of searchÂ
across different MCU vendors has narrowed our choice from more than 125 MCUsÂ
to eight. From here, we can examine each individual part entry in the DeviceÂ
Database and make our final decision based on more subjective criteria, such asÂ
past experience, clarity of documentation, relevance of applications libraries andÂ
example code and, of course, price/volume. Â
Â
RealView Microcontroller Development Kit configurationÂ
In the above example, we have shown how the Device Database can be used as aÂ
stand-alone tool on the Web to make informed decisions regarding the choice ofÂ
MCU for a particular application. However, the Device Database’s usefulnessÂ
extends beyond this, because it can also be used during the setup phase for aÂ
particular application project. The RealView Microcontroller Development KitÂ
contains an edition of the Device Database which is invoked when a developerÂ
begins a new project. When the developer specifies the chosen MCU in the DeviceÂ
Database within the RealView Microcontroller Development Kit’s µVision IDE, theÂ
database’s knowledge of that MCU is used to automatically configure and tailor theÂ
development tools specifically to that MCU. This can significantly reduce toolingÂ
setup times. The automatic tools configuration includes the following:Â
Â
Simulator setupÂ
This configures the µVision simulator to model the appropriate MCU includingÂ
default clock rate, instruction set, register set, internal ROM and RAM spaces andÂ
peripheral set.Â
Â
Linker setupÂ
This builds a linker readable memory map or Scatter File that defines where theÂ
linker should place the code to the right addresses and tells the MCU simulator theÂ
layout of the memory map (the simulator can trap writes to non-memory or read-onlyÂ
memory).Â
Â
Compiler and assembler setupÂ
This sets the compiler and assemblers include path to include the correct headerÂ
files for this MCU.Â
Â
Installation of startup code into the projectÂ
This prepends the source of the relevant example MCU startup code to the start ofÂ
the project, ensuring that after reset the MCU is put into a known, well-defined stateÂ
prior to execution of the application.Â
Â
In addition to the above, the automatic configuration sets several useful defaults forÂ
first-time use of the tools, including compiling for debug, generation of a map file andÂ
call graph. Each of these options is shown in the Options for Target GUI in theÂ
µVision IDE as both a GUI changeable item and the set of command line argumentsÂ
for each tool the GUI generates.Â
Â
ConclusionÂ
At the beginning of this guide, we stated that when choosing an MCU, embeddedÂ
developers have four main criteria by which they make their choice: functionality,Â
availability, cost and familiarity. The Device Database is unique in its ability to enableÂ
developers to make informed choices on these criteria by allowing them to:Â
• Search for specific functionality across the whole range of ARM processor-Â
based MCUs.Â
• Quickly find pricing and availability of MCUs from distributors.Â
• Rapidly start working in the familiar µVision development environment thatÂ
has been pre-configured to build applications for their specific chosen MCU.Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â











