Sign In
Upload
Manuals
Brands
NXP Semiconductors Manuals
Microcontrollers
LPC1758
NXP Semiconductors LPC1758 Manuals
Manuals and User Guides for NXP Semiconductors LPC1758. We have
2
NXP Semiconductors LPC1758 manuals available for free PDF download: User Manual
NXP Semiconductors LPC1758 User Manual (841 pages)
ARM, ARM Cortex-M3, 32-bit, USB, Ethernet, CAN, I2S, Microcontroller
Brand:
NXP Semiconductors
| Category:
Microcontrollers
| Size: 3 MB
Table of Contents
Chapter 1: Lpc176X/5X Introductory Information
4
Introduction
4
Features
5
Applications
7
Ordering Information
8
Part Options Summary
8
Simplified Block Diagram
9
Chapter 35 : Supplementary Information
10
Architectural Overview
10
ARM Cortex-M3 Processor
10
Cortex-M3 Configuration Options
10
System Options
10
Debug Related Options
11
On-Chip Flash Memory System
11
On-Chip Static RAM
11
Block Diagram
12
Chapter 2: Lpc176X/5X Memory Map
13
Memory Map and Peripheral Addressing
13
Memory Maps
13
APB Peripheral Addresses
15
Memory Re-Mapping
16
Boot ROM Re-Mapping
16
AHB Arbitration
16
Bus Fault Exceptions
16
Chapter 3: Lpc176X/5X System Control
18
Introduction
18
Pin Description
18
Register Description
19
Reset
19
Reset Source Identification Register (RSID - 0X400F C180)
22
Brown-Out Detection
23
External Interrupt Inputs
24
Register Description
25
0X400F C140
25
0X400F C148)
26
0X400F C14C)
27
Other System Controls and Status Flags
29
System Controls and Status Register (SCS - 0X400F C1A0)
29
Chapter 4: Lpc176X/5X Clocking and Power Control
30
Summary of Clocking and Power Control Functions
30
Register Description
31
Oscillators
32
Internal RC Oscillator
32
Main Oscillator
32
RTC Oscillator
34
Clock Source Selection Multiplexer
35
Clock Source Select Register (CLKSRCSEL - 0X400F C10C)
35
PLL0 (Phase Locked Loop 0)
36
PLL0 Operation
36
PLL0 and Startup/Boot Code Interaction
36
PLL0 Register Description
37
PLL0 Control Register (PLL0CON - 0X400F C080)
37
PLL0 Configuration Register (PLL0CFG - 0X400F C084)
38
PLL0 Status Register (PLL0STAT - 0X400F C088)
39
PLL0 Interrupt: PLOCK0
40
PLL0 Modes
40
PLL0 Feed Register (PLL0FEED - 0X400F C08C)
41
PLL0 and Power-Down Mode
41
PLL0 Frequency Calculation
41
Procedure for Determining PLL0 Settings
43
Examples of PLL0 Settings
44
Example 1
44
Example 2
44
Example 3
45
PLL0 Setup Sequence
47
PLL1 (Phase Locked Loop 1)
48
PLL1 Register Description
48
PLL1 Control Register
48
C0A0)
49
PLL1 Configuration Register (PLL1CFG - 0X400F C0A4)
50
PLL1 Status Register (PLL1STAT - 0X400F C0A8)
50
PLL1 Modes
51
PLL1 Interrupt: PLOCK1
51
PLL1 Feed Register
52
C0Ac)
52
PLL1 and Power-Down Mode
52
PLL1 Frequency Calculation
53
Procedure for Determining PLL1 Settings
53
Clock Dividers
55
CPU Clock Configuration Register (CCLKCFG - 0X400F C104)
55
USB Clock Configuration Register (USBCLKCFG - 0X400F C108)
56
Peripheral Clock Selection Registers 0 and 1
57
Power Control
59
Sleep Mode
59
Deep Sleep Mode
59
Power-Down Mode
60
Deep Power-Down Mode
61
Peripheral Power Control
61
Register Description
61
Power Mode Control Register (PCON - 0X400F C0C0)
62
Encoding of Reduced Power Modes
63
Wake-Up from Reduced Power Modes
63
Power Control for Peripherals Register (PCONP - 0X400F C0C4)
63
Power Control Usage Notes
65
Power Domains
65
Wake-Up Timer
66
External Clock Output Pin
67
Clock Output Configuration Register
67
Chapter 5: Lpc176X/5X Flash Accelerator
69
Introduction
69
Flash Accelerator Blocks
69
Flash Memory Bank
69
Flash Programming Issues
70
Register Description
70
Flash Accelerator Configuration Register
71
Operation
71
Chapter 6: Lpc176X/5X Nested Vectored Interrupt Controller (NVIC)
73
Features
73
Description
73
Interrupt Sources
73
Vector Table Remapping
76
Examples
76
Register Description
77
Interrupt Set-Enable Register 0 Register (ISER0 - 0Xe000 E100)
78
Interrupt Set-Enable Register 1 Register (ISER1 - 0Xe000 E104)
79
Interrupt Clear-Enable Register 0 (ICER0 - 0Xe000 E180)
80
Interrupt Clear-Enable Register 1 Register (ICER1 - 0Xe000 E184)
81
Interrupt Set-Pending Register 0 Register (ISPR0 - 0Xe000 E200)
82
Interrupt Set-Pending Register 1 Register (ISPR1 - 0Xe000 E204)
83
(ICPR0 - 0Xe000 E280)
84
Interrupt Clear-Pending Register 1 Register
85
(ICPR1 - 0Xe000 E284)
85
Interrupt Active Bit Register 0 (IABR0 - 0Xe000 E300)
86
Interrupt Active Bit Register 1 (IABR1 - 0Xe000 E304)
87
Interrupt Priority Register 0 (IPR0 - 0Xe000 E400)
88
Interrupt Priority Register 1 (IPR1 - 0Xe000 E404)
88
Interrupt Priority Register 2 (IPR2 - 0Xe000 E408)
88
Interrupt Priority Register 3 (IPR3 - 0Xe000 E40C)
89
Interrupt Priority Register 4 (IPR4 - 0Xe000 E410)
89
Interrupt Priority Register 5 (IPR5 - 0Xe000 E414)
89
Interrupt Priority Register 6 (IPR6 - 0Xe000 E418)
90
Interrupt Priority Register 7 (IPR7 - 0Xe000 E41C)
90
Interrupt Priority Register 8 (IPR8 - 0Xe000 E420)
90
Software Trigger Interrupt Register (STIR - 0Xe000 EF00)
91
Chapter 7: Lpc176X/5X Pin Configuration
92
Lpc176X/5X Pin Configuration
92
Lpc176X/5X Pin Description
95
Chapter 8: Lpc176X/5X Pin Connect Block
105
How to Read this Chapter
105
Description
105
Pin Function Select Register Values
105
Multiple Connections
106
Pin Mode Select Register Values
106
Function of PINMODE in Open Drain Mode
107
Register Description
108
Pin Control Module Register Reset Values
108
Pin Function Select Register 0 (PINSEL0 - 0X4002 C000)
109
Pin Function Select Register 1 (PINSEL1 - 0X4002 C004)
109
Pin Function Select Register 2 (PINSEL2 - 0X4002 C008)
110
Pin Function Select Register 3 (PINSEL3 - 0X4002 C00C)
110
Pin Function Select Register 4 (PINSEL4 - 0X4002 C010)
111
Pin Function Select Register 7 (PINSEL7 - 0X4002 C01C)
112
Pin Function Select Register 9 (PINSEL9 - 0X4002 C024)
112
Pin Function Select Register 10 (PINSEL10 - 0X4002 C028)
112
Pin Mode Select Register 0 (PINMODE0 - 0X4002 C040)
113
Pin Mode Select Register 1 (PINMODE1 - 0X4002 C044)
113
Pin Mode Select Register 2 (PINMODE2 - 0X4002 C048)
114
Pin Mode Select Register 3 (PINMODE3 - 0X4002 C04C)
114
Pin Mode Select Register 4 (PINMODE4 - 0X4002 C050)
115
Pin Mode Select Register 7 (PINMODE7 - 0X4002 C05C)
116
Pin Mode Select Register 9 (PINMODE9 - 0X4002 C064)
116
Open Drain Pin Mode Select Register 0 (PINMODE_OD0 - 0X4002 C068)
116
Open Drain Pin Mode Select Register
117
(PINMODE_OD1 - 0X4002 C06C)
117
Open Drain Pin Mode Select Register 2 (PINMODE_OD2 - 0X4002 C070)
118
Open Drain Pin Mode Select Register 3 (PINMODE_OD3 - 0X4002 C074)
119
Open Drain Pin Mode Select Register 4 (PINMODE_OD4 - 0X4002 C078)
119
C Pin Configuration Register (I2CPADCFG - 0X4002 C07C)
120
Chapter 9 : Lpc176X/5X General Purpose Input/Output (GPIO)
121
Basic Configuration
121
Features
121
Digital I/O Ports
121
Interrupt Generating Digital Ports
121
Applications
122
Pin Description
122
Register Description
123
GPIO Port Direction Register Fioxdir (FIO0DIR to FIO4DIR- 0X2009 C000 to 0X2009 C080)
124
GPIO Port Output Set Register Fioxset (FIO0SET to FIO4SET - 0X2009 C018 to 0X2009 C098)
125
GPIO Port Output Clear Register Fioxclr (FIO0CLR to FIO4CLR- 0X2009 C01C to 0X2009 C09C)
127
GPIO Port Pin Value Register Fioxpin (FIO0PIN to FIO4PIN- 0X2009 C014 to 0X2009 C094)
128
Fast GPIO Port Mask Register Fioxmask (FIO0MASK to FIO4MASK - 0X2009 C010 to 0X2009 C090)
130
GPIO Interrupt Registers
132
GPIO Overall Interrupt Status Register (Iointstatus - 0X4002 8080)
132
GPIO Interrupt Enable for Port 0 Rising Edge (Io0Intenr - 0X4002 8090)
132
GPIO Interrupt Enable for Port 2 Rising Edge (Io2Intenr - 0X4002 80B0)
133
GPIO Interrupt Enable for Port 0 Falling Edge (Io0Intenf - 0X4002 8094)
134
GPIO Interrupt Enable for Port 2 Falling Edge (Io2Intenf - 0X4002 80B4)
135
GPIO Interrupt Status for Port 0 Rising Edge Interrupt (Io0Intstatr - 0X4002 8084)
136
GPIO Interrupt Status for Port 2 Rising Edge Interrupt (Io2Intstatr - 0X4002 80A4)
137
GPIO Interrupt Status for Port 0 Falling Edge Interrupt (Io0Intstatf - 0X4002 8088)
137
GPIO Interrupt Status for Port 2 Falling Edge Interrupt (Io2Intstatf - 0X4002 80A8)
138
GPIO Interrupt Clear Register for Port 0 (Io0Intclr - 0X4002 808C)
139
GPIO Interrupt Clear Register for Port 2 (Io2Intclr - 0X4002 80AC)
140
GPIO Usage Notes
141
Example: an Instantaneous Output of 0S and 1S on a GPIO Port
141
Writing to FIOSET/FIOCLR Vs. FIOPIN
141
Chapter 10: Lpc176X/5X Ethernet
142
Basic Configuration
142
Introduction
142
Features
143
Architecture and Operation
144
DMA Engine Functions
145
Overview of DMA Operation
145
Ethernet Packet
146
Overview
147
Partitioning
147
Example PHY Devices
148
Pin Description
148
Registers and Software Interface
149
Register Map
149
Ethernet MAC Register Definitions
151
MAC Configuration Register 1 (MAC1 - 0X5000 0000)
151
MAC Configuration Register 2 (MAC2 - 0X5000 0004)
151
Back-To-Back Inter-Packet-Gap Register (IPGT - 0X5000 0008)
153
Non Back-To-Back Inter-Packet-Gap Register (IPGR - 0X5000 000C)
153
Collision Window / Retry Register (CLRT - 0X5000 0010)
154
Maximum Frame Register (MAXF - 0X5000 0014)
154
PHY Support Register (SUPP - 0X5000 0018)
154
Test Register (TEST - 0X5000 001C)
154
MII Mgmt Configuration Register (MCFG - 0X5000 0020)
155
MII Mgmt Command Register
156
0X5000 0024)
156
MII Mgmt Address Register
156
0X5000 0028)
156
MII Mgmt Write Data Register
156
0X5000 002C)
156
MII Mgmt Read Data Register
157
0X5000 0030)
157
MII Mgmt Indicators Register
157
0X5000 0034)
157
Station Address 0 Register
158
Station Address 1 Register
158
Station Address 2 Register
158
Control Register Definitions
159
Command Register (Command - 0X5000 0100)
159
Status Register (Status - 0X5000 0104)
159
Receive Descriptor Base Address Register (Rxdescriptor - 0X5000 0108)
160
Receive Status Base Address Register (Rxstatus - 0X5000 010C)
160
Receive Number of Descriptors Register (Rxdescriptor - 0X5000 0110)
160
Receive Produce Index Register (Rxproduceindex - 0X5000 0114)
161
Receive Consume Index Register (Rxconsumeindex - 0X5000 0118)
161
Transmit Descriptor Base Address Register (Txdescriptor - 0X5000 011C)
162
Transmit Status Base Address Register (Txstatus - 0X5000 0120)
162
Transmit Number of Descriptors Register (Txdescriptornumber - 0X5000 0124)
162
Transmit Produce Index Register (Txproduceindex - 0X5000 0128)
163
Transmit Consume Index Register (Txconsumeindex - 0X5000 012C)
163
Transmit Status Vector 0 Register
163
0X5000 0158)
163
Transmit Status Vector 1 Register
164
0X5000 015C)
164
Receive Status Vector Register
165
0X5000 0160)
165
Flow Control Counter Register (Flowcontrolcounter - 0X5000 0170)
166
Flow Control Status Register
166
0X5000 0174)
166
Receive Filter Register Definitions
167
Receive Filter Control Register
167
0X5000 0200)
167
Receive Filter Wol Status Register
167
Receive Filter Wol Clear Register (Rxfilterwolclear - 0X5000 0208)
168
Hash Filter Table Lsbs Register (Hashfilterl - 0X5000 0210)
168
Hash Filter Table Msbs Register
169
0X5000 0214)
169
Module Control Register Definitions
169
Interrupt Status Register
169
0X5000 0FE0)
169
Interrupt Enable Register
170
0X5000 0FE4)
170
0Fe8)
170
Interrupt Set Register (Intset - 0X5000 0FEC)
171
Power-Down Register
172
0X5000 0FF4)
172
Descriptor and Status Formats
173
Receive Descriptors and Statuses
173
Transmit Descriptors and Statuses
176
Ethernet Block Functional Description
178
Overview
178
AHB Interface
179
Interrupts
179
Direct Memory Access (DMA)
179
Initialization
182
Transmit Process
183
Receive Process
189
Transmission Retry
195
Status Hash CRC Calculations
195
Duplex Modes
196
IEE 802.3/Clause 31 Flow Control
196
Half-Duplex Mode Backpressure
198
Receive Filtering
199
Power Management
201
Wake-Up on LAN
201
Enabling and Disabling Receive and Transmit
203
Transmission Padding and CRC
205
Huge Frames and Frame Length Checking
206
Statistics Counters
206
MAC Status Vectors
206
Reset
207
Ethernet Errors
208
AHB Bandwidth
209
DMA Access
209
Types of CPU Access
210
Overall Bandwidth
210
CRC Calculation
212
Chapter 11 : Lpc176X/5X USB Device Controller
214
How to Read this Chapter
214
Basic Configuration
214
Introduction
214
Features
215
Fixed Endpoint Configuration
215
Functional Description
216
Analog Transceiver
217
Serial Interface Engine (SIE)
217
Endpoint RAM (EP_RAM)
217
EP_RAM Access Control
217
DMA Engine and Bus Master Interface
218
Register Interface
218
Softconnect
218
Goodlink
218
Operational Overview
218
Pin Description
219
Clocking and Power Management
219
Power Requirements
219
Clocks
219
Power Management Support
220
Remote Wake-Up
221
Register Description
221
Clock Control Registers
222
USB Clock Control Register
222
0X5000 CFF4)
222
USB Clock Status Register
223
Cff8)
223
Device Interrupt Registers
223
USB Interrupt Status Register
223
0X5000 C1C0)
223
USB Device Interrupt Status Register
224
(Usbdevintst - 0X5000 C200)
224
USB Device Interrupt Enable Register (Usbdevinten - 0X5000 C204)
225
USB Device Interrupt Clear Register (Usbdevintclr - 0X5000 C208)
225
USB Device Interrupt Set Register
226
0X5000 C20C)
226
USB Device Interrupt Priority Register (Usbdevintpri - 0X5000 C22C)
227
Endpoint Interrupt Registers
227
USB Endpoint Interrupt Status Register (Usbepintst - 0X5000 C230)
227
USB Endpoint Interrupt Enable Register (Usbepinten - 0X5000 C234)
228
USB Endpoint Interrupt Clear Register (Usbepintclr - 0X5000 C238)
229
USB Endpoint Interrupt Set Register
230
0X5000 C23C)
230
USB Endpoint Interrupt Priority Register (Usbepintpri - 0X5000 C240)
230
Endpoint Realization Registers
231
EP RAM Requirements
231
USB Realize Endpoint Register
232
0X5000 C244)
232
C248)
233
0X5000 C24C)
233
USB Transfer Registers
234
USB Receive Data Register (Usbrxdata - 0X5000 C218)
234
USB Receive Packet Length Register (Usbrxplen - 0X5000 C220)
234
USB Transmit Data Register (Usbtxdata - 0X5000 C21C)
234
USB Transmit Packet Length Register (Usbtxplen - 0X5000 C224)
235
USB Control Register
235
C228)
235
SIE Command Code Registers
236
USB Command Code Register
236
0X5000 C210)
236
USB Command Data Register
236
0X5000 C214)
236
DMA Registers
236
USB DMA Request Status Register
236
0X5000 C250)
236
USB DMA Request Clear Register
237
0X5000 C254)
237
USB DMA Request Set Register
238
0X5000 C258)
238
USB UDCA Head Register
238
C280)
238
USB EP DMA Status Register
238
0X5000 C284)
238
USB EP DMA Enable Register
239
0X5000 C288)
239
USB EP DMA Disable Register
239
0X5000 C28C)
239
USB DMA Interrupt Status Register
239
0X5000 C290)
239
USB DMA Interrupt Enable Register (Usbdmainten - 0X5000 C294)
240
USB End of Transfer Interrupt Status Register (Usbeotintst - 0X5000 C2A0)
240
USB End of Transfer Interrupt Clear Register (Usbeotintclr - 0X5000 C2A4)
241
USB End of Transfer Interrupt Set Register (Usbeotintset - 0X5000 C2A8)
241
USB New DD Request Interrupt Status Register (Usbnddrintst - 0X5000 C2AC)
241
USB New DD Request Interrupt Clear Register (Usbnddrintclr - 0X5000 C2B0)
241
USB New DD Request Interrupt Set Register (Usbnddrintset - 0X5000 C2B4)
241
USB System Error Interrupt Status Register (Usbsyserrintst - 0X5000 C2B8)
242
USB System Error Interrupt Clear Register (Usbsyserrintclr - 0X5000 C2BC)
242
USB System Error Interrupt Set Register (Usbsyserrintset - 0X5000 C2C0)
242
Interrupt Handling
242
Slave Mode
243
DMA Mode
243
Serial Interface Engine Command Description
245
Set Address
246
Byte)
246
Configure Device
246
Set Mode (Command: 0Xf3, Data: Write 1 Byte)
247
Read Current Frame Number (Command: 0Xf5, Data: Read 1 or 2 Bytes)
247
Read Test Register (Command: 0Xfd, Data: Read 2 Bytes)
248
Set Device Status (Command: 0Xfe, Data: Write 1 Byte)
248
Get Device Status (Command: 0Xfe, Data: Read 1 Byte)
249
Get Error Code (Command: 0Xff, Data: Read 1 Byte)
249
Read Error Status (Command: 0Xfb, Data: Read 1 Byte)
250
Select Endpoint (Command: 0X00 - 0X1F, Data: Read 1 Byte (Optional))
250
Select Endpoint/Clear Interrupt (Command: 0X40 - 0X5F, Data: Read 1 Byte)
251
Set Endpoint Status (Command: 0X40 - 0X55, Data: Write 1 Byte (Optional))
252
Clear Buffer
252
(Optional))
252
Validate Buffer
253
None)
253
USB Device Controller Initialization
253
Slave Mode Operation
254
Interrupt Generation
254
Data Transfer for out Endpoints
255
Data Transfer for in Endpoints
255
DMA Operation
255
Transfer Terminology
256
USB Device Communication Area
256
Triggering the DMA Engine
257
The DMA Descriptor
257
Next_Dd_Pointer
258
Dma_Mode
258
Next_Dd_Valid
258
Isochronous_Endpoint
259
Max_Packet_Size
259
Dma_Buffer_Length
259
Dma_Buffer_Start_Addr
259
Dd_Retired
259
Dd_Status
259
Packet_Valid
260
Ls_Byte_Extracted
260
Ms_Byte_Extracted
260
Present_Dma_Count
260
Message_Length_Position
260
Isochronous_Packetsize_Memory_Address
260
Non-Isochronous Endpoint Operation
260
Setting up DMA Transfers
260
Finding DMA Descriptor
261
Transferring the Data
261
Optimizing Descriptor Fetch
261
Ending the Packet Transfer
261
No_Packet DD
262
Isochronous Endpoint Operation
262
Setting up DMA Transfers
262
Finding the DMA Descriptor
262
Transferring the Data
263
OUT Endpoints
263
IN Endpoints
263
DMA Descriptor Completion
263
Isochronous out Endpoint Operation
263
Example
263
Auto Length Transfer Extraction (ATLE) Mode Operation
264
OUT Transfers in ATLE Mode
265
IN Transfers in ATLE Mode
266
Setting up the DMA Transfer
266
Finding the DMA Descriptor
266
Transferring the Data
266
OUT Endpoints
266
IN Endpoints
266
Ending the Packet Transfer
267
OUT Endpoints
267
IN Endpoints
267
Double Buffered Endpoint Operation
267
Bulk Endpoints
267
Isochronous Endpoints
269
Chapter 12 : Lpc176X/5X USB Host Controller
270
How to Read this Chapter
270
Basic Configuration
270
Introduction
270
Features
271
Architecture
271
Interfaces
271
Pin Description
272
USB Host Usage Note
272
Software Interface
272
Register Map
272
USB Host Register Definitions
273
Chapter 13: Lpc176X/5X USB OTG
274
How to Read this Chapter
274
Basic Configuration
274
Introduction
274
Features
274
Architecture
275
Modes of Operation
275
Pin Configuration
276
Connecting the USB Port to an External OTG Transceiver
276
Connecting USB as a Host
277
Connecting USB as Device
277
Register Description
278
USB Interrupt Status Register
278
0X5000 C1C0)
278
OTG Interrupt Status Register (Otgintst - 0X5000 C100)
279
OTG Interrupt Enable Register (Otginten - 0X5000 C104)
279
OTG Interrupt Set Register (Otgintset - 0X5000 C20C)
280
OTG Interrupt Clear Register (Otgintclr - 0X5000 C10C)
280
OTG Status and Control Register (Otgstctrl - 0X5000 C110)
280
OTG Timer Register (Otgtmr - 0X5000 C114)
281
OTG Clock Control Register (Otgclkctrl - 0X5000 CFF4)
281
OTG Clock Status Register (Otgclkst - 0X5000 CFF8)
282
C300)
282
C300)
283
I2C Status Register (I2C_STS - 0X5000 C304)
283
C308)
285
I2C Clock High Register (I2C_CLKHI - 0X5000 C30C)
286
I2C Clock Low Register (I2C_CLKLO - 0X5000 C310)
286
Interrupt Handling
286
HNP Support
287
B-Device: Peripheral to Host Switching
288
Remove D+ Pull-Up
290
Add D+ Pull-Up
291
A-Device: Host to Peripheral HNP Switching
291
Ceiver
294
Discharge VBUS
294
Load and Enable OTG Timer
295
Stop OTG Timer
295
Suspend Host on Port 1
295
Advertisement
NXP Semiconductors LPC1758 User Manual (808 pages)
Brand:
NXP Semiconductors
| Category:
Controller
| Size: 4 MB
Table of Contents
Chapter 1: Lpc17Xx Introductory Information
3
Introduction
3
Features
3
Applications
5
Ordering Information
6
Part Options Summary
6
Simplified Block Diagram
7
Chapter 35 : Lpc17Xx Supplementary Information
8
Architectural Overview
8
ARM Cortex-M3 Processor
8
Cortex-M3 Configuration Options
8
On-Chip Flash Memory System
9
On-Chip Static RAM
9
Block Diagram
10
Memory Map and Peripheral Addressing
11
Memory Maps
11
Chapter 2: Lpc17Xx Memory Map
13
APB Peripheral Addresses
13
Memory Re-Mapping
14
Bus Fault Exceptions
14
Chapter 3: Lpc17Xx System Control
16
Introduction
16
Pin Description
16
Register Description
16
Reset
17
Reset Source Identification Register (RSID - 0X400F C180)
19
Brown-Out Detection
19
External Interrupt Inputs
20
Register Description
20
External Interrupt Flag Register (EXTINT - 0X400F C140)
20
0X400F C148)
21
0X400F C14C)
22
Other System Controls and Status Flags
23
System Controls and Status Register (SCS - 0X400F C1A0)
23
Chapter 4: Lpc17Xx Clocking and Power Control
25
Summary of Clocking and Power Control Functions
25
Register Description
25
Oscillators
26
Internal RC Oscillator
26
Main Oscillator
27
RTC Oscillator
28
Clock Source Selection Multiplexer
28
Clock Source Select Register
29
PLL0 (Phase Locked Loop 0)
29
PLL0 Operation
29
PLL0 and Startup/Boot Code Interaction
30
PLL0 Register Description
30
PLL0 Control Register (PLL0CON - 0X400F C080)
31
PLL0 Configuration Register
32
0X400F C084)
32
PLL0 Status Register (PLL0STAT - 0X400F C088)
34
PLL0 Interrupt: PLOCK0
35
PLL0 Modes
35
PLL0 Feed Register (PLL0FEED - 0X400F C08C)
36
PLL0 and Power-Down Mode
36
PLL0 Frequency Calculation
36
Procedure for Determining PLL0 Settings
38
Examples of PLL0 Settings
38
PLL0 Setup Sequence
40
PLL1 (Phase Locked Loop 1)
40
PLL1 Register Description
41
PLL1 Control Register (PLL1CON - 0X400F C0A0)
42
PLL1 Configuration Register (PLL1CFG - 0X400F C0A4)
43
PLL1 Status Register (PLL1STAT - 0X400F C0A8)
43
PLL1 Modes
44
PLL1 Interrupt: PLOCK1
44
PLL1 Feed Register (PLL1FEED - 0X400F C0AC)
45
PLL1 and Power-Down Mode
45
PLL1 Frequency Calculation
45
Procedure for Determining PLL1 Settings
46
Clock Dividers
47
CPU Clock Configuration Register (CCLKCFG - 0X400F C104)
47
USB Clock Configuration Register (USBCLKCFG - 0X400F C108)
48
IRC Trim Register (IRCTRIM - 0X400F C1A4)
48
Peripheral Clock Selection Registers 0 and 1 (PCLKSEL0 - 0X400F C1A8 and PCLKSEL1 - 0X400F C1AC)
48
Power Control
50
Sleep Mode
50
Deep Sleep Mode
51
Power-Down Mode
51
Deep Power-Down Mode
52
Peripheral Power Control
52
Register Description
52
Power Mode Control Register (PCON - 0X400F C0C0)
53
Encoding of Reduced Power Modes
54
Wake-Up from Reduced Power Modes
54
Power Control for Peripherals Register (PCONP - 0X400F C0C4)
54
Power Control Usage Notes
56
Power Domains
56
Wake-Up Timer
56
External Clock Output Pin
57
Clock Output Configuration Register
57
Chapter 5: Lpc17Xx Flash Accelerator
59
Introduction
59
Flash Accelerator Blocks
59
Flash Memory Bank
59
Flash Programming Issues
60
Register Description
60
Flash Accelerator Configuration Register
60
Operation
61
Chapter 6: Lpc17Xx Nested Vectored Interrupt Controller (NVIC)
63
Features
63
Description
63
Interrupt Sources
63
Chapter 7: Lpc17Xx Pin Configuration
66
Lpc17Xx Pin Configuration
66
Lpc17Xx Pin Description
66
Chapter 8: Lpc17Xx Pin Connect Block
76
How to Read this Chapter
76
Description
76
Pin Function Select Register Values
76
Pin Mode Select Register Values
77
Register Description
78
Pin Function Select Register 0 (PINSEL0 - 0X4002 C000)
79
Pin Function Select Register 1 (PINSEL1 - 0X4002 C004)
79
Pin Function Select Register 2 (PINSEL2 - 0X4002 C008)
80
Pin Function Select Register 3 (PINSEL3 - 0X4002 C00C)
81
Pin Function Select Register 4 (PINSEL4 - 0X4002 C010)
81
Pin Function Select Register 7 (PINSEL7 - 0X4002 C01C)
82
Pin Function Select Register 9 (PINSEL9 - 0X4002 C024)
82
Pin Function Select Register 10 (PINSEL10 - 0X4002 C028)
82
Pin Mode Select Register 0 (PINMODE0 - 0X4002 C040)
83
Pin Mode Select Register 1 (PINMODE1 - 0X4002 C044)
83
Pin Mode Select Register 2 (PINMODE2 - 0X4002 C048)
84
Pin Mode Select Register 3 (PINMODE3 - 0X4002 C04C)
84
Pin Mode Select Register 4 (PINMODE4 - 0X4002 C050)
85
Pin Mode Select Register 7 (PINMODE7 - 0X4002 C05C)
86
Pin Mode Select Register 9 (PINMODE9 - 0X4002 C064)
86
Open Drain Pin Mode Select Register 0
86
Open Drain Pin Mode Select Register 1
87
Open Drain Pin Mode Select Register 2
88
Open Drain Pin Mode Select Register 3
89
Open Drain Pin Mode Select Register 4
89
I 2 C Pin Configuration Register (I2CPADCFG - 0X4002 C07C)
90
Chapter 9: Lpc17Xx General Purpose Input/Output (GPIO)
91
Basic Configuration
91
Features
91
Digital I/O Ports
91
Interrupt Generating Digital Ports
91
Applications
92
Pin Description
92
Register Description
92
GPIO Port Direction Register Fioxdir (FIO0DIR to FIO4DIR- 0X2009 C000 to 0X2009 C080)
94
GPIO Port Output Set Register Fioxset
95
GPIO Port Output Clear Register Fioxclr (FIO0CLR to FIO7CLR- 0X2009 C01C to 0X2009 C09C)
97
GPIO Port Pin Value Register Fioxpin (FIO0PIN to FIO7PIN- 0X2009 C014 to 0X2009 C094)
98
Fast GPIO Port Mask Register Fioxmask (FIO0MASK to FIO7MASK - 0X2009 C010 to 0X2009 C090)
99
GPIO Interrupt Registers
101
GPIO Overall Interrupt Status Register (Iointstatus - 0X4002 8080)
101
GPIO Interrupt Enable for Port 0 Rising Edge (Io0Intenr - 0X4002 8090)
101
GPIO Interrupt Enable for Port 2 Rising Edge (Io2Intenr - 0X4002 80B0)
102
GPIO Interrupt Enable for Port 0 Falling Edge (Io0Intenf - 0X4002 8094)
103
GPIO Interrupt Enable for Port 2 Falling Edge (Io2Intenf - 0X4002 80B4)
104
GPIO Interrupt Status for Port 0 Rising Edge Interrupt (Io0Intstatr - 0X4002 8084)
104
GPIO Interrupt Status for Port 2 Rising Edge Interrupt (Io2Intstatr - 0X4002 80A4)
105
GPIO Interrupt Status for Port 0 Falling Edge Interrupt (Io0Intstatf - 0X4002 8088)
106
GPIO Interrupt Status for Port 2 Falling Edge Interrupt (Io2Intstatf - 0X4002 80A8)
107
GPIO Interrupt Clear Register for Port 0 (Io0Intclr - 0X4002 808C)
108
GPIO Interrupt Clear Register for Port 0 (Io2Intclr - 0X4002 80AC)
109
GPIO Usage Notes
109
Example: an Instantaneous Output of 0S and 1S on a GPIO Port
109
Writing to FIOSET/FIOCLR Vs. FIOPIN
110
Chapter 10: Lpc17Xx Ethernet
111
Basic Configuration
111
Introduction
111
Features
112
Architecture and Operation
113
DMA Engine Functions
114
Overview of DMA Operation
114
Ethernet Packet
115
Overview
116
Partitioning
116
Example PHY Devices
117
Pin Description
117
Registers and Software Interface
118
Register Map
118
Ethernet MAC Register Definitions
120
MAC Configuration Register 1 (MAC1 - 0X5000 0000)
120
MAC Configuration Register 2 (MAC2 - 0X5000 0004)
121
Back-To-Back Inter-Packet-Gap Register (IPGT - 0X5000 0008)
122
Non Back-To-Back Inter-Packet-Gap Register (IPGR - 0X5000 000C)
122
Collision Window / Retry Register (CLRT - 0X5000 0010)
123
Maximum Frame Register (MAXF - 0X5000 0014)
123
PHY Support Register (SUPP - 0X5000 0018)
124
Test Register (TEST - 0X5000 001C)
124
MII Mgmt Configuration Register
124
MII Mgmt Command Register (MCMD - 0X5000 0024)
125
MII Mgmt Address Register (MADR - 0X5000 0028)
125
MII Mgmt Write Data Register (MWTD - 0X5000 002C)
126
MII Mgmt Read Data Register (MRDD - 0X5000 0030)
126
MII Mgmt Indicators Register (MIND - 0X5000 0034)
126
Station Address 0 Register (SA0 - 0X5000 0040)
127
Station Address 1 Register (SA1 - 0X5000 0044)
127
Station Address 2 Register (SA2 - 0X5000 0048)
128
Control Register Definitions
128
Command Register (Command - 0X5000 0100)
128
Status Register (Status - 0X5000 0104)
129
Receive Descriptor Base Address Register (Rxdescriptor - 0X5000 0108)
129
Receive Status Base Address Register (Rxstatus - 0X5000 010C)
130
Receive Number of Descriptors Register (Rxdescriptor - 0X5000 0110)
130
Receive Produce Index Register (Rxproduceindex - 0X5000 0114)
130
Receive Consume Index Register (Rxconsumeindex - 0X5000 0118)
131
Transmit Descriptor Base Address Register (Txdescriptor - 0X5000 011C)
131
Transmit Status Base Address Register (Txstatus - 0X5000 0120)
132
Transmit Number of Descriptors Register (Txdescriptornumber - 0X5000 0124)
132
Transmit Produce Index Register (Txproduceindex - 0X5000 0128)
132
Transmit Consume Index Register (Txconsumeindex - 0X5000 012C)
133
Transmit Status Vector 0 Register (TSV0 - 0X5000 0158)
133
Transmit Status Vector 1 Register (TSV1 - 0X5000 015C)
134
Receive Status Vector Register (RSV - 0X5000 0160)
135
Flow Control Counter Register (Flowcontrolcounter - 0X5000 0170)
136
Flow Control Status Register (Flowcontrolstatus - 0X5000 0174)
136
Receive Filter Register Definitions
136
Receive Filter Control Register (Rxfilterctrl - 0X5000 0200)
136
Receive Filter Wol Status Register (Rxfilterwolstatus - 0X5000 0204)
137
Receive Filter Wol Clear Register (Rxfilterwolclear - 0X5000 0208)
137
Hash Filter Table Lsbs Register (Hashfilterl - 0X5000 0210)
138
Hash Filter Table Msbs Register (Hashfilterh - 0X5000 0214)
138
Module Control Register Definitions
139
Interrupt Status Register (Intstatus - 0X5000 0FE0)
139
Interrupt Enable Register (Intenable - 0X5000 0FE4)
139
Interrupt Clear Register (Intclear - 0X5000 0FE8)
140
Interrupt Set Register (Intset - 0X5000 0FEC)
141
Power-Down Register (Powerdown - 0X5000 0FF4)
141
Descriptor and Status Formats
142
Receive Descriptors and Statuses
142
Transmit Descriptors and Statuses
145
Ethernet Block Functional Description
147
Overview
147
AHB Interface
148
Interrupts
148
Direct Memory Access (DMA)
148
Initialization
151
Transmit Process
152
Receive Process
158
Transmission Retry
164
Status Hash CRC Calculations
164
Duplex Modes
165
IEE 802.3/Clause 31 Flow Control
165
Half-Duplex Mode Backpressure
167
Receive Filtering
168
Power Management
170
Wake-Up on LAN
170
Enabling and Disabling Receive and Transmit
172
Transmission Padding and CRC
174
Huge Frames and Frame Length Checking
175
Statistics Counters
175
MAC Status Vectors
175
Reset
176
Ethernet Errors
177
AHB Bandwidth
177
DMA Access
177
Types of CPU Access
179
Overall Bandwidth
179
CRC Calculation
179
Chapter 11: Lpc17Xx USB Device Controller
182
How to Read this Chapter
182
Basic Configuration
182
Introduction
182
Features
183
Fixed Endpoint Configuration
183
Functional Description
184
Analog Transceiver
185
Serial Interface Engine (SIE)
185
Endpoint RAM (EP_RAM)
185
EP_RAM Access Control
185
DMA Engine and Bus Master Interface
186
Register Interface
186
Softconnect
186
Goodlink
186
Operational Overview
186
Pin Description
187
Clocking and Power Management
187
Power Requirements
187
Clocks
187
Power Management Support
188
Remote Wake-Up
189
Register Description
189
Clock Control Registers
190
USB Clock Control Register (Usbclkctrl - 0X5000 CFF4)
190
USB Clock Status Register (Usbclkst - 0X5000 CFF8)
191
Device Interrupt Registers
191
USB Interrupt Status Register (Usbintst - 0X5000 C1C0)
191
USB Device Interrupt Status Register (Usbdevintst - 0X5000 C200)
192
USB Device Interrupt Enable Register (Usbdevinten - 0X5000 C204)
193
USB Device Interrupt Clear Register (Usbdevintclr - 0X5000 C208)
193
USB Device Interrupt Set Register (Usbdevintset - 0X5000 C20C)
194
USB Device Interrupt Priority Register (Usbdevintpri - 0X5000 C22C)
195
Endpoint Interrupt Registers
195
USB Endpoint Interrupt Status Register (Usbepintst - 0X5000 C230)
195
USB Endpoint Interrupt Enable Register (Usbepinten - 0X5000 C234)
196
USB Endpoint Interrupt Clear Register (Usbepintclr - 0X5000 C238)
197
USB Endpoint Interrupt Set Register (Usbepintset - 0X5000 C23C)
198
USB Endpoint Interrupt Priority Register (Usbepintpri - 0X5000 C240)
198
Endpoint Realization Registers
199
EP RAM Requirements
199
USB Realize Endpoint Register (Usbreep - 0X5000 C244)
200
USB Endpoint Index Register (Usbepin - 0X5000 C248)
201
USB Maxpacketsize Register (Usbmaxpsize - 0X5000 C24C)
201
USB Transfer Registers
202
USB Receive Data Register (Usbrxdata - 0X5000 C218)
202
USB Receive Packet Length Register
202
USB Transmit Data Register
203
C21C)
203
USB Transmit Packet Length Register
203
SIE Command Code Registers
204
USB Command Code Register (Usbcmdcode - 0X5000 C210)
204
USB Command Data Register (Usbcmddata - 0X5000 C214)
205
DMA Registers
205
USB DMA Request Status Register (Usbdmarst - 0X5000 C250)
205
USB DMA Request Clear Register (Usbdmarclr - 0X5000 C254)
206
USB DMA Request Set Register (Usbdmarset - 0X5000 C258)
206
USB UDCA Head Register (USBUDCAH - 0X5000 C280)
207
USB EP DMA Status Register (Usbepdmast - 0X5000 C284)
207
USB EP DMA Enable Register (Usbepdmaen - 0X5000 C288)
208
USB EP DMA Disable Register (Usbepdmadis - 0X5000 C28C)
208
USB DMA Interrupt Status Register (Usbdmaintst - 0X5000 C290)
208
USB DMA Interrupt Enable Register (Usbdmainten - 0X5000 C294)
209
USB End of Transfer Interrupt Status Register (Usbeotintst - 0X5000 C2A0)
209
USB End of Transfer Interrupt Clear Register (Usbeotintclr - 0X5000 C2A4)
210
USB End of Transfer Interrupt Set Register (Usbeotintset - 0X5000 C2A8)
210
USB New DD Request Interrupt Status Register (Usbnddrintst - 0X5000 C2AC)
210
USB New DD Request Interrupt Clear Register (Usbnddrintclr - 0X5000 C2B0)
211
USB New DD Request Interrupt Set Register (Usbnddrintset - 0X5000 C2B4)
211
USB System Error Interrupt Status Register (Usbsyserrintst - 0X5000 C2B8)
211
USB System Error Interrupt Clear Register (Usbsyserrintclr - 0X5000 C2BC)
211
USB System Error Interrupt Set Register (Usbsyserrintset - 0X5000 C2C0)
212
Interrupt Handling
212
Serial Interface Engine Command Description
215
Set Address (Command: 0Xd0, Data: Write 1 Byte)
216
Configure Device (Command: 0Xd8, Data: Write 1 Byte)
216
Set Mode (Command: 0Xf3, Data: Write 1 Byte)
217
Read Current Frame Number (Command: 0Xf5, Data: Read 1 or 2 Bytes)
218
Read Test Register (Command: 0Xfd, Data: Read 2 Bytes)
218
Set Device Status (Command: 0Xfe, Data: Write 1 Byte)
218
Get Device Status (Command: 0Xfe, Data: Read 1 Byte)
219
Get Error Code (Command: 0Xff, Data: Read 1 Byte)
219
Read Error Status (Command: 0Xfb, Data: Read 1 Byte)
220
Select Endpoint (Command: 0X00 - 0X1F, Data: Read 1 Byte (Optional))
221
Select Endpoint/Clear Interrupt (Command: 0X40 - 0X5F, Data: Read 1 Byte)
222
Set Endpoint Status (Command: 0X40 - 0X55, Data: Write 1 Byte (Optional))
222
Clear Buffer (Command: 0Xf2, Data: Read 1 Byte (Optional))
223
Validate Buffer (Command: 0Xfa, Data: None)
223
USB Device Controller Initialization
224
Slave Mode Operation
225
Interrupt Generation
225
Data Transfer for out Endpoints
225
Data Transfer for in Endpoints
226
DMA Operation
226
Transfer Terminology
226
USB Device Communication Area
227
Triggering the DMA Engine
227
The DMA Descriptor
228
Next_Dd_Pointer
229
Dma_Mode
229
Next_Dd_Valid
229
Isochronous_Endpoint
229
Max_Packet_Size
229
Dma_Buffer_Length
230
Dma_Buffer_Start_Addr
230
Dd_Retired
230
Dd_Status
230
Packet_Valid
230
Ls_Byte_Extracted
231
Ms_Byte_Extracted
231
Present_Dma_Count
231
Message_Length_Position
231
Isochronous_Packetsize_Memory_Address
231
Non-Isochronous Endpoint Operation
231
Setting up DMA Transfers
231
Finding DMA Descriptor
231
Transferring the Data
232
Optimizing Descriptor Fetch
232
Ending the Packet Transfer
232
No_Packet DD
233
Isochronous Endpoint Operation
233
Setting up DMA Transfers
233
Finding the DMA Descriptor
233
Transferring the Data
233
DMA Descriptor Completion
234
Isochronous out Endpoint Operation Example
234
Auto Length Transfer Extraction (ATLE) Mode Operation
235
Setting up the DMA Transfer
237
Finding the DMA Descriptor
237
Transferring the Data
237
Ending the Packet Transfer
238
Advertisement
Related Products
NXP Semiconductors LPC1759
NXP Semiconductors LPC1756
NXP Semiconductors LPC1754
NXP Semiconductors LPC1752
NXP Semiconductors LPC1751
NXP Semiconductors LPC1764
NXP Semiconductors LPC1763
NXP Semiconductors LPC1767
NXP Semiconductors LPC1766
NXP Semiconductors LPC1765
NXP Semiconductors Categories
Motherboard
Microcontrollers
Computer Hardware
Control Unit
Controller
More NXP Semiconductors Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL