ARM Microprocessor Systems
eBook - ePub

ARM Microprocessor Systems

Cortex-M Architecture, Programming, and Interfacing

Muhammad Tahir, Kashif Javed

Condividi libro
  1. 498 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

ARM Microprocessor Systems

Cortex-M Architecture, Programming, and Interfacing

Muhammad Tahir, Kashif Javed

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

This book presents the use of a microprocessor-based digital system in our daily life. Its bottom-up approach ensures that all the basic building blocks are covered before the development of a real-life system. The ultimate goal of the book is to equip students with all the fundamental building blocks as well as their integration, allowing them to implement the applications they have dreamed up with minimum effort.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
ARM Microprocessor Systems è disponibile online in formato PDF/ePub?
Sì, puoi accedere a ARM Microprocessor Systems di Muhammad Tahir, Kashif Javed in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Tecnologia dell'informazione. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Editore
CRC Press
Anno
2017
ISBN
9781482259438

Chapter 1

Introduction

Overview

This chapter provides a general introduction to embedded systems and its building blocks. In particular, basic concepts related to microcontrollers, microprocessors, different types of memories, and the software tools required to work with microcontrollers are introduced. Different attributes that are the basis for microprocessor architecture classification are also discussed. We adopt a top-down approach in explaining these concepts.

1.1 What’s the Book About

If we look around at our surroundings for a short while, we will encounter systems being controlled by tiny computers everywhere. Air-conditioners, digital clocks, washing machines, cell phones, point-of-sale systems, and blood sugar measuring equipment are a few to name. These are examples of embedded systems. A system that performs a dedicated task, with the help of a computer embedded inside it, is named an embedded system. The tiny computer, which is comprised of components such as memory, central processing unit (CPU)1, and programmable input/output (I/O) interfaces is located on a single integrated chip and is termed a microcontroller. Since the advent of the first microcontroller in the early 1970s, more sophisticated architectures and organizations of the internal components have been developed in order to meet the needs of the advanced and complicated application requirements. A microcontroller or a microprocessor, at the heart of an embedded system, is integrated with other physical devices or modules to develop a standalone system.
The overall objective of this book is to familiarize the readers with the effectiveness of microcontrollers so that they can design and develop their own embedded systems for many different appealing applications. We have chosen ARM® Cortex®-M family based microcontroller, which is based on a 32-bit ARM processor core from ARM Holdings. ARM Holdings designs a family of reduced instruction set computing (RISC) based processors as well as software development tools, but does not manufacture processor chips. Rather, it licenses the chip designs as well as ARM instruction set architectures to third parties to develop their own products. The Cortex-M processors are enriched with advanced features from the latest ARMv7-M architecture and have become the basis for many industry-leading 32-bit microcontrollers.
1We will use the words CPU and microprocessor interchangeably throughout this book.
The dilemma in learning as well as teaching such a practical subject is that it is very difficult to find a resource that provides a unified treatment of the subject, covering details related to processor architecture, assembly language programming as well as interfacing of external devices using different peripherals. There are few good books available for the Intel x86 architecture, which cover the above-mentioned three aspects. However, we could not find a similar treatment in the context of ARM architecture and this book is just the first step in that direction. The general concepts related to microcontrollers are described in this introductory chapter. The next two chapters provide details about the architecture of Cortex-M while Chapters 4 to 7 will deal with the ARM assembly language programming. In Chapters 8 to 12, the reader will learn how to interface external devices using different peripheral interfaces. We will use Cortex-M4 based microcontroller platform from Texas Instruments (TI). There are many other Cortex-M based microcontrollers available in the market from different vendors, e.g., ST Microelectronics and NXP, to name a few.
This chapter provides a general introduction to embedded systems and its building blocks. In particular, basic concepts related to microcontrollers, microprocessors, different types of memories, and the software tools required to work with microcontrollers are introduced. We adopt a top-down approach in this chapter in explaining these concepts.
Most of us use digital computers everyday. Broadly, a computer is a combination of two components namely hardware and software. Hard disk, CPU, memory (volatile also called RAM), CD-ROM and printers are a few examples of the hardware to name, which are considered part of a computer. We use software such as applications (one of the well-known applications these days is SKYPE, which allows different users to communicate over the Internet with each other) for various purposes and operating systems (Windows and Linux are two highly used operating systems) to manage the applications and computer hardware efficiently. Desktops and laptops are examples of such digital computer systems. A number of tasks can be accomplished with these general-purpose digital computers. Figure 1.1 shows the block diagram of a typical computer system.
Input devices, such as keyboard and mouse, allow a user to provide input to the computer system. The users can see useful information on output devices such as monitors and printers. These input/output (I/O) devices communicate with the CPU through different types of interfaces. The CPU carries out all kinds of processing and comprises three basic building blocks, namely, arithmetic logic unit (ALU), control unit and set of registers. The main memories are random access memory (RAM) and read-only memory (ROM). These memories are accessible directly from the processor. Different types of these memories and their related features will be discussed later in this chapter. Low access-time and random access are their major attributes. Hard disk is an example of the secondary memory and does not interact with the CPU directly. Its information access-time is relatively higher than that of the primary memories. The memory space requirements to store a large number of different applications makes it almost mandatory to use secondary memories, which usually have a relatively large amount of space compared to primary memories.
Images
Figure 1.1: Block diagram representation of a general purpose computer.

