Practical Microcontroller Engineering with ARM Technology
Häftad, Engelska, 2016
Av Ying Bai, NC) Bai, Ying (Johnson C. Smith University, Charlotte
1 509 kr
Beställningsvara. Skickas inom 5-8 vardagar
Fri frakt för medlemmar vid köp för minst 249 kr.The first microcontroller textbook to provide complete and systemic introductions to all components and materials related to the ARM® Cortex®-M4 microcontroller system, including hardware and software as well as practical applications with real examples.This book covers both the fundamentals, as well as practical techniques in designing and building microcontrollers in industrial and commercial applications. Examples included in this book have been compiled, built, and testedIncludes Both ARM® assembly and C codesDirect Register Access (DRA) model and the Software Driver (SD) model programming techniques and discussedIf you are an instructor and adopted this book for your course, please email ieeeproposals@wiley.com to get access to the instructor files for this book.
Produktinformation
- Utgivningsdatum2016-02-09
- Mått188 x 236 x 43 mm
- Vikt1 542 g
- SpråkEngelska
- Antal sidor1 040
- FörlagJohn Wiley & Sons Inc
- EAN9781119052371
Tillhör följande kategorier
Dr. Ying Bai is a Professor in the Department of Computer Science and Engineering at Johnson C. Smith University (JCSU). Before joining JCSU, Dr. Bai worked as a software and senior software engineer at Motorola MMS, Schlumberger ATE Technology, Immix TeleCom, and LAM Research. He has published twelve books with publishers such as Prentice Hall, CRC Press LLC, Springer, Cambridge University Press and Wiley-IEEE Press in recent years.
- Preface xxixAcknowledgments xxxiTrademarks and Copyrights xxxiiiCopyright Permissions xxxvAbout the Companion Website xxxixChapter 1 Introduction to Microcontrollers and This Book 11.1 Microcontroller Configuration and Structure 21.2 The ARM® Cortex®M4 Microcontroller System 31.3 The TM4C123GH6PM Microcontroller Development Tools and Kits 41.4 Outstanding Features About This Book 51.5 Who This Book Is For 51.6 What This Book Covers 61.7 How This Book Is Organized and How to Use This Book 81.8 How to Use the Source Code and Sample Projects 91.9 Instructors and Customers Supports 11Chapter 2 ARM® Microcontroller Architectures 132.1 Overview and Introduction 132.2 Introduction to ARM® Cortex®-M4 MCU 152.2.1 The Architecture of ARM® Cortex®-M4 MCU 172.3 The Memory Architecture 272.3.1 The Memory Map 282.3.2 The Stack Memory 292.3.3 The Program Models and States 322.3.4 The Memory Protection Unit (MPU) 332.4 The Nested Vectored Interrupt Controller (NVIC) Architecture 342.4.1 The Nested Vectored Interrupt Controller (NVIC) Features 352.4.2 Exception and Interrupt Sources 352.4.3 Exception Priority Levels and Mask Registers 352.4.4 Respond and Process Exceptions and Interrupts 362.4.5 Exception and Interrupt Vector Table 372.5 The Debug Architecture 372.6 Introduction to TivaTM C Series ARM® Cortex®-M4 MCU-TM4C123GH6PM 382.6.1 TM4C123GH6PM Microcontroller Overview 392.6.2 TM4C123GH6PM Microcontroller On-Chip Memory Map 402.6.3 TM4C123GH6PM Microcontroller General-Purpose Input–Output (GPIO) Module 44 2.6.4 TM4C123GH6PM Microcontroller System Controls 572.7 Introduction to TivaTM C Series LaunchPadTM TM4C123GXL Evaluation Board 722.8 Introduction to EduBASE ARM® Trainer 772.9 Chapter Summary 77Homework 79Chapter 3 ARM® Microcontroller Development Kits 833.1 Overview and Introduction 833.2 The Entire TivaTM TM4C123G-based Development System 843.3 Download and Install Development Suite and Specified Firmware 863.4 Introduction to the Integrated Development Environment—Keil® MDK μVersion5 873.4.1 The Keil® MDK-ARM® for the MDK-Cortex-M Family 883.4.2 General Development Flow with MDK-ARM® 893.4.3 Warming Up Keil® MDK Cortex-M Kit with Example Projects 913.4.4 The Functions of the Keil® MDK-ARM® μVersion®5 GUI 953.5 Embedded Software Development Procedure 1273.6 The Keil® ARM® -MDK μVision5 Debugger and Debug Process 1283.6.1 The ARM® μVision5 Debug Architecture 1293.6.2 The ARM® Debug Adaptor and Debug Adaptor Driver 1303.6.3 TivaTMCSeries LaunchPadTM Debug Adaptor and Debug Adaptor Driver 1323.6.4 The ARM® μVersion5 Debug Process 1333.6.5 The ARM® Trace Feature 1343.6.6 The ARM® Instruction Set Simulator 1363.6.7 The ARM® Programs Running from SRAM 1373.6.8 ARM® Optimizations 1393.7 The TivaWareTM for C Series Software Suite 1403.7.1 The TivaWareTM C Series Software Package 1423.7.2 TivaWareTM C Series for TM4C123G LaunchPadTM Evaluation Kit 1453.8 The TivaWareTM for C Series Utilities and Other Supports 1473.8.1 Additional Utilities Provided by TivaWareTM for C Series 1483.9 Program Examples 1513.10 Chapter Summary 152Homework 152Chapter 4 ARM® Microcontroller Software and Instruction Set 1554.1 Overview and Introduction 1554.2 Introduction to ARM® Cortex® -M4 Software Development Structure 1564.3 Introduction to ARM® Cortex® -M4 Assembly Instruction Set 1574.3.1 The ARM®Cortex®-M4 Assembly Language Syntax 1584.3.2 The ARM® Cortex®-M4 Pseudo Instructions 1604.3.3 The ARM® Cortex®-M4 Addressing Modes 1614.3.4 The ARM® Cortex®-M4 Instruction Set Categories 1724.4 ARM® Cortex®-M4 Software Development Procedures 1964.5 Using C Language to Develop ARM® Cortex®-M4 Microcontroller Applications 1974.5.1 The Standard Data Types Used in Intrinsic Functions 1984.5.2 The CMSIS-Core-Specific Intrinsic Functions 2004.5.3 The Keil® ARM® Compiler-Specific Intrinsic Functions 2024.5.4 Inline Assembler 2044.5.5 Idiom Recognition 2054.5.6 C Programming Development Guideline and Procedure 2064.5.7 The TivaWareTM Peripheral Driver Library 2134.6 Chapter Summary 243Homework 244Chapter 5 ARM® Microcontroller Interrupts and Exceptions 2615.1 Overview and Introduction 2615.2 Exceptions and Interrupts in the ARM® Cortex®-M4 MCU System 2635.2.1 Exception and Interrupt Types 2655.2.2 Exceptions and Interrupts Management 2655.2.3 Exception and Interrupt Processing 2685.3 Exceptions and Interrupts in the TM4C123GH6PM Microcontroller System 2735.3.1 Local Interrupt Configurations and Controls for GPIO Pins 2735.3.2 Local Interrupt Configurations and Controls for GPIO Ports 2765.3.3 Global Interrupt Configurations and Controls 2815.3.4 The Vector Table and Vectors Used in the TM4C123GH6PM MCU 2825.3.5 The GPIO Interrupt Handling and Processing Procedure 2845.4 Developing GPIO Port Interrupt Projects to Handle GPIO Interrupts 2855.4.1 Two Software Packages Used in the TM4C123GH6PM MCU System 2865.4.2 Using DRA Programming Model to Handle GPIO Interrupts 2905.4.3 Using CMSIS Core Macros for NVIC Registers to Handle GPIO Interrupts 2945.4.4 Using TivaWareTM Peripheral Driver Library API Functions to Handle GPIO Interrupts 3065.4.5 Using CMSIS Core Access Functions to Handle GPIO Interrupts 3135.5 Comparison Among Four Interrupt Programming Methods 3175.6 Chapter Summary 318Homework 319Chapter 6 ARM® Microcontroller Memory System 3336.1 Overview and Introduction 3336.2 Memory Architecture in the TM4C123GH6PM MCU System 3346.2.1 Static Random Access Memory (SRAM) 3366.2.2 Flash Memory 3366.2.3 Flash Memory Protection Control 3496.2.4 Internal Read-Only Memory (ROM) 3516.2.5 Electrical Erased Programmable Read-Only Memory (EEPROM) 3546.3 Memory Map in TM4C123GH6PM MCU System 3616.4 Bit-Band Operations 3626.4.1 The Mapping Relationship Between the Bit-Band Region and the Bit-Band Alias Region 3656.4.2 The Advantages of Using the Bit-Band Operations 3656.4.3 An Illustration Example of Using Bit-Band Alias Addresses 3676.4.4 Bit-Band Operations for Different Data Sizes 3696.4.5 Bit-Band Operations Built in C Programs 3696.5 Memory Requirements and Memory Properties 3706.5.1 Memory Requirements 3716.5.2 Memory Access Attributes 3726.5.3 Memory Endianness 3736.6 Memory System Programming Methods 3756.6.1 The API Functions Used for Flash Memory Programming 3766.6.2 The API Functions Used for EEPROM Programming 3786.7 Memory System Programming Projects 3806.7.1 Flash Memory Programming 3806.7.2 EEPROM Programming 4016.7.3 Three Kinds of System Header Files in the TM4C123GH6PM MCU System 4056.7.4 Build Example EEPROM Programming Projects 4086.8 Chapter Summary 420Homework 421Chapter 7 ARM® Cortex®-M4 Parallel I/O Ports Programming 4337.1 Overview and Introduction 4337.2 GPIO Module Architecture and GPIO Port Configuration 4347.3 GPIO Port Control Registers 4377.3.1 GPIO Port Initialization and Configuration 4387.4 On-Board Keypad Interface Programming Project 4407.4.1 The Keypad Interfacing Programming Structure 4417.4.2 Create the Keypad Interfacing Programming Project (Polling-Driven) 4427.4.3 Set Up the Environment to Build and Run the Project 4467.5 Analog-to-Digital Converter Programming Project 4467.5.1 ADC Modules in the TM4C123GH6PM MCU System 4467.5.2 ADC Module Architecture and Functional Block Diagram 4477.5.3 ADC Module Components and Signal Descriptions 4487.5.4 Analog-to-Digital Converter 4707.5.5 Initialization and Configuration 4737.5.6 Build the Analog-to-Digital Converter Programming Project 4757.5.7 ADC Module API Functions Provided in the TivaWareTM Peripheral Driver Library 4807.6 PWM-Controlled DC and Step Motors Programming Project 4867.6.1 The PWM Principle and Implementations 4877.6.2 PWM Modules in the TM4C123GH6PM MCU System 4877.6.3 PWM Generator Functional Block Diagram 4907.6.4 PWM Module Architecture and Functional Block Diagram 5027.6.5 PWM Module Components and Signal Descriptions 5097.6.6 PWM Module Initialization and Configuration 5137.6.7 PWM Module Architecture in the EduBASE ARM® Trainer 5157.6.8 Build an Example PWM Programming Project 5167.7 The PWM API Functions in the TivaWareTM Peripheral Driver Library 5217.7.1 PWM Modules and Generators Configuration and Set Up Control Functions 5217.7.2 PWM Output Control Functions 5237.7.3 PWM Interrupt and Fault Control Functions 5237.8 Chapter Summary 525Homework 527Chapter 8 ARM® Cortex®-M4 Serial I/O Ports Programming 5478.1 Overview and Introduction 5478.2 GPIO Module Architecture and GPIO Port Configuration 5488.3 Synchronous Serial Interface (SSI) 5518.3.1 Asynchronous and Synchronous Communication Protocols and Data Framing 5528.3.2 Synchronous Serial Interface Architecture and Functional Block Diagram 5558.3.3 The Synchronous Data Transmission Format and Frame 5568.3.4 SSI Module Components and Signal Descriptions 5608.3.5 Build the On-Board LCD Interface Programming Project 5728.3.6 Build On-Board 7-Segment LED Interface Programming Project 5898.3.7 Build Digital-to-Analog Converter Programming Project 5958.3.8 SSI API Functions Provided by TivaWareTM Peripheral Driver Library 6048.4 Inter-Integrated Circuit (I2C) Interface 6118.4.1 I2C Module Bus Configuration and Operational Status 6128.4.2 I2C Module Architecture and Functional Block Diagram 6138.4.3 I2C Module Data Transfer Format and Frame 6148.4.4 I2C Module Operational Sequence 6148.4.5 I2C Module Major Operational Components and Control Signals 6188.4.6 I2C Module Running Speeds (Clock Rates) and Interrupts 6208.4.7 I2C Interface Control Signals and GPIO I2C Control Registers 6228.4.8 I2C Module Control Registers and Their Functions 6238.4.9 I2C Module Initializations and Configurations 6308.4.10 Build an Example I2C Module Project 6318.4.10.1 The BQ32000 Real Time Clock (RTC) 6318.4.10.2 The Interface Between the BQ32000 and EduBASE ARM® Trainer 6338.4.10.3 Create a DRA Model I2C Project DRAI2C 6348.4.10.4 Create the Source File DRAI2C 6348.4.10.5 Set Up the Environment to Build and Run the Project 6388.4.11 I2C API Functions Provided by TivaWareTM Peripheral Driver Library 6398.4.11.1 Master Operations 6398.4.11.2 I2C Module Status and Initialization API Functions 6408.4.11.3 I2C Module Sending and Receiving Data API Functions 6418.5 Universal Asynchronous Receivers/Transmitters (UARTs) 6428.5.1 Asynchronous Serial Communication Protocols and Data Framing 6428.5.2 Asynchronous Serial Interface Architecture and Functional Block Diagram 6438.5.3 UART Module Operations and Control Registers 6458.5.4 UART Module Control Signals and Related GPIO Pins 6588.5.5 UART Module Initializations and Configurations 6598.5.6 Build an Example UART Module Project 6608.5.7 The UART API Functions Provided by the TivaWareTM Peripheral Driver Library 6648.6 Chapter Summary 668Homework 669Chapter 9 ARM® Cortex®-M4 Timer and USB Programming 6919.1 Overview and Introduction 6919.2 General-Purpose Timers 6929.2.1 The GPTM Architecture and Functional Block Diagram 6939.2.2 The General-Purpose Timer Module Components 6949.2.3 The General-Purpose Timer Module Operational Modes 6959.2.4 The General-Purpose Timer Module Registers 7049.2.5 The General-Purpose Timer Module GPIO-Related Control Signals 7129.2.6 The General-Purpose Timer Module Initializations and Configurations 7139.2.7 Build an Example General Purpose Timer Project 7179.2.8 Popular Implementations on GPTM Modules 7189.2.9 The API Functions Used for General-Purpose Timer Module 7279.3 Watchdog Timers 7329.3.1 The Watchdog Timer Architecture and Functional Block Diagram 7349.3.2 The Watchdog Timer Operational Sequence and Timing Access 7359.3.3 The Watchdog Timer Registers 7359.3.4 The Watchdog Timer Module Initializations and Configurations 7389.3.5 Build an Example Watchdog Timer Project 7399.3.6 The API Functions Used for Watchdog Timer Modules 7399.4 Universal Serial Bus (USB) Controller 7439.4.1 The Hardware Configuration of the USB Devices 7449.4.2 The USB Components and Operational Sequence 7459.4.3 The Serial Interface Protocol of the USB Communications 7479.4.4 The USB Interface Used in the Embedded System 7489.4.5 The USB in the TM4C123GH6PM MCU System 7499.4.6 The USB Registers 7619.4.7 The USB Initializations and Configurations 7749.4.8 A USB Implementation Example Project 7759.4.9 The USB API Functions Provided by the TivaWareTM Peripheral Driver Library 7809.4.10 Build a USB Implementation Example Project Using the API Functions 7889.5 Chapter Summary 788Homework 790Chapter 10 ARM® Cortex®-M4 Other Peripherals Programming 80510.1 Overview and Introduction 80510.2 The Controller Area Network (CAN) 80510.2.1 CAN Standard Frame 80610.2.2 CAN Extended Frame 80710.2.3 Detecting and Signaling Errors 80810.2.4 The CAN Functional Block Diagram in the TM4C123GH6PM System 80910.2.5 The CAN Components and Operational Procedures 81010.2.6 The CAN Module Registers 82310.2.7 The CAN Module Interfacing and External Control Signals 83310.2.8 The CAN API Functions Provided by TivaWareTM Peripheral Driver Library 83410.2.9 A CAN Module Implementation Example Project 83810.3 The Quadrature Encoder Interface (QEI) 84710.3.1 Introduction to Quadrature Encoder 84710.3.2 The Working Principle of the Increment Rotary Encoder 84910.3.3 The Increment Rotary Encoder Applied in the Closed-Loop Control System 85010.3.4 The Increment Rotary Encoder Applied in the TM4C123GH6PM MCU System 85110.3.5 The QEI Module Registers 85210.3.6 The QEI Interfacing Signals and Related GPIO Pins 85610.3.7 The QEI Initialization and Configuration Process 85610.3.8 QEI API Functions Provided by the TivaWareTM Peripheral Driver Library 85710.3.9 An Implementation of Using Rotary Encoder for a Closed-Loop Control System 86010.4 The Continuous and Discrete PID Closed-Loop Control System 87110.4.1 Identify the Dynamic Model for the Motor Plant 87310.4.2 Design the PID Controller Using the MATLAB®Control System ToolboxTM 87810.4.3 Simulate the PID Control System Using the MATLAB® SIMULINK® 88110.4.4 Build the Control Software to Implement the PID Controller 88310.5 The Fuzzy Logic Closed-Loop Control System 88710.5.1 The Fuzzification Process 88710.5.2 Design of Control Rules 88910.5.3 The Defuzzification Process 88910.5.4 Apply the Fuzzy Logic Controller to the DC Motor Control System 89110.5.5 Build the Fuzzy Logic Control Project Fuzzy-Control 89410.6 The Analog Comparators 89910.6.1 The Analog Comparator Architecture and Functional Block Diagram 89910.6.2 The Control Registers Used in the Analog Comparator Modules 89910.6.3 The Voltage Reference Registers Used in the Analog Comparator Modules 90010.6.4 The Interrupt Processing Registers Used in the Analog Comparator Modules 90310.6.5 The Input and Output Control Signals Used in the Analog Comparators 90310.6.6 The Initialization and Configuration Process for the Analog Comparator 90410.6.7 Build a Project to Test the Functions of the Analog Comparator Module 90410.6.8 Set Up the Environments to Build and Run the Project 90710.7 Chapter Summary 908Homework 909Chapter 11 ARM® Floating Point Unit (FPU) 92711.1 Overview and Introduction 92711.2 Three Types of the Floating-Point Data 92811.2.1 The Half-Precision Floating-Point Data 92811.2.2 The Single-Precision Floating-Point Data 93011.2.3 The Double-Precision Floating-Point Data 93211.3 The FPU in the Cortex®-M4 MCU 93411.3.1 The Architecture of the Floating-Point Registers 93411.3.2 The FPU Operational Modes 93711.4 Implementing the Floating-Point Unit 93811.4.1 Floating-Point Support in CMSIS-Core 93811.4.2 Floating-Point Programming in the TM4C123GH6PM MCU System 93911.4.3 An FPU Example Project Using the Direct Register Access Model 94211.5 Chapter Summary 946Homework 946Chapter 12 ARM® Memory Protection Unit (MPU) 95112.1 Overview and Introduction 95112.2 Implementation of the MPU 95212.2.1 Memory Regions, Types, and Attributes 95312.2.2 MPU Configuration and Control Registers 95312.3 Initialization and Configuration of the MPU 95912.4 Building A Practical Example MPU Project 96012.4.1 Create a New DRA Model MPU Project DRAMPU 96012.4.2 Set Up the Environment to Build and Run the Project 96312.5 The API Functions Provided by the TivaWareTM Peripheral Driver Library 96412.5.1 The MPU Set Up and Status API Functions 96512.5.2 The MPU Enable and Disable API Functions 96712.5.3 The MPU Interrupt Handler Control API Functions 96812.6 Chapter Summary 969Homework 970Index 975About the Author 987