Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 544 of 547
NXP Semiconductors
UM10398
Chapter 29: Supplementary information
26.5.13 Compare <address1> <address2> <no of bytes>
(UART ISP). . . . . . . . . . . . . . . . . . . . . . . . . . 432
26.5.14 ReadUID (UART ISP). . . . . . . . . . . . . . . . . . 433
26.5.15 UART ISP Return Codes . . . . . . . . . . . . . . . 433
26.6 C_CAN communication protocol . . . . . . . . . 434
26.6.1 C_CAN ISP SDO communication. . . . . . . . . 435
26.6.2 C_CAN ISP object directory . . . . . . . . . . . . . 435
26.6.3 Unlock (C_CAN ISP) . . . . . . . . . . . . . . . . . . 436
26.6.4 Write to RAM (C_CAN ISP) . . . . . . . . . . . . . 436
26.6.5 Read memory (C_CAN ISP). . . . . . . . . . . . . 436
26.6.6 Prepare sectors for write operation
(C_CAN ISP) . . . . . . . . . . . . . . . . . . . . . . . . 436
26.6.7 Copy RAM to flash (C_CAN ISP) . . . . . . . . . 436
26.6.8 Go (C_CAN ISP) . . . . . . . . . . . . . . . . . . . . . 437
26.6.9 Erase sectors (C_CAN ISP) . . . . . . . . . . . . . 437
26.6.10 Blank check sectors (C_CAN ISP) . . . . . . . . 437
26.6.11 Read PartID (C_CAN ISP) . . . . . . . . . . . . . . 437
26.6.12 Read boot code version (C_CAN ISP) . . . . . 437
26.6.13 Read serial number (C_CAN ISP) . . . . . . . . 437
26.6.14 Compare (C_CAN ISP). . . . . . . . . . . . . . . . . 437
26.6.15 C_CAN ISP SDO abort codes . . . . . . . . . . . 437
26.6.16 Differences to fully-compliant CANopen. . . . 438
26.7 IAP commands. . . . . . . . . . . . . . . . . . . . . . . . 438
26.7.1 Prepare sector(s) for write operation (IAP). . 440
26.7.2 Copy RAM to flash (IAP) . . . . . . . . . . . . . . . 441
26.7.3 Erase Sector(s) (IAP) . . . . . . . . . . . . . . . . . . 442
26.7.4 Blank check sector(s) (IAP) . . . . . . . . . . . . . 442
26.7.5 Read Part Identification number (IAP) . . . . . 442
26.7.6 Read Boot code version number (IAP) . . . . 443
26.7.7 Compare <address1> <address2> <no of bytes>
(IAP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
26.7.8 Reinvoke ISP (IAP) . . . . . . . . . . . . . . . . . . . 444
26.7.9 ReadUID (IAP). . . . . . . . . . . . . . . . . . . . . . . 444
26.7.10 Erase page. . . . . . . . . . . . . . . . . . . . . . . . . . 444
26.7.11 IAP Status Codes. . . . . . . . . . . . . . . . . . . . . 445
26.8 Debug notes . . . . . . . . . . . . . . . . . . . . . . . . . 445
26.8.1 Comparing flash images . . . . . . . . . . . . . . . 445
26.8.2 Serial Wire Debug (SWD) flash programming
interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
26.9 Flash memory access. . . . . . . . . . . . . . . . . . 446
26.10 Flash signature generation . . . . . . . . . . . . . 447
26.10.1 Register description for signature generation 447
26.10.1.1 Signature generation address and control
registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
26.10.1.2 Signature generation result registers. . . . . . 448
26.10.1.3 Flash Module Status register . . . . . . . . . . . 449
26.10.1.4 Flash Module Status Clear register . . . . . . . 449
26.10.2 Algorithm and procedure for signature
generation . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Signature generation . . . . . . . . . . . . . . . . . . . 449
Content verification . . . . . . . . . . . . . . . . . . . . 450
Chapter 27: LPC111x/LPC11Cxx Serial Wire Debug (SWD)
27.1 How to read this chapter. . . . . . . . . . . . . . . . 451
27.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
27.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 451
27.4 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
27.5 Pin description . . . . . . . . . . . . . . . . . . . . . . . 451
27.6 Debug notes . . . . . . . . . . . . . . . . . . . . . . . . . 452
27.6.1 Debug limitations . . . . . . . . . . . . . . . . . . . . . 452
27.6.2 Debug connections . . . . . . . . . . . . . . . . . . . 452
Chapter 28: LPC111x/LPC11Cxx Appendix: ARM Cortex-M0 reference
28.1 How to read this chapter. . . . . . . . . . . . . . . . 453
28.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 453
28.3 About the Cortex-M0 processor and core
peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
28.3.1 System-level interface . . . . . . . . . . . . . . . . . 454
28.3.2 Integrated configurable debug . . . . . . . . . . . 454
28.3.3 Cortex-M0 processor features summary . . . 454
28.3.4 Cortex-M0 core peripherals . . . . . . . . . . . . . 455
28.4 Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
28.4.1 Programmers model. . . . . . . . . . . . . . . . . . . 455
28.4.1.1 Processor modes . . . . . . . . . . . . . . . . . . . . . 455
28.4.1.2 Stacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
28.4.1.3 Core registers . . . . . . . . . . . . . . . . . . . . . . . 455
28.4.1.3.1 General-purpose registers . . . . . . . . . . . . . . 456
28.4.1.3.2 Stack Pointer . . . . . . . . . . . . . . . . . . . . . . . . 456
28.4.1.3.3 Link Register . . . . . . . . . . . . . . . . . . . . . . . . 457
28.4.1.3.4 Program Counter . . . . . . . . . . . . . . . . . . . . . 457
28.4.1.3.5 Program Status Register . . . . . . . . . . . . . . . 457
28.4.1.3.6 Exception mask register . . . . . . . . . . . . . . . . 459
28.4.1.3.7 CONTROL register. . . . . . . . . . . . . . . . . . . . 459
28.4.1.4 Exceptions and interrupts . . . . . . . . . . . . . . . 460
28.4.1.5 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . 460
28.4.1.6 The Cortex Microcontroller Software Interface
Standard. . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
28.4.2 Memory model . . . . . . . . . . . . . . . . . . . . . . . 461
28.4.2.1 Memory regions, types and attributes . . . . . 462
28.4.2.2 Memory system ordering of memory accesses . .
463
28.4.2.3 Behavior of memory accesses . . . . . . . . . . 463
28.4.2.4 Software ordering of memory accesses. . . . 464
28.4.2.5 Memory endianness. . . . . . . . . . . . . . . . . . . 465
28.4.2.5.1 Little-endian format . . . . . . . . . . . . . . . . . . . 465
28.4.3 Exception model . . . . . . . . . . . . . . . . . . . . . 465
28.4.3.1 Exception states. . . . . . . . . . . . . . . . . . . . . . 465
28.4.3.2 Exception types . . . . . . . . . . . . . . . . . . . . . . 466
28.4.3.3 Exception handlers . . . . . . . . . . . . . . . . . . . 467
28.4.3.4 Vector table . . . . . . . . . . . . . . . . . . . . . . . . . 467
28.4.3.5 Exception priorities. . . . . . . . . . . . . . . . . . . . 468
28.4.3.6 Exception entry and return. . . . . . . . . . . . . . 469
28.4.3.6.1 Exception entry . . . . . . . . . . . . . . . . . . . . . . 469
28.4.3.6.2 Exception return. . . . . . . . . . . . . . . . . . . . . . 470
28.4.4 Fault handling . . . . . . . . . . . . . . . . . . . . . . . 471
28.4.4.1 Lockup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471