1.2 Embedded Systems

An embedded system is based on almost the same concepts as those employed by digital computers. A generic block diagram of an embedded system is shown in Figure 1.2. However, an embedded system is normally developed for a specific application to perform dedicated task(s). Their small size, low cost, and low power requirements have resulted in their widespread use. Examples include cell-phones and other handheld devices, blood pressure monitoring equipment used by doctors, digital multi-meters in the hands of electrical engineers, temperature and humidity measuring devices used by weather stations, to name a few. The requirements of these systems make processor, memory, and other interfaces to play a key role and are the building blocks for the tiny computer (also known as microcontroller) embedded inside a specific embedded system. The software is designed to handle a range of different tasks and is normally programmed to ROM memory, which is not accessible to the user of the embedded system. Similar to the hard disk, the ROM in embedded systems is employed to store programs permanently even when the power is turned off.
Images
Figure 1.2: A generic block diagram of an embedded system.
To further elucidate the relationship among embedded systems, microcontrollers, and microprocessors, let’s refer to Figure 1.3. From the system hardware perspective, an embedded system embeds a microcontroller inside it, which in turn contains a microprocessor core. This is a generic hierarchical view and will be elaborated further throughout this book.
Images
Figure 1.3: Embedded system hierarchy from a hardware design perspective.

1.2.1 Examples of Embedded Systems

No one can deny the importance of embedded systems. They are ubiquitous in our everyday lives. Our houses, cars, toys as well as offices are all equipped with these embedded systems making our lives more comfortable. We list some of the common application areas of embedded systems next.
  1. Applications in communication: Radios, telephones, cellular phones, answering machines, fax machines, wireless routers.
  2. Consumer electronics: Washing machine, clocks and watches, games and toys, remote controls, audio/video electronics.
  3. Automotive systems: Braking system, electronic ignition, locks, power windows and seats, collision avoidance.
  4. Commercial usage: ATM machines, bar code readers, elevator controllers.
  5. Medical treatments: Cancer treatments, dialysis machines, blood pressure measuring equipment, electrocardiography (ECG), etc.
  6. Industrial: Process automation, oil refineries, food processing plants, paper and board mills, etc.
  7. Military use: Missile guidance systems, global positioning systems, surveillance systems.

1.2.2 Design Parameters of Embedded Systems

In the design of an embedded system, there are many key factors that need to be considered. Broadly speaking, a good embedded system design will be the one that can achieve better trade-off between price and performance. While designing an embedded system, the factors that are of utmost importance are listed below.
  1. Power consumption
  2. Speed of execution
  3. System size and weight
  4. Performance accuracy
An embedded system’s processing speed, the power it consumes, its size, and of course how accurately it performs the task assigned to it are those parameters which help a user in the selection process. Furthermore, we can also chalk down the parameters that are commonly used in the selection of a microcontroller and are listed below:
  1. Processing rate and processor size
  2. Different types of I/O devices that can be interfaced
  3. Memory size (RAM and ROM)
Now we introduce the microcontroller, which is next in the system hierarchy.

1.3 Microcontrollers

A microcontroller combines a microprocessor, read only memory (ROM), random access memory (RAM), and input/output (I/O) peripheral devices on a single chip. The microprocessor is similar to a human brain, which sends signals to control as well as information exchange with various subsystems. For this communication among subsystems, different buses are used. A bus is a collection of wires over which digital signals propagate in the form of 0s and 1s. Buses internal to the chip can be broadly categorized in three groups namely data, address, and control. Figure 1.4 shows the basic organization of a microcontroller, depicting how buses are used to connect memory and peripherals to the microprocessor. For the system shown in Figure 1.4, any memory location inside RAM or ROM memories as well as registers associated with different peripheral devices are identified by unique numbers called addresses. Address signals flow over the address bus. The size of the address bus decides the unique addresses generated by a microprocessor. The data bus carries the data. Increasing the size of the data bus allows more number of bits to be communicated between two subsystems. Control signals such as read/write inform whether the CPU is interested in reading some information or wants to write some information to the location whose address was generated over the address bus.
Images
Figure 1.4: Block diagram illustrating the basic building blocks of a microcontroller.
The capability of a microprocessor to process simultaneously a certain number of bits defines the type of microcontroller in terms of processing bits. For example, the first generation microcontrollers were based on 8-bit CPUs, which means that the processors inside those microcontrollers can process 8-bits simultaneously. The need for more processing power and advancements in technology have led to microcontrollers that can process 32 bits simultaneously. In addition, the reduction in the price gap between 8-bit and 32-bit microcontrollers has been a key factor in the popularity of 32-bit microcontrollers.
Another major component of a microcontroller is the general purpose peripheral device also called port, which provides a physical connection be...

Indice dei contenuti