Because Knetbooks knows college students. Our rental program is designed to save you time and money. Whether you need a textbook for a semester, quarter or even a summer session, we have an option for you. Simply select a rental period, enter your information and your book will be on its way!
| Preface | p. xiii |
| Introduction | p. 1 |
| What is an Embedded System? | p. 1 |
| What Is Unique about the Design Goals for Embedded Software? | p. 3 |
| What Does "Real-Time" Mean? | p. 5 |
| What Does "Multithreading" Mean? | p. 5 |
| How Powerful are Embedded Processors? | p. 6 |
| What Programming Languages are Used? | p. 6 |
| How Is Building an Embedded Application Differ... MORE | p. 7 |
| How Big are Typical Embedded Programs? | p. 9 |
| Problems | p. 10 |
| Data Representation | p. 11 |
| Fixed-Precision Binary Numbers | p. 11 |
| Positional Number Systems | p. 13 |
| Binary-to-Decimal Conversion | p. 14 |
| Decimal-to-Binary Conversion | p. 14 |
| Hexadecimal: A Shorthand for Binary | p. 17 |
| Fixed Precision, Rollover, and Overflow | p. 18 |
| Binary Representation of Integers | p. 19 |
| Signed Integers | p. 20 |
| Positive and Negative Representations of the Same Magnitude | p. 20 |
| Interpreting the Value of a 2's-Complement Number | p. 21 |
| Changing the Sign of Numbers with Integer and Fractional Parts | p. 22 |
| Binary Addition and Subtraction | p. 23 |
| Range and Overflow | p. 25 |
| Binary Representation of Real Numbers | p. 26 |
| Floating-Point Real Numbers | p. 26 |
| Fixed-Point Real Numbers | p. 28 |
| ASCII Representation of Text | p. 28 |
| Binary-Coded Decimal (BCD) | p. 31 |
| Problems | p. 32 |
| Implementing Arithmetic | p. 35 |
| 2'S-Complement and Hardware Complexity | p. 35 |
| Multiplication and Division | p. 38 |
| Signed Versus Unsigned Multiplication | p. 38 |
| Shifting Instead of Multiplying or Dividing by Powers of 2 | p. 38 |
| Multiplying by an Arbitrary Constant | p. 40 |
| Dividing by an Arbitrary Constant | p. 41 |
| Arithmetic for Fixed-Point Reals | p. 41 |
| Fixed-Point Using a Universal 16.16 Format | p. 44 |
| Fixed-Point Using a Universal 32.32 Format | p. 45 |
| Multiplication of 32.32 Fixed-Point Reals | p. 46 |
| Example: Multiplying two 4.4 Fixed-Point Reals | p. 49 |
| Problems | p. 50 |
| Getting the Most out of C | p. 52 |
| Integer Data Types | p. 52 |
| Integer Range and the Standard Header File LIMITS.H | p. 54 |
| Boolean Data Types | p. 56 |
| Mixing Data Types | p. 57 |
| Manipulating Bits In Memory | p. 58 |
| Testing Bits | p. 60 |
| Setting, Clearing, and Inverting Bits | p. 61 |
| Extracting Bits | p. 62 |
| Inserting Bits | p. 62 |
| Manipulating Bits In Input/Output Ports | p. 63 |
| Write-Only I/O Devices | p. 63 |
| I/O Devices Differentiated by Reads Versus Writes | p. 65 |
| I/O Devices Differentiated by Sequential Access | p. 65 |
| I/O Devices Differentiated by Bits in the Written Data | p. 66 |
| Accessing Memory-Mapped I/O Devices | p. 66 |
| Accessing Data Using a Pointer | p. 67 |
| Arrays, Pointers, and the "Address of" Operator | p. 68 |
| Structures | p. 69 |
| Packed Structures | p. 70 |
| Bit Fields | p. 71 |
| Variant Access | p. 72 |
| Casting the Address of an Object | p. 73 |
| Using Unions | p. 74 |
| Problems | p. 75 |
| Programming in Assembly Part 1: Computer Organization | p. 80 |
| Memory | p. 82 |
| Data Alignment | p. 83 |
| The Central Processing Unit (CPU) | p. 85 |
| Other Registers | p. 86 |
| The Fetch-Execute Cycle | p. 86 |
| Input/Output | p. 89 |
| Introduction to the ARM® Cortex™-M3 v7M Architecture | p. 90 |
| Internal Organization | p. 90 |
| Instruction Pipelining | p. 91 |
| Memory Model | p. 93 |
| Bit-Banding | p. 93 |
| ARM Assembly Language | p. 96 |
| Instruction Formats and Operands | p. 96 |
| Translating Assembly into Binary | p. 98 |
| Problems | p. 98 |
| Programming in Assembly Part 2: Data Manipulation | p. 102 |
| Loading Constants into Registers | p. 102 |
| Loading Memory Data into Registers | p. 103 |
| Storing Data from Registers to Memory | p. 105 |
| Converting Simple C Assignment Statements into ARM Assembly | p. 106 |
| Memory Address Calculations | p. 107 |
| Memory Addressing Examples | p. 108 |
| Translating C Pointer Expressions to Assembly | p. 109 |
| Translating C Subscript Expressions to Assembly | p. 111 |
| Translating Structure References to Assembly | p. 111 |
| Stack Instructions | p. 112 |
| Data Processing Instructions | p. 113 |
| Updating the Flags in the APSR | p. 113 |
| Arithmetic Instructions | p. 114 |
| Bit Manipulation Instructions | p. 115 |
| Shift Instructions | p. 116 |
| Bit Field Manipulation Instructions | p. 118 |
| Miscellaneous Bit, Byte, and Half-Word Instructions | p. 119 |
| Problems | p. 120 |
| Programming in Assembly Part 3: Control Structures | p. 123 |
| Instruction Sequencing | p. 123 |
| Implementing Decisions | p. 124 |
| Conditional Branch Instructions | p. 124 |
| If-Then and If-Then-Else Statements | p. 125 |
| Compound Conditionals | p. 126 |
| The "If-Then" (IT) Instruction | p. 128 |
| Implementing Loops | p. 129 |
| Speeding Up Array Access | p. 131 |
| Implementing Functions | p. 132 |
| Function Call and Return | p. 132 |
| Register Usage | p. 133 |
| Parameter Passing | p. 134 |
| Return Values | p. 135 |
| Temporary Variables | p. 135 |
| Preserving Registers | p. 136 |
| Problems | p. 138 |
| Programming in Assembly Part 4: I/O Programming | p. 140 |
| The Cortex-M3 I/O Hardware | p. 141 |
| Interrupts and Exceptions | p. 141 |
| Thread and Handler Modes | p. 142 |
| Entering the Exception Handler | p. 142 |
| Returning from the Exception Handler | p. 143 |
| Latency Reduction | p. 143 |
| Priorities and Nested Exceptions | p. 145 |
| Synchronization, Transfer Rate, and Latency | p. 146 |
| Buffers and Queues | p. 147 |
| Double Buffering | p. 149 |
| Estimating I/O Performance Capability | p. 150 |
| Polled Waiting Loops | p. 150 |
| Interrupt-Driven I/O | p. 152 |
| Direct Memory Access | p. 154 |
| Comparison of Methods | p. 155 |
| Problems | p. 156 |
| Concurrent Software | p. 159 |
| Foreground/Background Systems | p. 159 |
| Thread State and Serialization | p. 159 |
| Managing Latency | p. 160 |
| Interrupt Overrun | p. 163 |
| Moving Work into the Background | p. 163 |
| Multithreaded Programming | p. 164 |
| Concurrent Execution of Independent Threads | p. 265 |
| Context Switching | p. 165 |
| Non-preemptive (Cooperative) Multithreading | p. 165 |
| Preemptive Multithreading | p. 267 |
| Shared Resources and Critical Sections | p. 167 |
| Disabling Interrupts | p. 269 |
| Disabling Task Switching | p. 169 |
| Spin Locks | p. 170 |
| Mutex Objects | p. 270 |
| Semaphores | p. 272 |
| Problems | p. 272 |
| Scheduling | p. 174 |
| Thread States | p. 174 |
| Pending Threads | p. 175 |
| Context Switching | p. 176 |
| Round-Robin Scheduling | p. 178 |
| Priority-Based Scheduling | p. 178 |
| Resource Starvation | p. 178 |
| Priority Inversion | p. 179 |
| The Priority Ceiling Protocol | p. 180 |
| The Priority Inheritance Protocol | p. 180 |
| Assigning Priorities | p. 181 |
| Deadline-Driven Scheduling | p. 181 |
| Rate-Monotonic Scheduling | p. 182 |
| Deadlock | p. 183 |
| Watchdog Timers | p. 184 |
| Problems | p. 186 |
| Memory Management | p. 189 |
| Objects in C | p. 189 |
| Scope | p. 190 |
| Refining Local Scope | p. 190 |
| Refining Global Scope | p. 191 |
| Lifetime | p. 192 |
| Automatic Allocation | p. 193 |
| Storage Class "Register" | p. 194 |
| Static Allocation | p. 195 |
| Three Programs to Distinguish Static from Automatic | p. 196 |
| Object Creation | p. 196 |
| Object Initialization | p. 196 |
| Object Destruction | p. 197 |
| Dynamic Allocation | p. 199 |
| Fragmentation | p. 199 |
| Memory Allocation Pools | p. 200 |
| Automatic Allocation with Variable Size (alloca) | p. 200 |
| Variable-Size Arrays | p. 201 |
| Recursive Functions and Memory Allocation | p. 202 |
| Problems | p. 203 |
| Shared Memory | p. 209 |
| Recognizing Shared Objects | p. 209 |
| Shared Global Data | p. 210 |
| Shared Private Data | p. 210 |
| Shared Functions | p. 210 |
| Reentrant Functions | p. 220 |
| Read-Only Data | p. 211 |
| Type Qualifier "const" | p. 211 |
| Coding Practices to Avoid | p. 212 |
| Functions That Keep Internal State in Local Static Objects | p. 212 |
| Functions That Return the Address of a Local Static Object | p. 214 |
| Accessing Shared Memory | p. 215 |
| The Effect of Processor Architecture | p. 217 |
| Read-Only and Write-Only Access | p. 218 |
| Type Qualifier "volatile" | p. 219 |
| Problems | p. 221 |
| System Initialization | p. 224 |
| Memory Layout | p. 224 |
| The CPU and Vector Table | p. 225 |
| C Run-Time Environment | p. 227 |
| Copying Initial Values from Non-Volatile Memory into the Data Region | p. 227 |
| Zeroing Uninitialized Statics | p. 227 |
| Setting Up a Heap | p. 228 |
| System Timer | p. 229 |
| Other Peripheral Devices | p. 229 |
| Answers to Selected Problems | p. 231 |
| Index | p. 234 |
| Table of Contents provided by Ingram. All Rights Reserved. |
Prior to joining the University in 1975, Lewis worked for six years at General Electric’s Aerospace Division where he designed a fault-tolerant clocking system for one of the first triple-redundant automatic landing systems for commercial aircraft. He has consulted for a number of Bay Area companies, including the Singer-Link Company, where his design of new algorithms and a corresponding modular array of VLSI circuits became the basis of a new product line of real-time computer graphics systems.