Foreword |
|
xvii | |
Preface |
|
xix | |
Acknowledgments |
|
xxi | |
Chapter 1 Introduction to the Cortex-M Processor Family |
|
1 | (22) |
|
|
1 | (2) |
|
|
3 | (4) |
|
Advanced Architectural Features |
|
|
7 | (3) |
|
|
10 | (3) |
|
|
13 | (3) |
|
|
16 | (2) |
|
|
18 | (1) |
|
|
19 | (2) |
|
|
21 | (2) |
Chapter 2 Developing Software for the Cortex-M Family |
|
23 | (48) |
|
|
23 | (1) |
|
Keil Microcontroller Development Kit |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (2) |
|
Exercise 2.1 Building a First Program |
|
|
27 | (1) |
|
|
28 | (24) |
|
|
52 | (13) |
|
Exercise 2.2 Hardware Debug |
|
|
65 | (4) |
|
|
69 | (2) |
Chapter 3 Cortex-M Architecture |
|
71 | (60) |
|
|
71 | (1) |
|
|
71 | (1) |
|
Programmer's Model and CPU Registers |
|
|
72 | (2) |
|
|
74 | (1) |
|
Q Bit and Saturated Maths Instructions |
|
|
75 | (1) |
|
Interrupts and Multicycle Instructions |
|
|
76 | (1) |
|
Conditional Execution—If Then Blocks |
|
|
76 | (2) |
|
Exercise 3.1 Saturated Maths and Conditional Execution |
|
|
78 | (6) |
|
Cortex-M Memory Map and Busses |
|
|
84 | (3) |
|
|
87 | (1) |
|
Memory Barrier Instructions |
|
|
87 | (1) |
|
|
87 | (2) |
|
|
89 | (2) |
|
|
91 | (1) |
|
Dedicated Bit Manipulation Instructions |
|
|
92 | (1) |
|
|
93 | (1) |
|
Nested Vector Interrupt Controller |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
96 | (1) |
|
Interrupt Handling—Exit Important! |
|
|
97 | (1) |
|
Exercise 3.3 SysTick Interrupt |
|
|
97 | (5) |
|
Cortex-M Processor Exceptions |
|
|
102 | (2) |
|
|
103 | (1) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
104 | (1) |
|
Enabling Fault Exceptions |
|
|
104 | (1) |
|
|
104 | (2) |
|
|
106 | (1) |
|
|
107 | (1) |
|
|
107 | (3) |
|
|
108 | (1) |
|
|
109 | (1) |
|
|
110 | (1) |
|
Exercise 3.3 Working with Multiple Interrupts |
|
|
110 | (5) |
|
|
115 | (1) |
|
|
116 | (5) |
|
|
121 | (5) |
|
|
123 | (1) |
|
Configuring the Low-Power Modes |
|
|
123 | (1) |
|
Exercise 3.3 Low-Power Modes |
|
|
124 | (2) |
|
Moving From the Cortex-M3 |
|
|
126 | (1) |
|
|
127 | (1) |
|
|
127 | (2) |
|
|
129 | (1) |
|
|
130 | (1) |
Chapter 4 Cortex Microcontroller Software Interface Standard |
|
131 | (24) |
|
|
131 | (2) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
135 | (1) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
137 | (2) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
141 | (2) |
|
|
143 | (1) |
|
Interrupts and Exceptions |
|
|
144 | (3) |
|
Exercise 4.1 CMSIS and User Code Comparison |
|
|
147 | (2) |
|
CMSIS-Core Register Access |
|
|
148 | (1) |
|
CMSIS-Core CPU Intrinsic Instructions |
|
|
149 | (1) |
|
Exercise 4.2 Intrinsic Bit Manipulation |
|
|
150 | (1) |
|
|
151 | (1) |
|
CMSIS-Core Debug Functions |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
CMSIS-Core Functions for Corex-M7 |
|
|
153 | (1) |
|
|
153 | (2) |
Chapter 5 Advanced Architecture Features |
|
155 | (34) |
|
|
155 | (1) |
|
Cortex Processor Operating Modes |
|
|
155 | (3) |
|
Exercise 5.1 Stack Configuration |
|
|
158 | (3) |
|
|
161 | (2) |
|
Exercise 5.2 Supervisor Call |
|
|
163 | (3) |
|
|
166 | (1) |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
169 | (3) |
|
Exercise 5.4 Exclusive Access |
|
|
172 | (1) |
|
|
173 | (2) |
|
|
175 | (3) |
|
Exercise 5.5 MPU Configuration |
|
|
178 | (6) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
185 | (2) |
|
|
187 | (2) |
Chapter 6 Cortex-M7 Processor |
|
189 | (28) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
191 | (2) |
|
|
193 | (2) |
|
|
195 | (2) |
|
Exercise 6.2 Locating Code and Data into the TCM |
|
|
197 | (2) |
|
|
199 | (1) |
|
|
200 | (3) |
|
|
203 | (1) |
|
Exercise 6.3 Instruction Cache |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
205 | (1) |
|
Exercise 6.4 Example Data Cache |
|
|
206 | (1) |
|
Memory Protection Unit and Cache Configuration |
|
|
206 | (1) |
|
|
207 | (2) |
|
|
209 | (1) |
|
|
209 | (1) |
|
Disable Caching over a Region of System Memory |
|
|
209 | (1) |
|
Change the Cache Policy for a Region of System Memory |
|
|
209 | (1) |
|
Use the Cache Management Functions to Guarantee Coherency |
|
|
209 | (1) |
|
Exercise 6.5 Data Cache Configuration |
|
|
209 | (4) |
|
Double Precision Floating Point Unit |
|
|
213 | (1) |
|
|
214 | (1) |
|
Cortex-M7 Safety Features |
|
|
215 | (1) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
216 | (1) |
Chapter 7 Debugging with CoreSight |
|
217 | (38) |
|
|
217 | (2) |
|
|
219 | (1) |
|
|
220 | (1) |
|
CoreSight Debug Architecture |
|
|
221 | (1) |
|
Exercise 7.1 CoreSight Debug |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
223 | (6) |
|
|
229 | (1) |
|
|
229 | (1) |
|
Exercise 7.2 Setting Up the ITM |
|
|
230 | (3) |
|
System Control Block Debug Support |
|
|
233 | (1) |
|
|
234 | (1) |
|
Exercise 7.3 Processor Fault Exceptions |
|
|
235 | (4) |
|
Instruction Trace with the Embedded Trace Macrocell |
|
|
239 | (2) |
|
Exercise 7.4 Using the ETM Trace |
|
|
241 | (3) |
|
|
244 | (1) |
|
|
245 | (1) |
|
Exercise 7.5 Micro Trace Buffer |
|
|
246 | (2) |
|
CMSIS System Viewer Description |
|
|
248 | (1) |
|
|
249 | (5) |
|
Conclusion Debug Features Summary |
|
|
254 | (1) |
Chapter 8 Practical DSP for Cortex-M4 and Cortex-M7 |
|
255 | (38) |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
257 | (1) |
|
|
258 | (1) |
|
|
258 | (1) |
|
|
258 | (1) |
|
|
259 | (1) |
|
Exercise 8.1 Floating Point Unit |
|
|
259 | (6) |
|
Cortex-M4/M7 DSP and SIMD Instructions |
|
|
265 | (4) |
|
Exercise 8.2 SIMD Instructions |
|
|
269 | (3) |
|
Exercise 8.3 Optimizing DSP Algorithms |
|
|
272 | (7) |
|
|
279 | (1) |
|
CMSIS-DSP Library Functions |
|
|
279 | (1) |
|
Exercise 8.3 Using the CMSIS-DSP Library |
|
|
280 | (5) |
|
DSP Data Processing Techniques |
|
|
285 | (1) |
|
Exercise 8.4 FIR Filter with Block Processing |
|
|
286 | (3) |
|
Fixed Point DSP with Q Numbers |
|
|
289 | (1) |
|
Exercise 8.5 Fixed Point FFT Transform |
|
|
290 | (2) |
|
|
292 | (1) |
Chapter 9 Cortex Microcontroller Software Interface Standard-Real-Time Operating System |
|
293 | (58) |
|
|
293 | (1) |
|
First Steps with CMSIS-RTOS |
|
|
294 | (1) |
|
Accessing the CMSIS-RTOS API |
|
|
294 | (1) |
|
|
295 | (1) |
|
|
296 | (1) |
|
Exercise 9.1 A First CMSIS-RTOS Project |
|
|
297 | (9) |
|
|
306 | (1) |
|
Exercise 9.2 Creating and Managing Threads |
|
|
307 | (3) |
|
Thread Management and Priority |
|
|
310 | (1) |
|
Exercise 9.3 Creating and Managing Threads II |
|
|
311 | (1) |
|
|
312 | (1) |
|
Exercise 9.4 Multiple Thread Instances |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
314 | (1) |
|
|
315 | (1) |
|
Exercise 9.5 Time Management |
|
|
315 | (1) |
|
|
316 | (1) |
|
Exercise 9.6 Virtual Timer |
|
|
317 | (2) |
|
|
319 | (1) |
|
|
319 | (1) |
|
|
320 | (3) |
|
Inter-Thread Communication |
|
|
323 | (1) |
|
|
323 | (1) |
|
|
324 | (1) |
|
|
325 | (1) |
|
Exercise 9.9 Semaphore Signaling |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
329 | (1) |
|
|
330 | (1) |
|
|
330 | (1) |
|
|
331 | (1) |
|
Exercise 9.12 Semaphore Barrier |
|
|
332 | (1) |
|
|
332 | (1) |
|
|
333 | (1) |
|
|
333 | (2) |
|
|
335 | (1) |
|
|
335 | (2) |
|
|
337 | (1) |
|
Exercise 9.14 Message Queue |
|
|
338 | (1) |
|
|
339 | (1) |
|
Exercise 9.15 Memory Pool |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
|
344 | (2) |
|
System Timer Configuration |
|
|
346 | (1) |
|
|
346 | (1) |
|
|
346 | (2) |
|
|
347 | (1) |
|
|
347 | (1) |
|
Round-Robin Preemptive Scheduling |
|
|
348 | (1) |
|
|
348 | (1) |
|
|
348 | (1) |
|
|
349 | (1) |
|
|
350 | (1) |
Chapter 10 RTOS Techniques |
|
351 | (36) |
|
|
351 | (1) |
|
|
351 | (1) |
|
|
352 | (2) |
|
Exercise 10.1 RTOS Interrupt Exercise Handling |
|
|
354 | (1) |
|
User Supervisor Functions |
|
|
355 | (1) |
|
Exercise 10.2 RTOS and User SVC Exceptions |
|
|
356 | (2) |
|
|
358 | (1) |
|
Power Management First Steps |
|
|
358 | (2) |
|
Power Management Strategy |
|
|
360 | (2) |
|
|
362 | (1) |
|
|
363 | (1) |
|
Exercise 10.3 Power and Watchdog Management |
|
|
364 | (5) |
|
|
369 | (1) |
|
|
370 | (5) |
|
Buffering Techniques—The Double or Circular Buffer |
|
|
370 | (1) |
|
Buffering Techniques FIFO Message Queue |
|
|
371 | (4) |
|
|
375 | (1) |
|
Exercise 10.4 RTX Real Time |
|
|
375 | (5) |
|
Shouldering the Load, the Direct Memory Access Controller |
|
|
380 | (1) |
|
|
381 | (1) |
|
Exercise 10.5 Run-Time Diagnostics |
|
|
382 | (3) |
|
|
385 | (2) |
Chapter 11 Test Driven Development |
|
387 | (24) |
|
|
387 | (3) |
|
The TDD Development Cycle |
|
|
389 | (1) |
|
|
389 | (1) |
|
|
389 | (1) |
|
Installing the Unity Framework |
|
|
390 | (1) |
|
Exercise 11.1 Test Driven Development |
|
|
390 | (12) |
|
Adding the Unity Test Framework |
|
|
391 | (2) |
|
Configuring the Project Build Targets |
|
|
393 | (4) |
|
|
397 | (2) |
|
|
399 | (3) |
|
|
402 | (2) |
|
Exercise 11.2 Testing RTOS Threads |
|
|
404 | (3) |
|
Decoupling Low Level Functions |
|
|
405 | (1) |
|
|
406 | (1) |
|
Exercise 11.3 Testing with Interrupts |
|
|
407 | (2) |
|
|
409 | (2) |
Chapter 12 Software Components |
|
411 | (34) |
|
|
411 | (1) |
|
|
412 | (7) |
|
|
413 | (1) |
|
Exercise 12.1 CMSIS-Driver |
|
|
414 | (5) |
|
|
419 | (5) |
|
Exercise 12.2 Driver Validation |
|
|
419 | (5) |
|
Designing a Software Component |
|
|
424 | (3) |
|
Exercise 12.3 GPS Component |
|
|
424 | (3) |
|
|
427 | (12) |
|
|
427 | (1) |
|
|
428 | (11) |
|
|
439 | (4) |
|
Exercise 12.4 Configuration Wizard |
|
|
440 | (3) |
|
Deploying Software Components |
|
|
443 | (1) |
|
|
444 | (1) |
Chapter 13 ARMv8-M |
|
445 | (12) |
|
|
445 | (1) |
|
Common Architectural Enhancements |
|
|
446 | (1) |
|
ARMv8 Baseline Enhancements |
|
|
446 | (1) |
|
ARMv8-M Mainline Enhancements |
|
|
447 | (1) |
|
|
448 | (6) |
|
Interrupts and Exceptions |
|
|
451 | (3) |
|
|
454 | (1) |
|
|
454 | (1) |
|
Real-Time Operating System |
|
|
454 | (1) |
|
|
454 | (1) |
|
Cortex Microcontroller Software Interface Standard |
|
|
455 | (1) |
|
|
455 | (2) |
Appendix |
|
457 | (4) |
Index |
|
461 | |