Objective Product Specification
Objective Product Specification
• 243 EEMBC CoreMark score running from flash memory • 3GPP LTE release 13 Cat-M1 and Cat-NB1 compliant
• Data watchpoint and trace (DWT), embedded trace macrocell (ETM), and • 3GPP LTE release 14 Cat-NB1 and Cat-NB2 compliant
Applications:
• Sensor networks • Industrial
• Smart agriculture
4418_1177 v0.7.1 ii
Contents
nRF9160 features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
1 Revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Product overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Peripheral interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.1 Peripheral ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.2 Peripherals with shared ID . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.3 Peripheral registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.4 Bit set and clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.5 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.6 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.7 Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.8 Publish / Subscribe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.9 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3.10 Secure/non-secure peripherals . . . . . . . . . . . . . . . . . . . . . . . . 18
4 Application core. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.1 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.1.1 CPU and support module configuration . . . . . . . . . . . . . . . . . . . . . 19
4.1.2 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.1 Memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.2 Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.3 Peripheral access control capabilities . . . . . . . . . . . . . . . . . . . . . . 26
4.3 VMC — Volatile memory controller . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.4 NVMC — Non-volatile memory controller . . . . . . . . . . . . . . . . . . . . . . 28
4.4.1 Writing to flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4.2 Erasing a secure page in flash . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4.3 Erasing a non-secure page in flash . . . . . . . . . . . . . . . . . . . . . . . 29
4.4.4 Writing to user information configuration registers (UICR) . . . . . . . . . . . . . 29
4.4.5 Erase all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.6 NVMC protection mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.7 Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.8 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.9 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.5 FICR — Factory information configuration registers . . . . . . . . . . . . . . . . . . 36
6 Peripherals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.1 CRYPTOCELL — ARM TrustZone CryptoCell 310 . . . . . . . . . . . . . . . . . . . . 74
6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.1.2 Always-on (AO) power domain . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.1.3 Lifecycle state (LCS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.1.4 Cryptographic key selection . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.1.5 Direct memory access (DMA) . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.1.6 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.1.7 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.1.8 Host interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.2 DPPI - Distributed programmable peripheral interconnect . . . . . . . . . . . . . . . 78
6.2.1 Subscribing to and publishing on channels . . . . . . . . . . . . . . . . . . . . 79
6.2.2 DPPI controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
6.2.3 Connection examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
®
6.2.4 Special considerations for system implementing TrustZone for Cortex-M processors . . . 82
6.2.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.3 EGU — Event generator unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.3.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.3.2 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.4 GPIO — General purpose input/output . . . . . . . . . . . . . . . . . . . . . . . 91
6.4.1 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.4.2 GPIO security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.4.3 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.4.4 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.5 GPIOTE — GPIO tasks and events . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.5.1 Pin events and tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.5.2 Port event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.5.3 Tasks and events pin configuration . . . . . . . . . . . . . . . . . . . . . . 102
6.5.4 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.5.5 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.6 IPC — Inter-Processor Communication . . . . . . . . . . . . . . . . . . . . . . . 109
6.6.1 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4418_1177 v0.7.1 iv
6.7 I2S — Inter-IC sound interface . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.7.1 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.7.2 Transmitting and receiving . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.7.3 Left right clock (LRCK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.7.4 Serial clock (SCK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.7.5 Master clock (MCK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
6.7.6 Width, alignment and format . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.7.7 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
6.7.8 Module operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.7.9 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.7.10 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
6.7.11 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
6.8 KMU — Key management unit . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.8.1 Functional view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.8.2 Access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.8.3 Protecting UICR content . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.8.4 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
6.8.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6.9 PDM — Pulse density modulation interface . . . . . . . . . . . . . . . . . . . . . 145
6.9.1 Master clock generator . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
6.9.2 Module operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
6.9.3 Decimation filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.9.4 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.9.5 Hardware example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6.9.6 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.9.7 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
6.9.8 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6.10 PWM — Pulse width modulation . . . . . . . . . . . . . . . . . . . . . . . . 157
6.10.1 Wave counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
6.10.2 Decoder with EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
6.10.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
6.10.4 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
6.10.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6.11 RTC — Real-time counter . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.11.1 Clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.11.2 Resolution versus overflow and the prescaler . . . . . . . . . . . . . . . . . 181
6.11.3 Counter register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6.11.4 Overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.11.5 Tick event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.11.6 Event control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.11.7 Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
6.11.8 Task and event jitter/delay . . . . . . . . . . . . . . . . . . . . . . . . . 185
6.11.9 Reading the counter register . . . . . . . . . . . . . . . . . . . . . . . . 187
6.11.10 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
6.11.11 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
6.12 SAADC — Successive approximation analog-to-digital converter . . . . . . . . . . . . 195
6.12.1 Shared resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
6.12.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
6.12.3 Digital output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
6.12.4 Analog inputs and channels . . . . . . . . . . . . . . . . . . . . . . . . . 197
6.12.5 Operation modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
6.12.6 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
6.12.7 Resistor ladder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
6.12.8 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
4418_1177 v0.7.1 v
6.12.9 Acquisition time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
6.12.10 Limits event monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 202
6.12.11 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6.12.12 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
6.12.13 Performance factors . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
6.13 SPIM — Serial peripheral interface master with EasyDMA . . . . . . . . . . . . . . 222
6.13.1 SPI master transaction sequence . . . . . . . . . . . . . . . . . . . . . . . 223
6.13.2 Master mode pin configuration . . . . . . . . . . . . . . . . . . . . . . . 224
6.13.3 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
6.13.4 Low power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
6.13.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
6.13.6 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
6.14 SPIS — Serial peripheral interface slave with EasyDMA . . . . . . . . . . . . . . . . 239
6.14.1 Shared resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
6.14.2 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
6.14.3 SPI slave operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
6.14.4 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
6.14.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
6.14.6 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
6.15 SPU - System protection unit . . . . . . . . . . . . . . . . . . . . . . . . . . 257
6.15.1 General concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
6.15.2 Flash access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
6.15.3 RAM access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
6.15.4 Peripheral access control . . . . . . . . . . . . . . . . . . . . . . . . . . 264
6.15.5 Pin access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
6.15.6 DPPI access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
6.15.7 External domain access control . . . . . . . . . . . . . . . . . . . . . . . 269
6.15.8 TrustZone for Cortex-M ID allocation . . . . . . . . . . . . . . . . . . . . . 270
6.15.9 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
6.16 TIMER — Timer/counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
6.16.1 Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.16.2 Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.16.3 Task delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.16.4 Task priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.16.5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.16.6 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
6.17 TWIM — I2C compatible two-wire interface master with EasyDMA . . . . . . . . . . . 289
6.17.1 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
6.17.2 Master write sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
6.17.3 Master read sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
6.17.4 Master repeated start sequence . . . . . . . . . . . . . . . . . . . . . . . 292
6.17.5 Low power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
6.17.6 Master mode pin configuration . . . . . . . . . . . . . . . . . . . . . . . 293
6.17.7 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
6.17.8 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
6.17.9 Pullup resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
6.18 TWIS — I2C compatible two-wire interface slave with EasyDMA . . . . . . . . . . . . 309
6.18.1 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
6.18.2 TWI slave responding to a read command . . . . . . . . . . . . . . . . . . . 312
6.18.3 TWI slave responding to a write command . . . . . . . . . . . . . . . . . . . 313
6.18.4 Master repeated start sequence . . . . . . . . . . . . . . . . . . . . . . . 314
6.18.5 Terminating an ongoing TWI transaction . . . . . . . . . . . . . . . . . . . . 315
6.18.6 Low power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
6.18.7 Slave mode pin configuration . . . . . . . . . . . . . . . . . . . . . . . . 315
4418_1177 v0.7.1 vi
6.18.8 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
6.18.9 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
6.19 UARTE — Universal asynchronous receiver/transmitter with EasyDMA . . . . . . . . . 329
6.19.1 EasyDMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
6.19.2 Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
6.19.3 Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
6.19.4 Error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
6.19.5 Using the UARTE without flow control . . . . . . . . . . . . . . . . . . . . 333
6.19.6 Parity and stop bit configuration . . . . . . . . . . . . . . . . . . . . . . . 333
6.19.7 Low power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
6.19.8 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
6.19.9 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
6.19.10 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
6.20 WDT — Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
6.20.1 Reload criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
6.20.2 Temporarily pausing the watchdog . . . . . . . . . . . . . . . . . . . . . . 353
6.20.3 Watchdog reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
6.20.4 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
6.20.5 Electrical specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
December 2018 0.7.1 The following content has been added or updated:
4418_1177 v0.7.1 9
2 About this document
This document is organized into chapters that are based on the modules and peripherals available in the
IC.
4418_1177 v0.7.1 10
About this document
2.3.2 Permissions
Different fields in a register might have different access permissions enforced by hardware.
The access permission for each register field is documented in the Access column in the following ways:
2.4 Registers
Register Offset Security Description
DUMMY 0x514 Example of a register controlling a dummy feature
2.4.1 DUMMY
Address offset: 0x514
Example of a register controlling a dummy feature
4418_1177 v0.7.1 11
About this document
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D D D D C C C B A A
Reset 0x00050002 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
ID Access
Field Value ID Value Description
A RW FIELD_A Example of a read-write field with several enumerated
values
Disabled 0 The example feature is disabled
NormalMode 1 The example feature is enabled in normal mode
ExtendedMode 2 The example feature is enabled along with extra
functionality
B RW FIELD_B Example of a deprecated read-write field Deprecated
Disabled 0 The override feature is disabled
Enabled 1 The override feature is enabled
C RW FIELD_C Example of a read-write field with a valid range of values
ValidRange [2..7] Example of allowed values for this field
D RW FIELD_D Example of a read-write field with no restriction on the
values
4418_1177 v0.7.1 12
3 Product overview
3.1 Introduction
The nRF9160 is a low power cellular IoT (internet of things) solution, integrating an ARM® Cortex-M33
processor with advanced security features, a range of peripherals, as well as a complete LTE modem
compliant with 3GPP LTE release 13 Cat-M1 and Cat-NB1, and 3GPP LTE release 14 Cat-NB1 and Cat-NB2
standards.
The ARM® Cortex-M33 processor is exclusively for user application software, and it offers 1 MB of flash
and 256 kB of RAM dedicated to this use. The M33 application processor shares the power, clock and
peripheral architecture with Nordic Semiconductor nRF51 and nRF52 Series of PAN/LAN SoCs, ensuring
minimal porting efforts.
The peripheral set offers a variety of analog and digital functionality enabling single-chip implementation
of a wide range of cellular IoT (internet of things) applications. ARM® TrustZone® technology, Cryptocell
310 and supporting blocks for system protection and key management, are embedded to enable advanced
security needed for IoT applications.
The LTE modem integrates a very flexible transceiver that in hardware supports frequency range from
700 to 2200 MHz (through a single 50 Ω antenna pin), and a baseband processor handling LTE Cat-M1/
NB1/NB2 protocol layers L1-L3 as well as IP upper layers offering secure socket API for the application. The
modem is supported by pre-qualified software builds available for free from Nordic Semiconductor.
4418_1177 v0.7.1 13
Product overview
Max 700 px
ETM trace ITM trace Debug
nRF9160
ETM AHB-AP
CPU
RAM0 RAM1 RAM2 RAM3 RAM0 RAM1 RAM2 RAM3
ARM
CORTEX-M33
NVIC SysTick
slave
slave
slave
slave
slave
slave
slave
slave
master
AHB multilayer
master
slave
slave
slave
slave
P0 AHB TO APB
GPIO slave CODE FICR UICR LTE-M modem
(P0.0 – P0.31) BRIDGE ANT - LTE
/
ANT - GPS
AIN0 – AIN7 SAADC NVMC
AREF0 – AREF1
EasyDMA master DPPI
RTS
CTS KMU
UARTE [0..n]
TXD
Max 750 px
GPIOTE
SCL
TWIM [0..n] RTC [0..n]
SDA
APB
IPC
SCK
MOSI SPIM [0..n] OUT0-OUT3
PWM[0..3]
MISO
EasyDMA master master EasyDMA
CSN WDT
MISO
SPIS [0..n]
MOSI
SCK POWER
EasyDMA master
CLOCK
CLK PDM
DIN
EasyDMA master High frequency
clock sources
Clock control
High frequency
MCK
clock sources
LRCK
SCL I2S
SDOUT REGULATORS
SDIN
EasyDMA master
4418_1177 v0.7.1 14
Peripheral
EN SUBSCRIBE n CHIDX
write
TASK n
k SHORTS
OR
task
Peripheral
core
event
INTEN m
EVENT m
IRQ signal to NVIC
EN PUBLISH m CHIDX
Note: For more information on DPPI channels, see DPPI - Distributed programmable peripheral
interconnect on page 78.
3.3.1 Peripheral ID
Every peripheral is assigned a fixed block of 0x1000 bytes of address space, which is equal to 1024 x 32 bit
registers.
See Instantiation on page 23 for more information about which peripherals are available and where
they are located in the address map.
There is a direct relationship between peripheral ID and base address. For example, a peripheral with base
address 0x40000000 is assigned ID=0, a peripheral with base address 0x40001000 is assigned ID=1, and a
peripheral with base address 0x4001F000 is assigned ID=31.
Peripherals may share the same ID, which may impose one or more of the following limitations:
4418_1177 v0.7.1 15
Product overview
Note: The main register may not be visible and hence not directly accessible in all cases.
4418_1177 v0.7.1 16
Product overview
3.3.5 Tasks
Tasks are used to trigger actions in a peripheral, for example to start a particular behavior. A peripheral can
implement multiple tasks with each task having a separate register in that peripheral's task register group.
A task is triggered when firmware writes 1 to the task register, or when the peripheral itself or another
peripheral toggles the corresponding task signal. See the figure Tasks, events, shortcuts, publish, subscribe
and interrupts on page 15.
3.3.6 Events
Events are used to notify peripherals and the CPU about events that have happened, for example a state
change in a peripheral. A peripheral may generate multiple events, where each event has a separate
register in that peripheral's event register group.
An event is generated when the peripheral itself toggles the corresponding event signal, and the event
register is updated to reflect that the event has been generated (see figure Tasks, events, shortcuts,
publish, subscribe and interrupts on page 15). An event register is only cleared when firmware writes 0
to it. Events can be generated by the peripheral even when the event register is set to 1.
3.3.7 Shortcuts
A shortcut is a direct connection between an event and a task within the same peripheral. If a shortcut is
enabled, the associated task is automatically triggered when its associated event is generated.
Using shortcuts is equivalent to making the connection outside the peripheral and through the DPPI.
However, the propagation delay when using shortcuts is usually shorter than the propagation delay
through the DPPI.
Shortcuts are predefined, which means that their connections cannot be configured by firmware. Each
shortcut can be individually enabled or disabled through the shortcut register, one bit per shortcut, giving
a maximum of 32 shortcuts for each peripheral.
3.3.9 Interrupts
All peripherals support interrupts. Interrupts are generated by events.
A peripheral only occupies one interrupt, and the interrupt number follows the peripheral ID. For example,
the peripheral with ID=4 is connected to interrupt number 4 in the nested vectored interrupt controller
(NVIC).
Using registers INTEN, INTENSET, and INTENCLR, every event generated by a peripheral can be
configured to generate that peripheral's interrupt. Multiple events can be enabled to generate interrupts
simultaneously. To resolve the correct interrupt source, the event registers in the event group of
peripheral registers will indicate the source.
Some peripherals implement only INTENSET and INTENCLR registers, and the INTEN register is not
available on those peripherals. See the individual peripheral chapters for details. In all cases, reading back
the INTENSET or INTENCLR register returns the same information as in INTEN.
4418_1177 v0.7.1 17
Product overview
Each event implemented in the peripheral is associated with a specific bit position in the INTEN, INTENSET
and INTENCLR registers.
The relationship between tasks, events, shortcuts, and interrupts is illustrated in figure Tasks, events,
shortcuts, publish, subscribe and interrupts on page 15.
Interrupt clearing
Interrupts should always be cleared.
Clearing an interrupt by writing 0 to an event register, or disabling an interrupt using the INTENCLR
register, may take a number of CPU clock cycles to take effect. This means that an interrupt may reoccur
immediately, even if a new event has not come, if the program exits an interrupt handler after the
interrupt is cleared or disabled but before it has taken effect.
Note: To avoid an interrupt reoccurring before a new event has come, the program should perform
a read from one of the peripheral registers. For example, the event register that has been cleared,
or the INTENCLR register that has been used to disable the interrupt.
Care should be taken to ensure that the compiler does not remove the read operation as an optimization.
4418_1177 v0.7.1 18
4 Application core
4.1 CPU
The ARM® Cortex-M33 processor has a 32-bit instruction set (Thumb®-2 technology) that implements a
superset of 16 and 32-bit instructions to maximize code density and performance.
This processor implements several features that enable energy-efficient arithmetic and high-performance
signal processing, including:
• Digital signal processing (DSP) instructions
• Single-cycle multiply and accumulate (MAC) instructions
• Hardware divide
• 8- and 16-bit single instruction, multiple data (SIMD) instructions
• Single-precision floating-point unit (FPU)
• Memory Protection Unit (MPU)
• ARM® TrustZone® for ARMv8-M
The ARM® Cortex Microcontroller Software Interface Standard (CMSIS) hardware abstraction layer for the
ARM® Cortex processor series is implemented and available for the M33 CPU.
Real-time execution is highly deterministic in thread mode, to and from sleep modes, and when handling
events at configurable priority levels via the nested vectored interrupt controller (NVIC).
Executing code from internal or external flash will have a wait state penalty. The instruction cache can
be enabled to minimize flash wait states when fetching instructions. For more information on cache,
see Cache on page 31. The section Electrical specification on page 20 shows CPU performance
parameters including the wait states in different modes, CPU current and efficiency, and processing power
and efficiency based on the CoreMark® benchmark.
4418_1177 v0.7.1 19
Application core
CMFLASH/MHz CoreMark per MHz, running from flash, cache enabled 3.79 CoreMark/
MHz
CMFLASH/mA CoreMark per mA, running from flash, cache enabled, DC/ 84 CoreMark/
DC mA
4.2 Memory
The application microcontroller has embedded 1024 kB flash and 256 kB RAM for application code and
data storage.
As illustrated in Memory layout on page 21, both CPU and EasyDMA are able to access RAM via the
AHB multilayer interconnect. See AHB multilayer interconnect on page 47 and EasyDMA on page
44 for more information about AHB multilayer interconnect and EasyDMA respectively. The LTE
modem can access all application MCU memory, but typically a small portion of RAM is dedicated to data
exchange between application MCU and the modem baseband controller.
1
Using IAR compiler
4418_1177 v0.7.1 20
Application core
ARM® Cortex®-M33
EasyDMA AHB master
System bus
Code bus
DMA bus
Page 255
0x000F F000
Page 3..254
AHB slave
Cache
0x0000 3000
Page 2 0x0000 2000
Page 1 0x0000 1000
AHB multilayer interconnect Page 0 0x0000 0000
4418_1177 v0.7.1 21
Application core
The RAM blocks power states and retention states in System ON and System OFF modes are controlled by
the VMC.
4418_1177 v0.7.1 22
Application core
0xA000 0000
RAM
0x8000 0000
RAM
AHB peripherals 0x5080 0000
0x6000 0000
APB peripherals
0x4000 0000
0x4000 0000
SRAM
Code
UICR 0x00FF 8000
Some of the registers are retained (their values kept). Read more about retained registers in Retained
registers on page 54 and Reset behavior on page 55.
4.2.2 Instantiation
4418_1177 v0.7.1 23
Application core
4418_1177 v0.7.1 24
Application core
4418_1177 v0.7.1 25
Application core
Abbreviation Description
NS Non-secure: This peripheral is always accessible as a non-secure peripheral.
S Secure: This peripheral is always accessible as a secure peripheral.
US User-selectable: Non-secure or secure attribute for this peripheral is defined by the
PERIPHID[0].PERM register.
SPLIT Both non-secure and secure: The same resource is shared by both secure and non-
secure code.
Abbreviation Description
NA Not applicable: Peripheral has no DMA capability.
NSA No separate attribute: Peripheral has DMA, and DMA transfers always have the same
security attribute as assigned to the peripheral.
SA Separate attribute: Peripheral has DMA, and DMA transfers can have a different security
attribute than the one assigned to the peripheral.
4418_1177 v0.7.1 26
Application core
4.3.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5003A000 VMC : S
VMC US NA Volatile memory controller
0x4003A000 VMC : NS
Table 7: Instances
4418_1177 v0.7.1 27
Application core
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x0000FFFF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A-D RW S[i]POWER (i=0..3) Keep RAM section Si of RAM n on or off in System ON mode
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x0000FFFF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A-D W S[i]POWER (i=0..3) Keep RAM section Si of RAM n on or off in System ON mode
On 1 On
E-H W S[i]RETENTION (i=0..3) Keep retention on RAM section Si of RAM n when RAM
section is switched off
On 1 On
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x0000FFFF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A-D W S[i]POWER (i=0..3) Keep RAM section Si of RAM n on or off in System ON mode
Off 1 Off
E-H W S[i]RETENTION (i=0..3) Keep retention on RAM section Si of RAM n when RAM
section is switched off
Off 1 Off
4418_1177 v0.7.1 28
Application core
The NVMC is a split security peripheral. This means that when the NVMC is configured as non-secure, only
a subset of the registers is available from the non-secure code. See SPU - System protection unit on page
257 and Registers on page 31 for more details.
When the NVMC is configured to be a secure peripheral, only secure code has access.
Before a write can be performed, the NVMC must be enabled for writing in [Link]. Similarly, before
an erase can be performed, the NVMC must be enabled for erasing in [Link], see CONFIG on page
32. The user must make sure that writing and erasing are not enabled at the same time. Failing to do
so may result in unpredictable behavior.
4418_1177 v0.7.1 29
Application core
UICR is only accessible by secure code. Any write from non-secure code will be faulted. In order to lock the
chip after uploading non-secure code, non-secure debugger needs to use the WRITEUICRNS register inside
the NVMC in order to set APPROTECT (APPROTECT will be written to 0x00000000).
UICR can only be written nWRITE number of times before an erase must be performed using ERASEALL.
The time it takes to write a word to the UICR is specified by tWRITE. The CPU is stalled if the CPU executes
code from the flash while the NVMC is writing to the UICR.
Note: Erase can still be performed through CTRL-AP, regardless of the above settings. See CTRL-AP
- Control access port on page 368 for more information.
4418_1177 v0.7.1 30
Application core
4.4.7 Cache
An instruction cache (I-Cache) can be enabled for the ICODE bus in the NVMC.
See Memory map on page 22 for the location of flash.
A cache hit is an instruction fetch from the cache, and it has a 0 wait-state delay. The number of wait-
states for a cache miss, where the instruction is not available in the cache and needs to be fetched from
flash, depends on the processor frequency and is shown in CPU on page 19.
Enabling the cache can increase the CPU performance, and reduce power consumption by reducing the
number of wait cycles and the number of flash accesses. This will depend on the cache hit rate. Cache
draws current when enabled. If the reduction in average current due to reduced flash accesses is larger
than the cache power requirement, the average current to execute the program code will be reduced.
When disabled, the cache does not draw current and its content is not retained.
It is possible to enable cache profiling to analyze the performance of the cache for your program using
the register ICACHECNF. When profiling is enabled, registers IHIT and IMISS are incremented for every
instruction cache hit or miss respectively.
4.4.8 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50039000 NVMC : S Non-volatile memory
NVMC SPLIT NA
0x40039000 NVMC : NS controller
4418_1177 v0.7.1 31
Application core
[Link] READY
Address offset: 0x400
Ready flag
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A R READY NVMC is ready or busy
Busy 0 NVMC is busy (on-going write or erase operation)
Ready 1 NVMC is ready
[Link] READYNEXT
Address offset: 0x408
Ready flag
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A R READYNEXT NVMC can accept a new write operation
Busy 0 NVMC cannot accept any write operation
Ready 1 NVMC is ready
[Link] CONFIG
Address offset: 0x504
Configuration register
This register is one hot
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW WEN Program memory access mode. It is strongly recommended
to only activate erase and write modes when they are
actively used.
4418_1177 v0.7.1 32
Application core
[Link] ERASEALL
Address offset: 0x50C
Register for erasing all non-volatile user memory
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ERASEALL Erase all non-volatile memory including UICR registers.
[Link] ERASEPAGEPARTIALCFG
Address offset: 0x51C
Register for partial erase configuration
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A
Reset 0x0000000A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
ID Access
Field Value ID Value Description
A RW DURATION Duration of the partial erase in milliseconds
The user must ensure that the total erase time is long
enough for a complete erase of the flash page
[Link] ICACHECNF
Address offset: 0x540
I-code cache configuration register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CACHEEN Cache enable
Disabled 0 Disable cache. Invalidates all cache entries.
Enabled 1 Enable cache
B RW CACHEPROFEN Cache profiling enable
Disabled 0 Disable cache profiling
Enabled 1 Enable cache profiling
[Link] IHIT
Address offset: 0x548
I-code cache hit counter
4418_1177 v0.7.1 33
Application core
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW HITS Number of cache hits
[Link] IMISS
Address offset: 0x54C
I-code cache miss counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MISSES Number of cache misses
[Link] CONFIGNS
Address offset: 0x584
This register is one hot
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW WEN Program memory access mode. It is strongly recommended
to only activate erase and write modes when they are
actively used.
[Link] WRITEUICRNS
Address offset: 0x588
Non-secure APPROTECT enable register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B B B B B B B B B B B B B B B B B B B B B B B B B B B B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W SET Allow non-secure code to set APPROTECT
Set 1 Set value
B W KEY Key to write in order to validate the write operation
Keyvalid 0xAFBE5A7 Key value
[Link] FORCEONNVM
Address offset: 0x700
4418_1177 v0.7.1 34
Application core
Force on all NVM supplies. Also see the internal section in the NVMC chapter.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FORCEONNVM Force on all NVM supplies. Also see the internal section in
the NVMC chapter.
DoNotForceOn 0 Do not force on NVM supply
ForceOn 1 Force on NVM supply
[Link] FORCEOFFNVM
Address offset: 0x728
Force off NVM supply. Also see the internal section in the NVMC chapter.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C C C C C C C C C C C C C C C C C C C C C C C C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FORCEOFFNVM0 Force off NVM supply 0. Also see the internal section in the
NVMC chapter.
DoNotForceOff 0 Do not force off supply
ForceOff 1 Force off supply
B RW FORCEOFFNVM1 Force off NVM supply 1. Also see the internal section in the
NVMC chapter.
DoNotForceOff 0 Do not force off supply
ForceOff 1 Force off supply
C RW KEY KEY
EnableWrite 0xACCE55 Must be written in order to write to bits 0-7. Any other
value will ignore writes to this register. Read as zero.
4418_1177 v0.7.1 35
Application core
4.5.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x00FF0000 FICR FICR S NA Factory information
configuration
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R DEVICEID 64 bit unique device identifier
4418_1177 v0.7.1 36
Application core
[Link] [Link]
Address offset: 0x20C
Part code
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00009160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0
ID Access
Field Value ID Value Description
A R PART Part code
N9160 0x9160 nRF9160
[Link] [Link]
Address offset: 0x210
Part Variant, Hardware version and Production configuration
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x0FFFFFFF 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R VARIANT Part Variant, Hardware version and Production
configuration, encoded as ASCII
AAAA 0x41414141 AAAA
AAA0 0x41414130 AAA0
[Link] [Link]
Address offset: 0x214
Package option
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00002000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R PACKAGE Package option
CC 0x2000 CCxx - 236 ball wlCSP
[Link] [Link]
Address offset: 0x218
RAM variant
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R RAM RAM variant
K256 0x100 256 kByte RAM
Unspecified 0xFFFFFFFF Unspecified
4418_1177 v0.7.1 37
Application core
[Link] [Link]
Address offset: 0x21C
Flash variant
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R FLASH Flash variant
K1024 0x400 1 MByte FLASH
[Link] [Link]
Address offset: 0x220
Code memory page size
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00001000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R CODEPAGESIZE Code memory page size
[Link] [Link]
Address offset: 0x224
Code memory size
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R CODESIZE Code memory size in number of pages
[Link] [Link]
Address offset: 0x228
Device type
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R DEVICETYPE Device type
Die 0x0000000 Device is an physical DIE
FPGA 0xFFFFFFFF Device is an FPGA
4418_1177 v0.7.1 38
Application core
Address
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R Address Address
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R Data Data
[Link] [Link]
Address offset: 0xC00
Amount of bytes for the required entropy bits
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R BYTES Amount of bytes for the required entropy bits
[Link] [Link]
Address offset: 0xC04
Repetition counter cutoff
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R RCCUTOFF Repetition counter cutoff
[Link] [Link]
Address offset: 0xC08
Adaptive proportion cutoff
4418_1177 v0.7.1 39
Application core
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R APCUTOFF Adaptive proportion cutoff
[Link] [Link]
Address offset: 0xC0C
Amount of bytes for the startup tests
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
ID Access
Field Value ID Value Description
A R STARTUP Amount of bytes for the startup tests
[Link] TRNG90B.ROSC1
Address offset: 0xC10
Sample count for ring oscillator 1
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R ROSC1 Sample count for ring oscillator 1
[Link] TRNG90B.ROSC2
Address offset: 0xC14
Sample count for ring oscillator 2
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R ROSC2 Sample count for ring oscillator 2
[Link] TRNG90B.ROSC3
Address offset: 0xC18
Sample count for ring oscillator 3
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R ROSC3 Sample count for ring oscillator 3
4418_1177 v0.7.1 40
Application core
[Link] TRNG90B.ROSC4
Address offset: 0xC1C
Sample count for ring oscillator 4
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A R ROSC4 Sample count for ring oscillator 4
4.6.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x00FF8000 UICR UICR S NA User information
configuration
4418_1177 v0.7.1 41
Application core
[Link] APPROTECT
Address offset: 0x000
Access port protection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PALL Blocks debugger read/write access to all CPU registers and
memory mapped addresses
Unprotected 0xFFFFFFFF Unprotected
Protected 0x00000000 Protected
[Link] XOSC32M
Address offset: 0x014
Oscillator control
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A
Reset 0xFFFFFFCF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1
ID Access
Field Value ID Value Description
A RW CTRL Pierce current DAC control signals
[Link] HFXOSRC
Address offset: 0x01C
HFXO clock source selection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW HFXOSRC HFXO clock source selection
XTAL 1 32 MHz crystal oscillator
TCXO 0 32 MHz temperature compensated crystal oscillator (TCXO)
[Link] HFXOCNT
Address offset: 0x020
HFXO startup counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW HFXOCNT HFXO startup counter. Total debounce time = HFXOCNT*64
us + 0.5 us
MinDebounceTime 0 Min debounce time = (0*64 us + 0.5 us)
MaxDebounceTime 255 Max debounce time = (255*64 us + 0.5 us)
4418_1177 v0.7.1 42
Application core
[Link] SECUREAPPROTECT
Address offset: 0x02C
Secure access port protection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PALL Blocks debugger read/write access to all secure CPU
registers and secure memory mapped addresses
Unprotected 0xFFFFFFFF Unprotected
Protected 0x00000000 Protected
[Link] ERASEPROTECT
Address offset: 0x030
Erase protection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PALL Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality
Unprotected 0xFFFFFFFF Unprotected
Protected 0x00000000 Protected
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW OTP Bits [31+n*32:0+n*32] of OTP region
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW DEST Secure APB destination address
4418_1177 v0.7.1 43
Application core
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C B A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW WRITE Write permission for key slot
Disabled 0 Disable write to the key value registers
Disabled 0 Disable pushing of key value registers over secure APB, but
can be read if field READ is Enabled
Enabled 1 Enable pushing of key value registers over secure APB.
Register [Link] must contain a valid
destination address!
D RW STATE Revocation state for the key slot
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW VALUE Define bits [31+o*32:0+o*32] of value assigned to KMU key
slot ID=n+1
4.7 EasyDMA
EasyDMA is a module implemented by some peripherals to gain direct access to Data RAM.
EasyDMA is an AHB bus master similar to CPU and is connected to the AHB multilayer interconnect for
direct access to Data RAM. EasyDMA is not able to access flash.
A peripheral can implement multiple EasyDMA instances to provide dedicated channels. For example,
for reading and writing of data between the peripheral and RAM. This concept is illustrated in EasyDMA
example on page 45.
4418_1177 v0.7.1 44
Application core
READER
AHB
RAM EasyDMA
Peripheral
core
WRITER
RAM
AHB
EasyDMA
An EasyDMA channel is usually implemented like illustrated by the code below, but some variations may
occur:
READERBUFFER_SIZE 5
WRITERBUFFER_SIZE 6
This example shows a peripheral called MYPERIPHERAL that implements two EasyDMA channels - one for
reading called READER, and one for writing called WRITER. When the peripheral is started, it is assumed
that the peripheral will:
• Read 5 bytes from the readerBuffer located in RAM at address 0x20000000.
• Process the data.
• Write no more than 6 bytes back to the writerBuffer located in RAM at address 0x20000005.
The memory layout of these buffers is illustrated in EasyDMA memory layout on page 46.
4418_1177 v0.7.1 45
Application core
The [Link] register should not be specified larger than the actual size of the buffer
(writerBuffer). Otherwise, the channel would overflow the writerBuffer.
Once an EasyDMA transfer is completed, the AMOUNT register can be read by the CPU to see how many
bytes were transferred. For example, CPU can read MYPERIPHERAL->[Link] register to see how
many bytes WRITER wrote to RAM.
#define BUFFER_SIZE 4
ArrayList_type ReaderList[3];
[Link] = BUFFER_SIZE;
[Link] = &ReaderList;
The data structure only includes a buffer with size equal to the size of [Link] register. EasyDMA
uses the [Link] register to determine when the buffer is full.
[Link] = &ReaderList
4418_1177 v0.7.1 46
Application core
4418_1177 v0.7.1 47
5 Power and clock management
Power
Application core
management
VDD IC
(PMIC)
LTE
PMU modem
Clock Memory
sources
Peripherals
The PMU automatically tracks the power and clock resources required by the different components in the
system. It then starts/stops and chooses operation modes in supply regulators and clock sources, without
user interaction, to achieve the lowest power consumption possible.
4418_1177 v0.7.1 48
Power and clock management
If any application or modem activity occurs, the system leaves the System ON IDLE state. Once a
given activity in a function block is completed, the system automatically returns to IDLE, retaining its
configuration.
As long as the system resides in low power mode, the PMU ensures that the appropriate regulators and
clock sources are started or stopped based on the needs of the function blocks active at any given time.
This automatic power management can be overridden by switching to constant latency mode. In this
mode, the CPU wakeup latency and the PPI task response are constant and kept at a minimum. This
is secured by keeping a set of base resources that are always enabled. The advantage of having a
constant and predictable latency will be at the cost of having significantly increased power consumption
compared to the low power mode. The constant latency mode is enabled by triggering the CONSTLAT task
(TASKS_CONSTLAT on page 59).
While the system is in constant latency mode, the low power mode can be enabled by triggering LOWPWR
task (TASKS_LOWPWR on page 59).
To reduce power consumption while in System ON IDLE, RAM blocks can be turned off in System ON mode
while enabling the retention of these RAM blocks in RAM[n].POWER registers in VMC. RAM[n].POWER are
retained registers, see Reset behavior on page 55. Note that these registers are usually overwritten by
the startup code provided with the nRF application examples.
4418_1177 v0.7.1 49
Power and clock management
nRF9160
External supply
GPIO
...
VDD_GPIO
The I/Os are supplied via VDD_GPIO pin as shown in figure above. VDD_GPIO pin supports voltage levels
within range given in table Recommended operating conditions on page 386
4418_1177 v0.7.1 50
Power and clock management
VDD
C
Power-on reset
VBOR
Brownout reset
Note: For details regarding the modem API, please refer to nRF Connect SDK document and nRF91
AT Commands, Command Reference Guide document.
4418_1177 v0.7.1 51
Power and clock management
PCLK1M
HFXO PCLK16M
HFCLK
oscillator
clock control PCLK32M
(high accuracy)
HCLK
HFINT LFRC
oscillator RC
(low accuracy) oscillator
LFXO LFCLK
PCLK32KI
oscillator clock control
4418_1177 v0.7.1 52
Power and clock management
As illustrated in Clock and oscillator setup on page 52, the system supports the following low
frequency clock sources:
• LFRC: 32.768 kHz RC oscillator
• LFXO: 32.768 kHz high accuracy oscillator
The LFCLK clock controller and all LFCLK clock sources are always switched off when in System OFF mode.
The LFCLK clock is started by first selecting the preferred clock source in the LFCLKSRC on page 71
register and then triggering the LFCLKSTART task. LFXO is recommended as the LFCLK clock source.
Note: The LTE modem requires using LFXO as the LFCLK source.
Switching between LFCLK clock sources can be done without stopping the LFCLK clock. A LFCLK clock
source which is running prior to triggering the LFCLKSTART task will continue to run until the selected clock
source has been available. After that the clock sources will be switched. Switching between clock sources
will never introduce a glitch but it will stretch a clock pulse by 0.5 to 1.0 clock cycle (i.e. will delay rising
edge by 0.5 to 1.0 clock cycle).
Note: If the watchdog timer (WDT) is running, the default LFCLK clock source (LFRC - see LFCLKSRC
on page 71) is started automatically (LFCLKSTART task doesn't have to be triggered).
A LFCLKSTARTED event will be generated when the selected LFCLK clock source has started.
A LFCLKSTOP task will stop global requesting of the LFCLK clock. However, if any system component
(e.g. WDT, modem) requires the LFCLK, the clock won't be stopped. The LFCLKSTOP task should only be
triggered after the STATE field in the LFCLKSTAT register indicates a LFCLK running-state.
4418_1177 v0.7.1 53
Power and clock management
5.1.5 Reset
There are multiple reset sources that may trigger a reset of the system. After a reset the CPU can query
the RESETREAS (reset reason register) to find out which source generated the reset.
4418_1177 v0.7.1 54
Power and clock management
RAM3 RAM3
CPU lockup 4 x x
Soft reset x x
Wakeup from System OFF x x x5 x x
mode reset
Watchdog reset 6 x x x x x
Pin reset x x x x x x
Brownout reset x x x x x x x x
Power-on reset x x x x x x x
Note: The RAM is never reset but its content may be corrupted after reset in the cases given in the
table above.
CPU lockup 4 x x x
Soft reset x x x
Wakeup from System OFF mode reset x x
Watchdog reset6 x x x x
Pin reset x x x x
Brownout reset x x x x x x
Power-on reset x x x x x x
2
All debug components excluding SWJ-DP. See Overview on page 365 chapter for more information
about the different debug components in the system.
3
RAM can be configured to be retained using registers in VMC — Volatile memory controller on page
26
4
Reset from CPU lockup is disabled if the device is in debug interface mode. CPU lockup is not possible
in System OFF.
5
The debug components will not be reset if the device is in debug interface mode.
6
Watchdog reset is not available in System OFF.
4418_1177 v0.7.1 55
Power and clock management
Condition Value
Supply 3.7 V
Temperature 25 °C
CPU WFI (wait for interrupt)/WFE (wait for event) sleep
Peripherals All idle
Clock Not running
RAM No retention
Cache enabled Yes
Condition
Cat-M1 HD FDD mode
Ideal channel, no errors in DL/UL communication
Network response times at minimum
UICC current consumption excluded
Output power at antenna port, single-ended 50 Ω
4418_1177 v0.7.1 56
Power and clock management
[Link] I2S
[Link] PDM
[Link] PWM
[Link] SAADC
[Link] TIMER
[Link] SPIM
[Link] SPIS
4418_1177 v0.7.1 57
Power and clock management
[Link] TWIM
[Link] TWIS
[Link] UARTE
[Link] WDT
4418_1177 v0.7.1 58
Power and clock management
Note: Registers INTEN on page 62, INTENSET on page 62, and INTENCLR on page 63 are
the same registers (at the same address) as corresponding registers in CLOCK — Clock control on
page 64.
[Link] Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50005000 POWER : S
POWER US NA Power control
0x40005000 POWER : NS
[Link].1 TASKS_CONSTLAT
Address offset: 0x78
Enable constant latency mode.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CONSTLAT Enable constant latency mode.
Trigger 1 Trigger task
[Link].2 TASKS_LOWPWR
Address offset: 0x7C
Enable low power mode (variable latency)
4418_1177 v0.7.1 59
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_LOWPWR Enable low power mode (variable latency)
Trigger 1 Trigger task
[Link].3 SUBSCRIBE_CONSTLAT
Address offset: 0xF8
Subscribe configuration for task CONSTLAT
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CONSTLAT will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].4 SUBSCRIBE_LOWPWR
Address offset: 0xFC
Subscribe configuration for task LOWPWR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task LOWPWR will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].5 EVENTS_POFWARN
Address offset: 0x108
Power failure warning
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_POFWARN Power failure warning
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link].6 EVENTS_SLEEPENTER
Address offset: 0x114
CPU entered WFI/WFE sleep
4418_1177 v0.7.1 60
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_SLEEPENTER CPU entered WFI/WFE sleep
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link].7 EVENTS_SLEEPEXIT
Address offset: 0x118
CPU exited WFI/WFE sleep
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_SLEEPEXIT CPU exited WFI/WFE sleep
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link].8 PUBLISH_POFWARN
Address offset: 0x188
Publish configuration for event POFWARN
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event POFWARN will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link].9 PUBLISH_SLEEPENTER
Address offset: 0x194
Publish configuration for event SLEEPENTER
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event SLEEPENTER will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link].10 PUBLISH_SLEEPEXIT
Address offset: 0x198
4418_1177 v0.7.1 61
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event SLEEPEXIT will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link].11 INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW POFWARN Enable or disable interrupt for event POFWARN
Disabled 0 Disable
Enabled 1 Enable
C RW SLEEPENTER Enable or disable interrupt for event SLEEPENTER
Disabled 0 Disable
Enabled 1 Enable
D RW SLEEPEXIT Enable or disable interrupt for event SLEEPEXIT
Disabled 0 Disable
Enabled 1 Enable
[Link].12 INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW POFWARN Write '1' to enable interrupt for event POFWARN
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW SLEEPENTER Write '1' to enable interrupt for event SLEEPENTER
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW SLEEPEXIT Write '1' to enable interrupt for event SLEEPEXIT
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
4418_1177 v0.7.1 62
Power and clock management
[Link].13 INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW POFWARN Write '1' to disable interrupt for event POFWARN
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW SLEEPENTER Write '1' to disable interrupt for event SLEEPENTER
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW SLEEPEXIT Write '1' to disable interrupt for event SLEEPEXIT
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link].14 RESETREAS
Address offset: 0x400
Reset reason
Unless cleared, the RESETREAS register will be cumulative. A field is cleared by writing '1' to it. If none
of the reset sources are flagged, this indicates that the chip was reset from the on-chip reset generator,
which will indicate a power-on reset or a brownout reset.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RESETPIN Reset from pin reset detected
NotDetected 0 Not detected
Detected 1 Detected
B RW DOG Reset from global watchdog detected
NotDetected 0 Not detected
Detected 1 Detected
C RW OFF Reset due to wakeup from System OFF mode, when wakeup
is triggered by DETECT signal from GPIO
NotDetected 0 Not detected
Detected 1 Detected
D RW DIF Reset due to wakeup from System OFF mode, when wakeup
is triggered by entering debug interface mode
NotDetected 0 Not detected
Detected 1 Detected
E RW SREQ Reset from [Link] detected
NotDetected 0 Not detected
Detected 1 Detected
F RW LOCKUP Reset from CPU lock-up detected
4418_1177 v0.7.1 63
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
NotDetected 0 Not detected
Detected 1 Detected
G RW CTRLAP Reset triggered through CTRL-AP
NotDetected 0 Not detected
Detected 1 Detected
[Link].15 POWERSTATUS
Address offset: 0x440
Modem domain power status
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R LTEMODEM LTE modem domain status
OFF 0 LTE modem domain is powered off
ON 1 LTE modem domain is powered on
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW GPREGRET General purpose retention register
Note: Registers INTEN on page 68, INTENSET on page 69, and INTENCLR on page 69 are
the same registers (at the same address) as corresponding registers in POWER — Power control on
page 58.
4418_1177 v0.7.1 64
Power and clock management
[Link] Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50005000 CLOCK : S
CLOCK US NA Clock control
0x40005000 CLOCK : NS
[Link].1 TASKS_HFCLKSTART
Address offset: 0x000
Start HFCLK source
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_HFCLKSTART Start HFCLK source
Trigger 1 Trigger task
[Link].2 TASKS_HFCLKSTOP
Address offset: 0x004
Stop HFCLK source
4418_1177 v0.7.1 65
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_HFCLKSTOP Stop HFCLK source
Trigger 1 Trigger task
[Link].3 TASKS_LFCLKSTART
Address offset: 0x008
Start LFCLK source
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_LFCLKSTART Start LFCLK source
Trigger 1 Trigger task
[Link].4 TASKS_LFCLKSTOP
Address offset: 0x00C
Stop LFCLK source
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_LFCLKSTOP Stop LFCLK source
Trigger 1 Trigger task
[Link].5 SUBSCRIBE_HFCLKSTART
Address offset: 0x080
Subscribe configuration for task HFCLKSTART
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task HFCLKSTART will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].6 SUBSCRIBE_HFCLKSTOP
Address offset: 0x084
Subscribe configuration for task HFCLKSTOP
4418_1177 v0.7.1 66
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task HFCLKSTOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].7 SUBSCRIBE_LFCLKSTART
Address offset: 0x088
Subscribe configuration for task LFCLKSTART
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task LFCLKSTART will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].8 SUBSCRIBE_LFCLKSTOP
Address offset: 0x08C
Subscribe configuration for task LFCLKSTOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task LFCLKSTOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link].9 EVENTS_HFCLKSTARTED
Address offset: 0x100
HFCLK oscillator started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_HFCLKSTARTED HFCLK oscillator started
NotGenerated 0 Event not generated
Generated 1 Event generated
4418_1177 v0.7.1 67
Power and clock management
[Link].10 EVENTS_LFCLKSTARTED
Address offset: 0x104
LFCLK started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_LFCLKSTARTED LFCLK started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link].11 PUBLISH_HFCLKSTARTED
Address offset: 0x180
Publish configuration for event HFCLKSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event HFCLKSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link].12 PUBLISH_LFCLKSTARTED
Address offset: 0x184
Publish configuration for event LFCLKSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event LFCLKSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link].13 INTEN
Address offset: 0x300
Enable or disable interrupt
4418_1177 v0.7.1 68
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW HFCLKSTARTED Enable or disable interrupt for event HFCLKSTARTED
Disabled 0 Disable
Enabled 1 Enable
B RW LFCLKSTARTED Enable or disable interrupt for event LFCLKSTARTED
Disabled 0 Disable
Enabled 1 Enable
[Link].14 INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW HFCLKSTARTED Write '1' to enable interrupt for event HFCLKSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW LFCLKSTARTED Write '1' to enable interrupt for event LFCLKSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link].15 INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW HFCLKSTARTED Write '1' to disable interrupt for event HFCLKSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW LFCLKSTARTED Write '1' to disable interrupt for event LFCLKSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link].16 INTPEND
Address offset: 0x30C
Pending interrupts
4418_1177 v0.7.1 69
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R HFCLKSTARTED Read pending status of interrupt for event HFCLKSTARTED
NotPending 0 Read: Not pending
Pending 1 Read: Pending
B R LFCLKSTARTED Read pending status of interrupt for event LFCLKSTARTED
NotPending 0 Read: Not pending
Pending 1 Read: Pending
[Link].17 HFCLKRUN
Address offset: 0x408
Status indicating that HFCLKSTART task has been triggered
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R STATUS HFCLKSTART task triggered or not
NotTriggered 0 Task not triggered
Triggered 1 Task triggered
[Link].18 HFCLKSTAT
Address offset: 0x40C
The register shows if HFXO has been requested by triggering HFCLKSTART task and if it has been started
(STATE)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R SRC Active clock source
HFXO 1 HFXO - 64 MHz clock derived from external 32 MHz crystal
oscillator
B R STATE HFCLK state
NotRunning 0 HFXO has not been started or HFCLKSTOP task has been
triggered
Running 1 HFXO has been started (HFCLKSTARTED event has been
generated)
[Link].19 LFCLKRUN
Address offset: 0x414
Status indicating that LFCLKSTART task has been triggered
4418_1177 v0.7.1 70
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R STATUS LFCLKSTART task triggered or not
NotTriggered 0 Task not triggered
Triggered 1 Task triggered
[Link].20 LFCLKSTAT
Address offset: 0x418
The register shows which LFCLK source has been requested (SRC) when triggering LFCLKSTART task and if
the source has been started (STATE)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R SRC Active clock source
RFU 0 Reserved for future use
LFRC 1 32.768 kHz RC oscillator
LFXO 2 32.768 kHz crystal oscillator
B R STATE LFCLK state
NotRunning 0 Requested LFCLK source has not been started or LFCLKSTOP
task has been triggered
Running 1 Requested LFCLK source has been started (LFCLKSTARTED
event has been generated)
[Link].21 LFCLKSRCCOPY
Address offset: 0x41C
Copy of LFCLKSRC register, set after LFCLKSTART task has been triggered
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A R SRC Clock source
RFU 0 Reserved for future use
LFRC 1 32.768 kHz RC oscillator
LFXO 2 32.768 kHz crystal oscillator
[Link].22 LFCLKSRC
Address offset: 0x518
Clock source for the LFCLK. LFCLKSTART task starts starts a clock source selected with this register.
4418_1177 v0.7.1 71
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW SRC Clock source
RFU 0 Reserved for future use (equals selecting LFRC)
LFRC 1 32.768 kHz RC oscillator
LFXO 2 32.768 kHz crystal oscillator
[Link] Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
REGULATORS :
0x50004000 S
REGULATORS US NA Regulator configuration
0x40004000 REGULATORS :
NS
[Link].1 SYSTEMOFF
Address offset: 0x500
System OFF register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W SYSTEMOFF Enable System OFF mode
Enable 1 Enable System OFF mode
[Link].2 DCDCEN
Address offset: 0x578
Enable DC/DC mode of the main voltage regulator
4418_1177 v0.7.1 72
Power and clock management
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW DCDCEN Enable DC/DC converter
Disabled 0 DC/DC mode is disabled
Enabled 1 DC/DC mode is enabled
4418_1177 v0.7.1 73
6 Peripherals
AHB multilayer
Public key
DMA
Engine control logic
SRAM accelerator
engine
CRYPTOCELL
APB
7
Not finalized at time of publishing (draft)
4418_1177 v0.7.1 74
Peripherals
6.1.1 Usage
The CRYPTOCELL state is controlled via a register interface. The cryptographic functions of CRYPTOCELL are
accessible by using a software library provided in the device SDK, not directly via a register interface.
To enable CRYPTOCELL, use register ENABLE on page 77.
4418_1177 v0.7.1 75
Peripherals
Any data stored in memory type(s) not accessible by the DMA engine must be copied to SRAM before it
can be processed by the CRYPTOCELL subsystem. Maximum DMA transaction size is limited to 216-1 bytes.
6.1.6 Standards
ARM® TrustZone® CryptoCell 310 (CRYPTOCELL) supports a number of cryptography standards.
4418_1177 v0.7.1 76
Peripherals
6.1.7 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50840000 CRYPTOCELL CRYPTOCELL S NSA CryptoCell sub-system control
interface
[Link] ENABLE
Address offset: 0x500
4418_1177 v0.7.1 77
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable the CRYPTOCELL subsystem
Disabled 0 CRYPTOCELL subsystem disabled
Enabled 1 CRYPTOCELL subsystem enabled
4418_1177 v0.7.1 78
Peripherals
Peripheral A
Channel X-1
Channel 0
Channel 1
Channel 2
PeripheralCore
events[0:N-1]
PPIBus ppiBusConsumer[0:X-1]
PeripheralCore
DPPI
controller
events[0:I-1]
tasks[0:J-1]
ppiBusProducer [0:X-1]
PPIBus ppiBusConsumer[0:X-1]
4418_1177 v0.7.1 79
Peripherals
PeripheralCore
event[N-1]
event[0]
PPIBus
EN EN
PUB[0] PUB[N-1]
CHIDX CHIDX
ppiBusProducer[X-1]
ppiBusProducer[0]
DPPI tasks flow on page 81 shows how peripheral tasks are triggered from different channels based on
the subscribe registers.
4418_1177 v0.7.1 80
Peripherals
ppiBusConsumer[X-1]
ppiBusConsumer[0]
ppiBusConsumer[1]
PPIBus
SUB[0] SUB[M-1]
CHIDX CHIDX
EN EN
task[M-1]
task[0]
PeripheralCore
Important: When a channel belongs to two (or more) groups, for example group m and n, and the
tasks CHG[m].EN and CHG[n].DIS occur simultaneously (m and n can be equal or different), the
CHG[m].EN task on that channel has priority. Meaning that enable tasks are prioritized over disable
tasks.
DPPIC tasks (for example CHG[0].EN) can be triggered through the DPPI system like any other task, which
means they can be hooked to a DPPI channel through the subscribe registers.
In order to write to CHG[x], the corresponding CHG[x].EN and CHG[x].DIS subscribe registers must be
disabled. Writes to CHG[x] are ignored when either subscribe register is enabled.
4418_1177 v0.7.1 81
Peripherals
One-to-one connection
This example shows how to create a one-to-one connection between TIMER compare register and SAADC
start task.
The channel configuration is set up first, TIMER0 will publish its COMPARE0 event on channel 0, and
SAADC will subscribe its START task to events on the same channel. After that, the channel is enabled in
the DPPI controller.
NRF_TIMER0->PUBLISH_COMPARE0 = (DPPI_PUB_CHIDX_Ch0) |
(DPPI_PUB_EN_Msk);
NRF_SAADC->SUBSCRIBE_START = (DPPI_SUB_CHIDX_Ch0) |
(DPPI_SUB_EN_Msk);
Many-to-many connection
The example shows how to create a many-to-many connection, also showcasing the use of the channel
group functionality of the DPPI controller.
A channel group, including only channel 0, is set up first. Then GPIOTE and TIMER0 configure their IN0
and COMPARE0 events respectively to be published on channel 0, while SAADC configures its START task
to subscribe to events on channel 0. The DPPI controller configures its CHG0 disable task to subscribe to
events on channel 0. This will effectively disable channel 0 after an event is received on channel 0. Finally,
channel 0 is enabled using the DPPI controller task to enable a channel group.
NRF_GPIOTE->PUBLISH_IN0 = (DPPI_PUB_CHIDX_Ch0) |
(DPPI_PUB_EN_Msk);
NRF_TIMER0->PUBLISH_COMPARE0 = (DPPI_PUB_CHIDX_Ch0) |
(DPPI_PUB_EN_Msk);
NRF_SAADC->SUBSCRIBE_START = (DPPI_SUB_CHIDX_Ch0) |
(DPPI_SUB_EN_Msk);
NRF_DPPIC->SUBSCRIBE_CHG[0].DIS = (DPPI_SUB_CHIDX_Ch0) |
(DPPI_SUB_EN_Msk);
NRF_DPPIC->TASK_CHG[0].EN = 1;
4418_1177 v0.7.1 82
Peripherals
The DPPIC is implemented as a "split-security" peripheral. It is therefore accessible by both secure and
non-secure accesses but the DPPIC behaves differently depending of the access type :
• A non-secure peripheral access will only be able to configure and control DPPI channels defined as non-
secure in the [Link][] register(s).
• A secure peripheral access can control all the DPPI channels, independently of the [Link][]
register(s).
The DPPIC allows the creation of a group of channels to be able to simultaneously enable or disable all
channels within a group . The security attribute of a group of channels (secure or non-secure) is defined as
follows:
• If all the channels (enabled or not) of a group are non-secure, then the group is considered as non-
secure
• If at least one of the channels (enabled or not) of the group is secure, then the group is considered as
secure
A non-secure access to a DPPIC register or a bitfield controlling a channel marked as secure in
[Link][].PERM register(s) will be ignored :
• Write accesses will have no effect
• Read accesses will always return a zero value
No exception is triggered when a non-secure access targets a register or bitfield controlling a secure
channel.
For example, if the bit i is set in the [Link][0].PERM register (declaring DPPI channel i as secure), then
• Non-secure write accesses to CHEN, CHENSET and CHENCLR registers will not be able to write to bit i of
those registers
• Non-secure write accesses to TASK_CHG[j].EN and TASK_CHG[j].DIS registers will be ignored if the
channel group j contains at least a channel defined as secure (it can be the channel i itself or any
channel declared as secure)
• Non-secure read accesses to registers CHEN, CHENSET and CHENCLR will always read a 0 for the bit at
position i
For the channel configuration registers ([Link][]), access from non-secure code is only possible if the
included channels are all non-secure, whether the channels are enabled or not. If a [Link][g] register
included one or more secure channel, then the group g is considered as secure and only a secure transfer
can read or write [Link][g]. A non-secure write access will be ignored and a non-secure read access
will return 0.
The DPPIC can subscribe to both secure or non-secure channel through the SUBSCRIBE_CHG[] registers in
order to trigger task for enabling or disabling groups of channels. But an event from a non-secure channel
will be ignored if the group subscribing to this channel is secure. A event from a secure channel can trigger
both secure and non-secure tasks.
6.2.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50017000 DPPIC : S
DPPIC SPLIT NA DPPI controller
0x40017000 DPPIC : NS
4418_1177 v0.7.1 83
Peripherals
4418_1177 v0.7.1 84
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W EN Enable channel group n
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W DIS Disable channel group n
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CHG[n].EN will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CHG[n].DIS will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] CHEN
Address offset: 0x500
Channel enable register
4418_1177 v0.7.1 85
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW CH[i] (i=0..15) Enable or disable channel i
Disabled 0 Disable channel
Enabled 1 Enable channel
[Link] CHENSET
Address offset: 0x504
Channel enable set register
Read: reads value of CH{i} field in CHEN register.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW CH[i] (i=0..15) Channel i enable set register. Writing '0' has no effect
Disabled 0 Read: channel disabled
Enabled 1 Read: channel enabled
Set 1 Write: Enable channel
[Link] CHENCLR
Address offset: 0x508
Channel enable clear register
Read: reads value of CH{i} field in CHEN register.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW CH[i] (i=0..15) Channel i enable clear register. Writing '0' has no effect
Disabled 0 Read: channel disabled
Enabled 1 Read: channel enabled
Clear 1 Write: disable channel
4418_1177 v0.7.1 86
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW CH[i] (i=0..15) Include or exclude channel i
Excluded 0 Exclude
Included 1 Include
6.3.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5001B000 EGU0 : S
EGU US NA Event generator unit 0
0x4001B000 EGU0 : NS
0x5001C000 EGU1 : S
EGU US NA Event generator unit 1
0x4001C000 EGU1 : NS
0x5001D000 EGU2 : S
EGU US NA Event generator unit 2
0x4001D000 EGU2 : NS
0x5001E000 EGU3 : S
EGU US NA Event generator unit 3
0x4001E000 EGU3 : NS
0x5001F000 EGU4 : S
EGU US NA Event generator unit 4
0x4001F000 EGU4 : NS
0x50020000 EGU5 : S
EGU US NA Event generator unit 5
0x40020000 EGU5 : NS
4418_1177 v0.7.1 87
Peripherals
4418_1177 v0.7.1 88
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_TRIGGER Trigger n for triggering the corresponding TRIGGERED[n]
event
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task TRIGGER[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TRIGGERED Event number n generated by triggering the corresponding
TRIGGER[n] task
NotGenerated 0 Event not generated
Generated 1 Event generated
4418_1177 v0.7.1 89
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TRIGGERED[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW TRIGGERED[i] (i=0..15) Enable or disable interrupt for event TRIGGERED[i]
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW TRIGGERED[i] (i=0..15) Write '1' to enable interrupt for event TRIGGERED[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
4418_1177 v0.7.1 90
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-P RW TRIGGERED[i] (i=0..15) Write '1' to disable interrupt for event TRIGGERED[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
4418_1177 v0.7.1 91
Peripherals
PIN0
ANAEN
GPIO port
DIR_OVERRIDE
DETECTMODE PIN[0].[Link]
OUT_OVERRIDE
PIN0 PIN0
DETECT LATCH OUT
PIN[0].OUT
O
PIN[0].IN
PIN[0].OUT PIN[0].CNF
PIN[0].[Link]
[Link]
Sense
[Link] ..
PIN[0].[Link] PIN[0].[Link]
PIN[0].[Link]
[Link]
PIN[0].IN I
PIN31 PIN31
IN PIN[31].OUT
PIN[31].IN
PIN[31].CNF
INPUT_OVERRIDE
ANAIN
4418_1177 v0.7.1 92
Peripherals
Important: The CPU can read the LATCH register at any time to check if a SENSE condition has been
met on one or more of the the GPIO pins, even if that condition is no longer met at the time the
CPU queries the LATCH register. This mechanism will work even if the LDETECT signal is not used as
the DETECT signal.
The LDETECT signal is by default not connected to the GPIO port's DETECT signal, but via the DETECTMODE
register it is possible to change from default behavior to DETECT signal being derived directly from the
LDETECT signal instead. See GPIO port and the GPIO pin details on page 92. DETECT signal behavior on
page 93 illustrates the DETECT signal behavior for these two alternatives.
[Link]
[Link]
[Link]
DETECT
(Default mode)
LATCH.31
LATCH.1
LATCH.0
DETECT
(LDETECT mode)
CPU
1 2 3 4
LATCH = (1<<1)
LATCH = (1<<1)
The input buffer of a GPIO pin can be disconnected from the pin to enable power savings when the pin is
not used as an input, see GPIO port and the GPIO pin details on page 92. Inputs must be connected to
get a valid input value in the IN register, and for the sense mechanism to get access to the pin.
Other peripherals in the system can connect to GPIO pins and override their output value and
configuration, or read their analog or digital input value. See GPIO port and the GPIO pin details on page
92.
Selected pins also support analog input signals, see ANAIN in GPIO port and the GPIO pin details on page
92. The assignment of the analog pins can be found in Pin assignments on page 379.
The following delays should be taken into considerations:
• There is 2 CPU clock cycles delay from the GPIO pad to the [Link] register
• The GPIO pad must be low (or high depending on the SENSE polarity) for 3 CPU clock cycles after
DETECT has gone high in order to generate a new DETECT signal
Important: When a pin is configured as digital input, care has been taken to minimize increased
current consumption when the input voltage is between VIL and VIH. However, it is a good practice
to ensure that the external circuitry does not drive that pin to levels between VIL and VIH for a long
period of time.
4418_1177 v0.7.1 93
Peripherals
4418_1177 v0.7.1 94
Peripherals
[Link][].PERM register
31 n 0
31 n 0 LATCH
PIN[0].DETECT
PIN[n].DETECT
PIN[31].DETECT
[Link] GPIO.DETECTMODE_SEC
1 0 0 1
DETECT_NSEC DETECT_SEC
to GPIOTE to GPIOTESEC
DETECT
6.4.3 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50842500 P0 : S General purpose input and
GPIO SPLIT NA
0x40842500 P0 : NS output
4418_1177 v0.7.1 95
Peripherals
[Link] OUT
Address offset: 0x004
Write GPIO port
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Pin i
Low 0 Pin driver is low
High 1 Pin driver is high
[Link] OUTSET
Address offset: 0x008
Set individual bits in GPIO port
Read: reads value of OUT register.
4418_1177 v0.7.1 96
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Pin i
Low 0 Read: pin driver is low
High 1 Read: pin driver is high
Set 1 Write: writing a '1' sets the pin high; writing a '0' has no
effect
[Link] OUTCLR
Address offset: 0x00C
Clear individual bits in GPIO port
Read: reads value of OUT register.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Pin i
Low 0 Read: pin driver is low
High 1 Read: pin driver is high
Clear 1 Write: writing a '1' sets the pin low; writing a '0' has no
effect
[Link] IN
Address offset: 0x010
Read GPIO port
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f R PIN[i] (i=0..31) Pin i
Low 0 Pin input is low
High 1 Pin input is high
[Link] DIR
Address offset: 0x014
Direction of GPIO pins
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Pin i
Input 0 Pin set as input
Output 1 Pin set as output
4418_1177 v0.7.1 97
Peripherals
[Link] DIRSET
Address offset: 0x018
DIR set register
Read: reads value of DIR register.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Set as output pin i
Input 0 Read: pin set as input
Output 1 Read: pin set as output
Set 1 Write: writing a '1' sets pin to output; writing a '0' has no
effect
[Link] DIRCLR
Address offset: 0x01C
DIR clear register
Read: reads value of DIR register.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Set as input pin i
Input 0 Read: pin set as input
Output 1 Read: pin set as output
Clear 1 Write: writing a '1' sets pin to input; writing a '0' has no
effect
[Link] LATCH
Address offset: 0x020
Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Status on whether PINi has met criteria set in
PIN_CNFi.SENSE register. Write '1' to clear.
NotLatched 0 Criteria has not been met
Latched 1 Criteria has been met
[Link] DETECTMODE
Address offset: 0x024
Select between default DETECT signal behaviour and LDETECT mode (For non-secure pin only)
4418_1177 v0.7.1 98
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW DETECTMODE Select between default DETECT signal behaviour and
LDETECT mode
Default 0 DETECT directly connected to PIN DETECT signals
LDETECT 1 Use the latched LDETECT behaviour
[Link] DETECTMODE_SEC
Address offset: 0x028
Select between default DETECT signal behaviour and LDETECT mode (For secure pin only)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW DETECTMODE Select between default DETECT signal behaviour and
LDETECT mode
Default 0 DETECT directly connected to PIN DETECT signals
LDETECT 1 Use the latched LDETECT behaviour
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E E D D D C C B A
Reset 0x00000002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
ID Access
Field Value ID Value Description
A RW DIR Pin direction. Same physical register as DIR register
Input 0 Configure pin as an input pin
Output 1 Configure pin as an output pin
B RW INPUT Connect or disconnect input buffer
Connect 0 Connect input buffer
Disconnect 1 Disconnect input buffer
C RW PULL Pull configuration
Disabled 0 No pull
Pulldown 1 Pull down on pin
Pullup 3 Pull up on pin
D RW DRIVE Drive configuration
S0S1 0 Standard '0', standard '1'
H0S1 1 High drive '0', standard '1'
S0H1 2 Standard '0', high drive '1'
H0H1 3 High drive '0', high 'drive '1''
D0S1 4 Disconnect '0' standard '1' (normally used for wired-or
connections)
D0H1 5 Disconnect '0', high drive '1' (normally used for wired-or
connections)
S0D1 6 Standard '0'. disconnect '1' (normally used for wired-and
connections)
4418_1177 v0.7.1 99
Peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E E D D D C C B A
Reset 0x00000002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
ID Access
Field Value ID Value Description
H0D1 7 High drive '0', disconnect '1' (normally used for wired-and
connections)
E RW SENSE Pin sensing mechanism
Disabled 0 Disabled
High 2 Sense for high level
Low 3 Sense for low level
1
Rise and fall times based on simulations
Up to three tasks can be used in each GPIOTE channel for performing write operations to a pin. Two tasks
are fixed (SET and CLR), and one (OUT) is configurable to perform following operations:
• Set
• Clear
• Toggle
An event can be generated in each GPIOTE channel from one of the following input conditions:
• Rising edge
• Falling edge
• Any change
Priority Task
1 OUT
2 CLR
3 SET
When setting the CONFIG[n] registers, MODE=Disabled does not have the same effect as MODE=Task and
POLARITY=None. In the latter case, a CLR or SET task occurring at the exact same time as OUT will end up
with no change on the pin, according to the priorities described in the table above.
When a GPIOTE channel is configured to operate on a pin as a task, the initial value of that pin is
configured in the OUTINIT field of CONFIG[n].
6.5.4 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5000D000 GPIOTE GPIOTE0 S NA Secure GPIO tasks and events
0x40031000 GPIOTE GPIOTE1 NS NA Non Secure GPIO tasks and
events
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_OUT Task for writing to pin specified in CONFIG[n].PSEL. Action
on pin is configured in CONFIG[n].POLARITY.
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SET Task for writing to pin specified in CONFIG[n].PSEL. Action
on pin is to set it high.
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CLR Task for writing to pin specified in CONFIG[n].PSEL. Action
on pin is to set it low.
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task OUT[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SET[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CLR[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_IN Event generated from pin specified in CONFIG[n].PSEL
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_PORT
Address offset: 0x17C
Event generated from multiple input GPIO pins with SENSE mechanism enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_PORT Event generated from multiple input GPIO pins with SENSE
mechanism enabled
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event IN[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_PORT
Address offset: 0x1FC
Publish configuration for event PORT
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event PORT will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW IN[i] (i=0..7) Write '1' to enable interrupt for event IN[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW PORT Write '1' to enable interrupt for event PORT
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW IN[i] (i=0..7) Write '1' to disable interrupt for event IN[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW PORT Write '1' to disable interrupt for event PORT
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D D B B B B B A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MODE Mode
Disabled 0 Disabled. Pin specified by PSEL will not be acquired by the
GPIOTE module.
Event 1 Event mode
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D D B B B B B A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
High 1 Task mode: Initial value of pin before task triggering is high
Subsystem 0
Channel M
Channel 0
Channel 1
Channel 2
System-Bus Cortex-Mx
NVIC
IRQ
eventOut[0..N]
IPC0 eventIn[0..N]
Subsystem 1
System-Bus Cortex-Mx
NVIC
IRQ
eventOut[0..K]
IPC1 eventIn[0..K]
Functional description
IPC block diagram on page 109 illustrates the Inter-Processor Communication (IPC) peripheral. In a
multi-core system, every CPU instance shall have one dedicated IPC peripheral. The IPC peripheral can be
used to send and receive events to and from other IPC peripherals. An instance of the IPC peripheral can
have #N send tasks and #N receive events. A single send task can be configured to signal an event on one
or more channels, and a receive event can be configured to listen on one or more channels. The channels
that are triggered in a send task can be configured through the SEND_CNF registers, and the channels
that trigger a receive event is configured through the RECEIVE_CNF registers. A send task can be viewed
as broadcasting events onto one or more channels, and a receive event can be seen as subscribing to a
subset of channels. It is possible for multiple IPCs to trigger events onto the same channel at the same
time, in this case it will look as a single event from the IPC subscriber.
The number of channels and send/receive events per IPC are implementation specific, and needs to be
looked up in the reference manual for your specific device.
An event itself often does not contain any relevant information itself other than to signal that "something
has occurred". Shared memory can be used to carry additional information between processors, e.g. in
the form of command/event queues. It is up to software to assign a logical functionality to a channel. For
instance one channel can be used to signal that a command is ready to be executed and any processor in
the system can subscribe to that particular channel and decode/execute the command.
Channel X
Channel 0
eventOut0
TASK_SEND[0]
eventOut N
TASK_SEND[N]
EVENTS_RECEIVE[0] eventIn1
EVENTS_RECEIVE[N] eventIn N
IPC SEND_CNF and RECEIVE_CNF on page 110 illustrates how the SEND_CNF and RECEIVE_CNF registers
work. A send task be connected to all channels, and a receive event can be connected to all channels.
6.6.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5002A000 IPC : S Interprocessor
IPC US NA
0x4002A000 IPC : NS communication
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SEND Trigger events on channel enabled in SEND_CNF[n].
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SEND[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RECEIVE Event received on one or more of the enabled channels in
RECEIVE_CNF[n].
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RECEIVE[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW RECEIVE[i] (i=0..7) Enable or disable interrupt for event RECEIVE[i]
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW RECEIVE[i] (i=0..7) Write '1' to enable interrupt for event RECEIVE[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW RECEIVE[i] (i=0..7) Write '1' to disable interrupt for event RECEIVE[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTPEND
Address offset: 0x30C
Pending interrupts
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H R RECEIVE[i] (i=0..7) Read pending status of interrupt for event RECEIVE[i]
NotPending 0 Read: Not pending
Pending 1 Read: Pending
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW CHEN[i] (i=0..7) Enable broadcasting on channel i.
Disable 0 Disable broadcast.
Enable 1 Enable broadcast.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-H RW CHEN[i] (i=0..7) Enable subscription to channel i.
Disable 0 Disable events.
Enable 1 Enable events.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW GPMEM General purpose memory
I2S
[Link]
Master clock MCK
generator
[Link]
[Link]
SDOUT
SDIN
LRCK
SCK
[Link]
[Link] EasyDMA
[Link]
RAM
6.7.1 Mode
The I2S protocol specification defines two modes of operation, Master and Slave.
The I2S mode decides which of the two sides (Master or Slave) shall provide the clock signals LRCK and
SCK, and these signals are always supplied by the Master to the Slave.
TX and RX are available in both Master and Slave modes and can be enabled/disabled independently in
the [Link] on page 130 and [Link] on page 129.
Transmission and/or reception is started by triggering the START task. When started and transmission
is enabled (in [Link] on page 130), the TXPTRUPD event will be generated for every
[Link] on page 133 number of transmitted data words (containing one or more samples).
Similarly, when started and reception is enabled (in [Link] on page 129), the RXPTRUPD event
will be generated for every [Link] on page 133 received data words.
[Link] [Link]
A A A A C C C C E
SDIN
B B B B D D D D F
SCK
LRCK
RXPTRUPD
RXPTRUPD
RXPTRUPD
TXPTRUPD
TXPTRUPD
TXPTRUPD
CPU
[Link] = D
[Link] = E
[Link] = F
[Link] = G
[Link] = H
[Link] = C
[Link] = A
[Link] = B
START
LRCK always toggles around the falling edge of the serial clock SCK.
When operating in Master mode the SCK is generated from the MCK, and the frequency of SCK is then
given as:
The falling edge of the SCK falls on the toggling edge of LRCK.
When operating in Slave mode SCK is provided by the external I2S master.
2. The MCK/LRCK ratio shall be a multiple of 2 * [Link], which can be formulated as:
The MCK signal can be routed to an output pin (specified in [Link]) to supply external I2S devices that
require the MCK to be supplied from the outside.
When operating in Slave mode, the I2S module does not use the MCK and the MCK generator does not
need to be enabled.
MCK
MCK
RATIO =
LRCK
LRCK
SWIDTH
SCK
• For data received on SDIN, all bits before the MSB of the sample value will be discarded.
• For data sent on SDOUT, all bits after the LSB of the sample value will be 0 (same behavior as for left-
alignment).
In the case where we use right-alignment and the number of SCK pulses per frame is lower than the
sample width, the following will apply:
• Data received on SDIN will be sign-extended to "sample width" number of bits before being written to
memory.
• Data sent on SDOUT will be truncated with the LSBs being removed first (same behavior as for left-
alignment).
frame
LRCK left right left
SCK
SDIN or SDOUT
frame
LRCK left right left
SCK
SDATA
6.7.7 EasyDMA
The I2S module implements EasyDMA for accessing internal Data RAM without CPU intervention.
The source and destination pointers for the TX and RX data are configured in [Link] on page 132 and
[Link] on page 132. The memory pointed to by these pointers will only be read or written when TX or
RX are enabled in [Link] on page 130 and [Link] on page 129.
The addresses written to the pointer registers [Link] on page 132 and [Link] on page 132 are
double-buffered in hardware, and these double buffers are updated for every [Link] on page
133 words (containing one or more samples) read/written from/to memory. The events TXPTRUPD and
RXPTRUPD are generated whenever the [Link] and [Link] are transferred to these double buffers.
If [Link] on page 132 is not pointing to the Data RAM region when transmission is enabled, or
[Link] on page 132 is not pointing to the Data RAM region when reception is enabled, an EasyDMA
transfer may result in a HardFault and/or memory corruption. See Memory on page 20 for more
information about the different memory regions.
Due to the nature of I2S, where the number of transmitted samples always equals the number of received
samples (at least when both TX and RX are enabled), one common register [Link] on page
133 is used for specifying the sizes of these two memory buffers. The size of the buffers is specified in
a number of 32-bit words. Such a 32-bit memory word can either contain four 8-bit samples, two 16-bit
samples or one right-aligned 24-bit sample sign extended to 32 bit.
In stereo mode ([Link]=Stereo), the samples are stored as "left and right sample pairs" in
memory. Figure Memory mapping for 8 bit stereo. [Link] = 8Bit, [Link] = Stereo.
on page 120, Memory mapping for 16 bit stereo. [Link] = 16Bit, [Link] = Stereo.
on page 120 and Memory mapping for 24 bit stereo. [Link] = 24Bit, [Link] =
Stereo. on page 121 show how the samples are mapped to memory in this mode. The mapping is valid
for both RX and TX.
In mono mode ([Link]=Left or Right), RX sample from only one channel in the frame is
stored in memory, the other channel sample is ignored. Illustrations Memory mapping for 8 bit mono.
[Link] = 8Bit, [Link] = Left. on page 120, Memory mapping for 16 bit mono, left
channel only. [Link] = 16Bit, [Link] = Left. on page 120 and Memory mapping
for 24 bit mono, left channel only. [Link] = 24Bit, [Link] = Left. on page 121
show how RX samples are mapped to memory in this mode.
For TX, the same outgoing sample read from memory is transmitted on both left and right in a frame,
resulting in a mono output stream.
31 24 23 16 15 8 7 0
Right sample 1 Left sample 1 Right sample 0 Left sample 0
[Link]
Figure 25: Memory mapping for 8 bit stereo. [Link] = 8Bit, [Link] = Stereo.
31 24 23 16 15 8 7 0
Figure 26: Memory mapping for 8 bit mono. [Link] = 8Bit, [Link] = Left.
31 16 15 0
Figure 27: Memory mapping for 16 bit stereo. [Link] = 16Bit, [Link] = Stereo.
31 16 15 0
31 23 0
Figure 29: Memory mapping for 24 bit stereo. [Link] = 24Bit, [Link] = Stereo.
31 23 0
// Enable reception
NRF_I2S->[Link] = (I2S_CONFIG_RXEN_RXEN_Enabled <<
I2S_CONFIG_RXEN_RXEN_Pos);
// Enable transmission
NRF_I2S->[Link] = (I2S_CONFIG_TXEN_TXEN_Enabled <<
I2S_CONFIG_TXEN_TXEN_Pos);
// Enable MCK generator
NRF_I2S->[Link] = (I2S_CONFIG_MCKEN_MCKEN_Enabled <<
I2S_CONFIG_MCKEN_MCKEN_Pos);
// MCKFREQ = 4 MHz
NRF_I2S->[Link] = I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV8 <<
I2S_CONFIG_MCKFREQ_MCKFREQ_Pos;
// Ratio = 256
NRF_I2S->[Link] = I2S_CONFIG_RATIO_RATIO_256X <<
I2S_CONFIG_RATIO_RATIO_Pos;
// MCKFREQ = 4 MHz and Ratio = 256 gives sample rate = 15.625 ks/s
// Sample width = 16 bit
NRF_I2S->[Link] = I2S_CONFIG_SWIDTH_SWIDTH_16Bit <<
I2S_CONFIG_SWIDTH_SWIDTH_Pos;
// Alignment = Left
NRF_I2S->[Link] = I2S_CONFIG_ALIGN_ALIGN_Left <<
I2S_CONFIG_ALIGN_ALIGN_Pos;
// Format = I2S
NRF_I2S->[Link] = I2S_CONFIG_FORMAT_FORMAT_I2S <<
I2S_CONFIG_FORMAT_FORMAT_Pos;
// Use stereo
NRF_I2S->[Link] = I2S_CONFIG_CHANNELS_CHANNELS_Stereo <<
I2S_CONFIG_CHANNELS_CHANNELS_Pos;
3. Configure TX and RX data pointers using the TXD, RXD and RXTXD registers
NRF_I2S->[Link] = my_tx_buf;
NRF_I2S->[Link] = my_rx_buf;
NRF_I2S->[Link] = MY_BUF_SIZE;
NRF_I2S->ENABLE = 1;
NRF_I2S->TASKS_START = 1;
6. Handle received and transmitted data when receiving the TXPTRUPD and RXPTRUPD events
if(NRF_I2S->EVENTS_TXPTRUPD != 0)
{
NRF_I2S->[Link] = my_next_tx_buf;
NRF_I2S->EVENTS_TXPTRUPD = 0;
}
if(NRF_I2S->EVENTS_RXPTRUPD != 0)
{
NRF_I2S->[Link] = my_next_rx_buf;
NRF_I2S->EVENTS_RXPTRUPD = 0;
}
6.7.10 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50028000 I2S : S
I2S US SA Inter-IC Sound
0x40028000 I2S : NS
[Link] TASKS_START
Address offset: 0x000
Starts continuous I2S transfer. Also starts MCK generator when this is enabled.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Starts continuous I2S transfer. Also starts MCK generator
when this is enabled.
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x004
Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the STOPPED event to be
generated.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stops I2S transfer. Also stops MCK generator. Triggering this
task will cause the STOPPED event to be generated.
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x084
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_RXPTRUPD
Address offset: 0x104
The [Link] register has been copied to internal double-buffers. When the I2S module is started and RX is
enabled, this event will be generated for every [Link] words that are received on the SDIN pin.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXPTRUPD The [Link] register has been copied to internal double-
buffers. When the I2S module is started and RX is enabled,
this event will be generated for every [Link]
words that are received on the SDIN pin.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_STOPPED
Address offset: 0x108
I2S transfer stopped.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED I2S transfer stopped.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXPTRUPD
Address offset: 0x114
The [Link] register has been copied to internal double-buffers. When the I2S module is started and TX is
enabled, this event will be generated for every [Link] words that are sent on the SDOUT pin.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXPTRUPD The [Link] register has been copied to internal double-
buffers. When the I2S module is started and TX is enabled,
this event will be generated for every [Link]
words that are sent on the SDOUT pin.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_RXPTRUPD
Address offset: 0x184
Publish configuration for event RXPTRUPD
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXPTRUPD will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_STOPPED
Address offset: 0x188
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXPTRUPD
Address offset: 0x194
Publish configuration for event TXPTRUPD
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXPTRUPD will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW RXPTRUPD Enable or disable interrupt for event RXPTRUPD
Disabled 0 Disable
Enabled 1 Enable
C RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
F RW TXPTRUPD Enable or disable interrupt for event TXPTRUPD
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW RXPTRUPD Write '1' to enable interrupt for event RXPTRUPD
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW TXPTRUPD Write '1' to enable interrupt for event TXPTRUPD
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW RXPTRUPD Write '1' to disable interrupt for event RXPTRUPD
Clear 1 Disable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW TXPTRUPD Write '1' to disable interrupt for event TXPTRUPD
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ENABLE
Address offset: 0x500
Enable I2S module.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable I2S module.
Disabled 0 Disable
Enabled 1 Enable
[Link] [Link]
Address offset: 0x504
I2S mode.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MODE I2S mode.
Master 0 Master mode. SCK and LRCK generated from internal master
clcok (MCK) and output on pins defined by [Link].
Slave 1 Slave mode. SCK and LRCK generated by external master
and received on pins defined by [Link]
[Link] [Link]
Address offset: 0x508
Reception (RX) enable.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RXEN Reception (RX) enable.
Disabled 0 Reception disabled and now data will be written to the
[Link] address.
Enabled 1 Reception enabled.
[Link] [Link]
Address offset: 0x50C
Transmission (TX) enable.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW TXEN Transmission (TX) enable.
Disabled 0 Transmission disabled and now data will be read from the
[Link] address.
Enabled 1 Transmission enabled.
[Link] [Link]
Address offset: 0x510
Master clock generator enable.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW MCKEN Master clock generator enable.
Disabled 0 Master clock generator disabled and [Link] not
connected(available as GPIO).
Enabled 1 Master clock generator running and MCK output on
[Link].
[Link] [Link]
Address offset: 0x514
Master clock generator frequency.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x20000000 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MCKFREQ Master clock generator frequency.
32MDIV8 0x20000000 32 MHz / 8 = 4.0 MHz
32MDIV10 0x18000000 32 MHz / 10 = 3.2 MHz
32MDIV11 0x16000000 32 MHz / 11 = 2.9090909 MHz
32MDIV15 0x11000000 32 MHz / 15 = 2.1333333 MHz
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x20000000 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
32MDIV16 0x10000000 32 MHz / 16 = 2.0 MHz
32MDIV21 0x0C000000 32 MHz / 21 = 1.5238095
32MDIV23 0x0B000000 32 MHz / 23 = 1.3913043 MHz
32MDIV30 0x08800000 32 MHz / 30 = 1.0666667 MHz
32MDIV31 0x08400000 32 MHz / 31 = 1.0322581 MHz
32MDIV32 0x08000000 32 MHz / 32 = 1.0 MHz
32MDIV42 0x06000000 32 MHz / 42 = 0.7619048 MHz
32MDIV63 0x04100000 32 MHz / 63 = 0.5079365 MHz
32MDIV125 0x020C0000 32 MHz / 125 = 0.256 MHz
[Link] [Link]
Address offset: 0x518
MCK / LRCK ratio.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000006 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
ID Access
Field Value ID Value Description
A RW RATIO MCK / LRCK ratio.
32X 0 LRCK = MCK / 32
48X 1 LRCK = MCK / 48
64X 2 LRCK = MCK / 64
96X 3 LRCK = MCK / 96
128X 4 LRCK = MCK / 128
192X 5 LRCK = MCK / 192
256X 6 LRCK = MCK / 256
384X 7 LRCK = MCK / 384
512X 8 LRCK = MCK / 512
[Link] [Link]
Address offset: 0x51C
Sample width.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW SWIDTH Sample width.
8Bit 0 8 bit.
16Bit 1 16 bit.
24Bit 2 24 bit.
[Link] [Link]
Address offset: 0x520
Alignment of sample within a frame.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ALIGN Alignment of sample within a frame.
Left 0 Left-aligned.
Right 1 Right-aligned.
[Link] [Link]
Address offset: 0x524
Frame format.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FORMAT Frame format.
I2S 0 Original I2S format.
Aligned 1 Alternate (left- or right-aligned) format.
[Link] [Link]
Address offset: 0x528
Enable channels.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHANNELS Enable channels.
Stereo 0 Stereo.
Left 1 Left only.
Right 2 Right only.
[Link] [Link]
Address offset: 0x538
Receive buffer RAM start address.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Receive buffer Data RAM start address. When receiving,
words containing samples will be written to this address.
This address is a word aligned Data RAM address.
[Link] [Link]
Address offset: 0x540
Transmit buffer RAM start address.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Transmit buffer Data RAM start address. When transmitting,
words containing samples will be fetched from this address.
This address is a word aligned Data RAM address.
[Link] [Link]
Address offset: 0x550
Size of RXD and TXD buffers.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT Size of RXD and TXD buffers in number of 32 bit words.
[Link] [Link]
Address offset: 0x560
Pin select for MCK signal.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x564
Pin select for SCK signal.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x568
Pin select for LRCK signal.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x56C
Pin select for SDIN signal.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x570
Pin select for SDOUT signal.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
tSCK_LRCK
LRCK
SCK
tS_SDIN tH_SDIN
SDIN
tS_SDOUT
tH_SDOUT
SDOUT
DEST PERM VALUE[0] VALUE[1] VALUE[2] VALUE[3] Write-once per half-word limitation,
restricted usage and readability
based on key header configuration.
The KMU is mapped as a stand-alone peripheral on the APB bus, while UICR is addressable on AHB and is
located in flash memory map. Access to the KMU and keys stored in UICR is only allowed in secure mode.
Access to the UICR memory map is equivalent to any other flash page access, except that the KMU will
enforce usage and read/write restrictions to different regions of the UICR memory map depending on
configuration.
For more information about the user information configuration registers, see chapter UICR — User
information configuration registers on page 41.
OTP
One-time programmable (OTP) memory is typically used for holding values that are written once, and
then never to be changed throughout the life-time of the product. The OTP region of UICR is emulated by
placing a write-once per halfword limitation on registers defined here.
Key storage
The key storage region contains multiple key slots, where each slot consists of a key header and an
associated key value. The key value is limited to 128 bits. Any key size greater than 128 bits must be
divided and distributed over multiple key slot instances.
Key headers are allocated an address range of 0x400 in the UICR memory map, allowing for a total of 128
keys to be addressable inside the key storage region.
Note: Use of the key storage region in UICR should be limited to keys with a certain life-span, and
not per-session derived keys where the CPU is involved in the key exchange.
Any restricted access requires an explicit key slot selection through the KMU register interface. Any illegal
access to restricted key slot registers will be blocked and word 0xDEADDEAD will be returned on AHB.
The OTP region has individual access control behavior, while access control to the key storage region is
configured on a per key slot basis. KMU FSM operates on only one key slot instance at a time, and the
permissions and usage restriction for a key value associated with a key slot can be configured individually.
Note: Even if the KMU can be configured as non-secure, all non-secure transactions will be
blocked.
CTRL-AP mailbox interface. Upon successful authentication of the external party, the secure boot code can
temporarily re-enable the CTRL-AP ERASEALL functionality.
6.8.4 Usage
This section describe specific KMU and UICR behavior in more detail, in order to help the reader to get a
better overview of its features and intended usage.
[Link] OTP
The OTP region of UICR contains user-defined static configuration of the device. The KMU emulates the
OTP functionality by placing a write-once per halfword limitation of registers defined in this region, i.e.
only halfwords containing all '1' can be written.
An OTP write transaction must consist of a full 32-bit word. Both halfwords can either be written
simultaneously or individually. The KMU FSM will block any write to a halfword in the OTP region if the
initial value of this half-word is not 0xFFFF. When writing halfwords individually, the non-active halfword
must be masked as 0xFFFF else the request will be blocked. I.e. writing 0x1234XXXX to an OTP
destination address which already contain the value 0xFFFFAABB must be configured as 0x1234FFFF.
The OTP destination address will contain the value 0x1234AABB after both write transactions have been
processed.
The KMU will also only allow AHB write transactions into the OTP region of UICR if the transaction is
secure. Any AHB write transaction to this region that does not satisfy the above requirements will be
ignored, and the [Link] register will be set to '1'.
Note: A key value distributed over multiple key slots should use the same key slot configuration in
its key headers, but the secure destination address for each key slot instance must be incremented
by 4 words (128 bits) for each key slot instance spanned.
Note: Write to flash must be enabled in NVMC->CONFIG prior to writing keys to flash, and
subsequently disabled once writing is complete.
Steps 1 through 5 above will be blocked if any of the following violations are detected:
• No key slot selected
• Non-empty key slot selected
• NVM destination address not empty
• AHB write to [Link][ID-1].VALUE[0-3] registers not belonging to selected key slot
APB APB
Secure APB
NVMC
FICR UICR
Write-only key Write-only key
registers registers
KMU
Peripheral[0] Peripheral[n]
EVENTS_KEYSLOT_PUSHED
TASKS_PUSH_KEYSLOT
SELECTKEYSLOT
NVMC
AHB APB
Note: If a key value is distributed over multiple key slots due to its key size, exceeding the
maximum 128-bit key value limitation, then each distributed key slot must be pushed individually in
order to transfer the entire key value over secure APB.
Step 3 will trigger other events than EVENTS_KEYSLOT_PUSHED if the following violations are
detected:
• EVENTS_KEYSLOT_ERROR:
• If no key slot is selected
• If a key slot has no destination address configured
• If when pushing a key slot, flash or peripheral returns an error
• If pushing a key slot when push permissions are disabled
• If attempting to push a key slot with default permissions
• EVENTS_KEYSLOT_REVOKED if a key slot is marked as revoked in its key header configuration
1. Key values that are not readable by the CPU, and thus depend on the tasks/events pattern to
be used by a peripheral, can no longer be pushed. If a revoked key slot is selected and task
TASKS_PUSH_KEYSLOT is started, the event EVENTS_KEYSLOT_REVOKED will be triggered.
2. Key values that are readable by the CPU can have their revoke bit set in order to instruct the KMU to
block future read requests for this key value. Any subsequent read operation to a revoked key value will
return word 0xDEADDEAD.
3. Published keys stored in a peripheral write-only key register are not affected by key revocation. If
secure code wants to enforce that a revoked key is no longer used by a peripheral for cryptographic
operations, the secure code need to reset the device and thus prevent the revoked key slot from being
published again.
6.8.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50039000 KMU : S
KMU SPLIT NA Key management unit
0x40039000 KMU : NS
[Link] TASKS_PUSH_KEYSLOT
Address offset: 0x0000
Push a key slot over secure APB
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_PUSH_KEYSLOT Push a key slot over secure APB
Trigger 1 Trigger task
[Link] EVENTS_KEYSLOT_PUSHED
Address offset: 0x100
Key successfully pushed over secure APB
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_KEYSLOT_PUSHED Key successfully pushed over secure APB
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_KEYSLOT_REVOKED
Address offset: 0x104
Key has been revoked and cannot be tasked for selection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_KEYSLOT_REVOKED Key has been revoked and cannot be tasked for selection
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_KEYSLOT_ERROR
Address offset: 0x108
No key slot selected, no destination address defined, or error during push operation
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_KEYSLOT_ERROR No key slot selected, no destination address defined, or
error during push operation
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW KEYSLOT_PUSHED Enable or disable interrupt for event KEYSLOT_PUSHED
Disabled 0 Disable
Enabled 1 Enable
B RW KEYSLOT_REVOKED Enable or disable interrupt for event KEYSLOT_REVOKED
Disabled 0 Disable
Enabled 1 Enable
C RW KEYSLOT_ERROR Enable or disable interrupt for event KEYSLOT_ERROR
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW KEYSLOT_PUSHED Write '1' to enable interrupt for event KEYSLOT_PUSHED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW KEYSLOT_REVOKED Write '1' to enable interrupt for event KEYSLOT_REVOKED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW KEYSLOT_ERROR Write '1' to enable interrupt for event KEYSLOT_ERROR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW KEYSLOT_PUSHED Write '1' to disable interrupt for event KEYSLOT_PUSHED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW KEYSLOT_REVOKED Write '1' to disable interrupt for event KEYSLOT_REVOKED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
C RW KEYSLOT_ERROR Write '1' to disable interrupt for event KEYSLOT_ERROR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTPEND
Address offset: 0x30C
Pending interrupts
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R KEYSLOT_PUSHED Read pending status of interrupt for event
KEYSLOT_PUSHED
NotPending 0 Read: Not pending
Pending 1 Read: Pending
B R KEYSLOT_REVOKED Read pending status of interrupt for event
KEYSLOT_REVOKED
NotPending 0 Read: Not pending
Pending 1 Read: Pending
C R KEYSLOT_ERROR Read pending status of interrupt for event KEYSLOT_ERROR
NotPending 0 Read: Not pending
Pending 1 Read: Pending
[Link] STATUS
Address offset: 0x40C
Status bits for KMU operation
This register is reset and re-written by the KMU whenever SELECTKEYSLOT is written
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R SELECTED Key slot ID successfully selected by the KMU
Disabled 0 No key slot ID selected by KMU
Enabled 1 Key slot ID successfully selected by KMU
B R BLOCKED Violation status
Disabled 0 No access violation detected
Enabled 1 Access violation detected and blocked
[Link] SELECTKEYSLOT
Address offset: 0x500
Select key slot ID to be read over AHB or pushed over secure APB when TASKS_PUSH_KEYSLOT is started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ID Select key slot ID to be read over AHB, or pushed over
secure APB, when TASKS_PUSH_KEYSLOT is started
Band-pass and
PDM to PCM
Decimation (left)
EasyDMA
Sampling
RAM
DIN
Band-pass and
PDM to PCM
Decimation (right)
filter which converts the PDM stream into 16-bit PCM samples, and filters and down-samples them to
reach the appropriate sample rate.
The EDGE field in the MODE register allows swapping Left and Right, so that Left will be sampled on rising
edge, and Right on falling.
The PDM module uses EasyDMA to store the samples coming out from the filters into one buffer in RAM.
Depending on the mode chosen in the OPERATION field in the MODE register, memory either contains
alternating left and right 16-bit samples (Stereo), or only left 16-bit samples (Mono).
To ensure continuous PDM sampling, it is up to the application to update the EasyDMA destination
address pointer as the previous buffer is filled.
The continuous transfer can be started or stopped by sending the START and STOP tasks. STOP becomes
effective after the current frame has finished transferring, which will generate the STOPPED event. The
STOPPED event indicates that all activity in the module are finished, and that the data is available in RAM
(EasyDMA has finished transferring as well). Attempting to restart before receiving the STOPPED event
may result in unpredictable behaviour.
Remember to check that the resulting values programmed into GAINL and GAINR fall within MinGain and
MaxGain.
6.9.4 EasyDMA
Samples will be written directly to RAM, and EasyDMA must be configured accordingly.
The address pointer for the EasyDMA channel is set in [Link] register. If the destination address set
in [Link] is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or
RAM corruption. See Memory on page 20 for more information about the different memory regions.
DMA supports Stereo (Left+Right 16-bit samples) and Mono (Left only) data transfer, depending on setting
in the OPERATION field in the MODE register. The samples are stored little endian.
[Link] Bits per sample Result stored per RAM Physical RAM allocated Result boundary indexes Note
word (32 bit words) in RAM
Stereo 32 (2x16) L+R ceil([Link]/2) R0=[31:16]; L0=[15:0] Default
Mono 16 2xL ceil([Link]/2) L1=[31:16]; L0=[15:0]
The destination buffer in RAM consists of one block, the size of which is set in [Link] register.
Format is number of 16-bit samples. The physical RAM allocated is always:
CLK CLK
CLK CLK
to GND on the respective microphone). It is strongly recommended to use two microphones of exactly the
same brand and type so that their timings in left and right operation match.
Vdd nRFxxxxx
CLK CLK
Vdd
CLK
L/R DATA
CLK
DIN
6.9.7 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50026000 PDM : S Pulse density modulation
PDM US SA
0x40026000 PDM : NS (digital microphone) interface
[Link] TASKS_START
Address offset: 0x000
Starts continuous PDM transfer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Starts continuous PDM transfer
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x004
Stops PDM transfer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stops PDM transfer
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x084
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STARTED
Address offset: 0x100
PDM transfer has started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STARTED PDM transfer has started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_STOPPED
Address offset: 0x104
PDM transfer has finished
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED PDM transfer has finished
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_END
Address offset: 0x108
The PDM has written the last sample specified by [Link] (or the last sample after a STOP task
has been received) to Data RAM
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_END The PDM has written the last sample specified by
[Link] (or the last sample after a STOP task has
been received) to Data RAM
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STARTED
Address offset: 0x180
Publish configuration for event STARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_STOPPED
Address offset: 0x184
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_END
Address offset: 0x188
Publish configuration for event END
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event END will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Enable or disable interrupt for event STARTED
Disabled 0 Disable
Enabled 1 Enable
B RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
C RW END Enable or disable interrupt for event END
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Write '1' to enable interrupt for event STARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW END Write '1' to enable interrupt for event END
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Write '1' to disable interrupt for event STARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW END Write '1' to disable interrupt for event END
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ENABLE
Address offset: 0x500
PDM module enable register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable PDM module
Disabled 0 Disable
Enabled 1 Enable
[Link] PDMCLKCTRL
Address offset: 0x504
PDM clock generator control
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x08400000 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FREQ PDM_CLK frequency
1000K 0x08000000 PDM_CLK = 32 MHz / 32 = 1.000 MHz
Default 0x08400000 PDM_CLK = 32 MHz / 31 = 1.032 MHz. Nominal clock for
RATIO=Ratio64.
1067K 0x08800000 PDM_CLK = 32 MHz / 30 = 1.067 MHz
1231K 0x09800000 PDM_CLK = 32 MHz / 26 = 1.231 MHz
1280K 0x0A000000 PDM_CLK = 32 MHz / 25 = 1.280 MHz. Nominal clock for
RATIO=Ratio80.
1333K 0x0A800000 PDM_CLK = 32 MHz / 24 = 1.333 MHz
[Link] MODE
Address offset: 0x508
Defines the routing of the connected PDM microphones' signals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OPERATION Mono or stereo operation
Stereo 0 Sample and store one pair (Left + Right) of 16bit samples
per RAM word R=[31:16]; L=[15:0]
Mono 1 Sample and store two successive Left samples (16 bit each)
per RAM word L1=[31:16]; L0=[15:0]
B RW EDGE Defines on which PDM_CLK edge Left (or mono) is sampled
LeftFalling 0 Left (or mono) is sampled on falling edge of PDM_CLK
LeftRising 1 Left (or mono) is sampled on rising edge of PDM_CLK
[Link] GAINL
Address offset: 0x518
Left output gain adjustment
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A
Reset 0x00000028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
ID Access
Field Value ID Value Description
A RW GAINL Left output gain adjustment, in 0.5 dB steps, around the
default module gain (see electrical parameters)
(...)
(...)
[Link] GAINR
Address offset: 0x51C
Right output gain adjustment
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A
Reset 0x00000028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
ID Access
Field Value ID Value Description
A RW GAINR Right output gain adjustment, in 0.5 dB steps, around the
default module gain (see electrical parameters)
MinGain 0x00 -20dB gain adjustment (minimum)
DefaultGain 0x28 0dB gain adjustment
MaxGain 0x50 +20dB gain adjustment (maximum)
[Link] RATIO
Address offset: 0x520
Selects the ratio between PDM_CLK and output sample rate. Change PDMCLKCTRL accordingly.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RATIO Selects the ratio between PDM_CLK and output sample rate
Ratio64 0 Ratio of 64
Ratio80 1 Ratio of 80
[Link] [Link]
Address offset: 0x540
Pin number configuration for PDM CLK signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x544
Pin number configuration for PDM DIN signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x560
RAM address pointer to write samples to with EasyDMA
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW SAMPLEPTR Address to write PDM samples to over DMA
[Link] [Link]
Address offset: 0x564
Number of samples to allocate memory for in EasyDMA mode
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW BUFFSIZE [0..32767] Length of DMA RAM allocation in number of samples
tPDM,CLK
CLK
DIN (L)
tPDM,cv tPDM,s tPDM,h=tPDM,ci
DIN(R)
PWM
START STARTED
EasyDMA
STOP STOPPED
SEQSTART[0]
SEQSTART[1]
SEQSTARTED[0]
SEQ[n].REFRESH SEQSTARTED[1]
Decoder SEQEND[0]
NEXTSTEP
SEQEND[1]
COMP0 [Link][0]
COMP1 [Link][1]
COMP2 [Link][2]
COMP3 [Link][3]
Carry/Reload
Wave Counter COUNTERTOP
PWM_CLK PRESCALER
value read from RAM (see figure Decoder memory access modes on page 161). Whether the counter
counts up, or up and down, is controlled by the MODE register.
The timer top value is controlled by the COUNTERTOP register. This register value, in conjunction with the
selected PRESCALER of the PWM_CLK, will result in a given PWM period. A COUNTERTOP value smaller
than the compare setting will result in a state where no PWM edges are generated. OUT[n] is held high,
given that the polarity is set to FallingEdge. All compare registers are internal and can only be configured
through decoder presented later. COUNTERTOP can be safely written at any time.
Sampling follows the START task. If [Link]=WaveForm, the register value is ignored and taken
from RAM instead (see section Decoder with EasyDMA on page 161 for more details). If [Link]
is anything else than the WaveForm, it is sampled following a STARTSEQ[n] task and when loading a new
value from RAM during a sequence playback.
The following figure shows the counter operating in up mode (MODE=PWM_MODE_Up), with three PWM
channels with the same frequency but different duty cycle:
COUNTERTOP
COMP1
COMP0
OUT[0]
OUT[1]
The counter is automatically reset to zero when COUNTERTOP is reached and OUT[n] will invert. OUT[n]
is held low if the compare value is 0 and held high if set to COUNTERTOP, given that the polarity is set to
FallingEdge. Counter running in up mode results in pulse widths that are edge-aligned. The following is the
code for the counter in up mode example:
When the counter is running in up mode, the following formula can be used to compute the PWM period
and the step size:
PWM period: TPWM(Up)= TPWM_CLK * COUNTERTOP
Step width/Resolution: Tsteps= TPWM_CLK
The following figure shows the counter operating in up-and-down mode
(MODE=PWM_MODE_UpAndDown), with two PWM channels with the same frequency but different duty
cycle and output polarity:
COUNTERTOP
COMP1
COMP0
OUT[0]
OUT[1]
The counter starts decrementing to zero when COUNTERTOP is reached and will invert the OUT[n] when
compare value is hit for the second time. This results in a set of pulses that are center-aligned. The
following is the code for the counter in up-and-down mode example:
When the counter is running in up-and-down mode, the following formula can be used to compute the
PWM period and the step size:
TPWM(Up And Down) = TPWM_CLK * 2 * COUNTERTOP
Step width/Resolution: Tsteps = TPWM_CLK * 2
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Id B A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Id RW Field Value Id Value Description
A RW COMPARE Duty cycle setting - value loaded to internal compare
register
B RW POLARITY Edge polarity of GPIO.
RisingEdge 0 First edge within the PWM period is rising
FallingEdge 1 First edge within the PWM period is falling
The DECODER register controls how the RAM content is interpreted and loaded into the internal compare
registers. The LOAD field controls if the RAM values are loaded to all compare channels, or to update a
group or all channels with individual values. The following figure illustrates how parameters stored in RAM
are organized and routed to various compare channels in different modes:
[Link]=Common [Link]=Grouped [Link]=Single
P COMP0 P P
SEQ[n].PTR O COMPARE COMP1 O COMPARE COMP0 O COMPARE COMP0
COMP2 COMP1
L COMP3 L L
P COMP0 P P
O COMPARE COMP1 O COMPARE COMP2 O COMPARE COMP1
COMP2 COMP3
L COMP3 L L
Increasing Data P
RAM address
... ... O COMPARE COMP2
L
P COMP0 P P
O COMPARE COMP1 O COMPARE COMP0 O COMPARE COMP3
COMP2 COMP1
L COMP3 L L
[Link]=WaveForm
P
O COMPARE COMP0
L
P
O COMPARE COMP1
L
P
O COMPARE COMP2
L
TOP COUNTERTOP
A special mode of operation is available when [Link] is set to WaveForm. In this mode, up to
three PWM channels can be enabled - OUT[0] to OUT[2]. In RAM, four values are loaded at a time: the
first, second and third location are used to load the values, and the fourth RAM location is used to load
the COUNTERTOP register. This way one can have up to three PWM channels with a frequency base that
changes on a per PWM period basis. This mode of operation is useful for arbitrary wave form generation
in applications, such as LED lighting.
The register SEQ[n].REFRESH=N (one per sequence n=0 or 1) will instruct a new RAM stored pulse width
value on every (N+1)th PWM period. Setting the register to zero will result in a new duty cycle update
every PWM period, as long as the minimum PWM period is observed.
Note that registers SEQ[n].REFRESH and SEQ[n].ENDDELAY are ignored when [Link]=NextStep.
The next value is loaded upon every received NEXTSTEP task.
SEQ[n].PTR is the pointer used to fetch COMPARE values from RAM. If the SEQ[n].PTR is not pointing to
a RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page
20 for more information about the different memory regions. After the SEQ[n].PTR is set to the desired
RAM location, the SEQ[n].CNT register must be set to number of 16-bit half words in the sequence. It is
important to observe that the Grouped mode requires one half word per group, while the Single mode
requires one half word per channel, thus increasing the RAM size occupation. If PWM generation is not
running when the SEQSTART[n] task is triggered, the task will load the first value from RAM and then start
the PWM generation. A SEQSTARTED[n] event is generated as soon as the EasyDMA has read the first
PWM parameter from RAM and the wave counter has started executing it. When [Link]=0, sequence
n=0 or 1 is played back once. After the last value in the sequence has been loaded and started executing,
a SEQEND[n] event is generated. The PWM generation will then continue with the last loaded value. The
following figure illustrates an example of such simple playback:
P P P P
COMPARE COMPARE COMPARE COMPARE
SEQ[0].PTR O O O O
0 1 2 3
L L L L
Figure depicts the source code used for configuration and timing details in a sequence where only
sequence 0 is used and only run once with a new PWM duty cycle for each period.
To completely stop the PWM generation and force the associated pins to a defined state, a STOP task can
be triggered at any time. A STOPPED event is generated when the PWM generation has stopped at the
end of currently running PWM period, and the pins go into their idle state as defined in GPIO OUT register.
PWM generation can then only be restarted through a SEQSTART[n] task. SEQSTART[n] will resume PWM
generation after having loaded the first value from the RAM buffer defined in the SEQ[n].PTR register.
The table below indicates when specific registers get sampled by the hardware. Care should be taken
when updating these registers to avoid that values are applied earlier than expected.
Every time a new value from sequence [0] has been loaded from When no more value from sequence [0] gets loaded from RAM
RAM and gets applied to the Wave Counter (indicated by the (indicated by the SEQEND[0] event)
PWMPERIODEND event)
At any time during sequence [1] (which starts when the
SEQSTARTED[1] event is generated)
SEQ[1].ENDDELAY When sending the SEQSTART[1] task Before starting sequence [1] through a SEQSTART[1] task
Every time a new value from sequence [1] has been loaded from When no more value from sequence [1] gets loaded from RAM
RAM and gets applied to the Wave Counter (indicated by the (indicated by the SEQEND[1] event)
PWMPERIODEND event)
At any time during sequence [0] (which starts when the
SEQSTARTED[0] event is generated)
SEQ[0].REFRESH When sending the SEQSTART[0] task Before starting sequence [0] through a SEQSTART[0] task
Every time a new value from sequence [0] has been loaded from At any time during sequence [1] (which starts when the
RAM and gets applied to the Wave Counter (indicated by the SEQSTARTED[1] event is generated)
PWMPERIODEND event)
SEQ[1].REFRESH When sending the SEQSTART[1] task Before starting sequence [1] through a SEQSTART[1] task
Every time a new value from sequence [1] has been loaded from At any time during sequence [0] (which starts when the
RAM and gets applied to the Wave Counter (indicated by the SEQSTARTED[0] event is generated)
PWMPERIODEND event)
COUNTERTOP In [Link]=WaveForm: this register is ignored. Before starting PWM generation through a SEQSTART[n] task
In all other LOAD modes: at the end of current PWM period After a STOP task has been triggered, and the STOPPED event has
(indicated by the PWMPERIODEND event) been received.
MODE Immediately Before starting PWM generation through a SEQSTART[n] task
After a STOP task has been triggered, and the STOPPED event has
been received.
DECODER Immediately Before starting PWM generation through a SEQSTART[n] task
After a STOP task has been triggered, and the STOPPED event has
been received.
PRESCALER Immediately Before starting PWM generation through a SEQSTART[n] task
After a STOP task has been triggered, and the STOPPED event has
been received.
LOOP Immediately Before starting PWM generation through a SEQSTART[n] task
After a STOP task has been triggered, and the STOPPED event has
been received.
[Link][n] Immediately Before enabling the PWM instance through the ENABLE register
Note: SEQ[n].REFRESH and SEQ[n].ENDDELAY are ignored at the end of a complex sequence,
indicated by a LOOPSDONE event. The reason for this is that the last value loaded from RAM
is maintained until further action from software (restarting a new sequence, or stopping PWM
generation).
P P
SEQ[0].PTR O COMPARE O COMPARE
L L
Event/Tasks
(continuation)
In this case, an automated playback takes place, consisting of SEQ[0], delay 0, SEQ[1], delay 1, then again
SEQ[0], etc. The user can choose to start a complex playback with SEQ[0] or SEQ[1] through sending the
SEQSTART[0] or SEQSTART[1] task. The complex playback always ends with delay 1.
The two sequences 0 and 1 are defined by the addresses of value tables in RAM (pointed to by
SEQ[n].PTR) and the buffer size (SEQ[n].CNT). The rate at which a new value is loaded is defined
individually for each sequence by SEQ[n].REFRESH. The chaining of sequence 1 following the sequence 0 is
implicit, the [Link] register allows the chaining of sequence 1 to sequence 0 for a determined number
of times. In other words, it allows to repeat a complex sequence a number of times in a fully automated
way.
In the following code example, sequence 0 is defined with SEQ[0].REFRESH set to 1, meaning that a
new PWM duty cycle is pushed every second PWM period. This complex sequence is started with the
SEQSTART[0] task, so SEQ[0] is played first. Since SEQ[0].ENDDELAY=1 there will be one PWM period delay
between last period on sequence 0 and the first period on sequence 1. Since SEQ[1].ENDDELAY=0 there
is no delay 1, so SEQ[0] would be started immediately after the end of SEQ[1]. However, as [Link] is
1, the playback stops after having played SEQ[1] only once, and both SEQEND[1] and LOOPSDONE are
generated (their order is not guaranteed in this case).
The decoder can also be configured to asynchronously load new PWM duty cycle. If the [Link]
register is set to NextStep, then the NEXTSTEP task will cause an update of internal compare registers on
the next PWM period.
The following figures provide an overview of each part of an arbitrary sequence, in various modes
([Link]=0 and [Link]>0). In particular, the following are represented:
• Initial and final duty cycle on the PWM output(s)
• Chaining of SEQ[0] and SEQ[1] if [Link]>0
• Influence of registers on the sequence
• Events generated during a sequence
• DMA activity (loading of next value and applying it to the output(s))
4418_1177 v0.7.1
Previously
loaded duty
Loop counter
EVENTS_SEQSTARTED[0]
SEQ[0].CNT
EVENTS_SEQEND[0]
SEQ[0].ENDDELA
Y
EVENTS_SEQSTARTED[1]
SEQ[1].CNT
[Link]
EVENTS_SEQEND[1]
SEQ[1].ENDDELA
cycle
Previously
loaded duty
Y
New value load
0% duty cycle
100% duty cycle
EVENTS_SEQSTARTED[0]
TASKS_SEQSTART[0]
SEQ[0].CNT EVENTS_SEQSTARTED[0]
EVENTS_SEQEND[0] SEQ[0].CNT
SEQ[0].ENDDELA
167
EVENTS_SEQEND[0]
Y SEQ[0].ENDDELA
EVENTS_SEQSTARTED[1] Y
SEQ[1].CNT
EVENTS_SEQEND[1]
([Link] - 1) ...
Figure 45: Single shot ([Link]=0)
EVENTS_SEQSTARTED[0]
duty cycle
last loaded
maintained
SEQ[0].CNT
EVENTS_SEQEND[0]
SEQ[0].ENDDELA
Y
1
EVENTS_SEQSTARTED[1]
SEQ[1].CNT
duty cycle
last loaded
maintained
Peripherals
Peripherals
SEQ[1].ENDDELA
SEQ[0].ENDDELA
SEQ[0].ENDDELA
SEQ[1].ENDDELA
SEQ[1].CNT
SEQ[0].CNT
SEQ[1].CNT
SEQ[0].CNT
SEQ[1].CNT
Y
Y
100% duty cycle
Previously
loaded last loaded
duty cycle duty cycle
maintained
0% duty cycle
EVENTS_SEQEND[0]
EVENTS_SEQEND[1]
EVENTS_SEQEND[0]
EVENTS_SEQEND[1]
EVENTS_LOOPSDONE
EVENTS_SEQSTARTED[1]
EVENTS_SEQSTARTED[0]
EVENTS_SEQSTARTED[1]
EVENTS_SEQSTARTED[0]
EVENTS_SEQSTARTED[1]
TASKS_SEQSTART[1]
Note: If a sequence is in use in a simple or complex sequence, it must have a length of SEQ[n].CNT
> 0.
6.10.3 Limitations
Previous compare value is repeated if the PWM period is shorter than the time it takes for the EasyDMA
to retrieve from RAM and update the internal compare registers. This is to ensure a glitch-free operation
even for very short PWM periods.
The idle state of a pin is defined by the OUT register in the GPIO module, to ensure that the pins used by
the PWM module are driven correctly. If PWM generation is stopped by triggering a STOP task, the PWM
module itself is temporarily disabled or the device temporarily enters System OFF. This configuration must
be retained in the GPIO for the selected pins (I/Os) for as long as the PWM module is supposed to be
connected to an external PWM circuit.
Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in
unpredictable behavior.
6.10.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50021000 PWM0 : S
PWM US SA Pulse width modulation unit 0
0x40021000 PWM0 : NS
0x50022000 PWM1 : S
PWM US SA Pulse width modulation unit 1
0x40022000 PWM1 : NS
0x50023000 PWM2 : S
PWM US SA Pulse width modulation unit 2
0x40023000 PWM2 : NS
0x50024000 PWM3 : S
PWM US SA Pulse width modulation unit 3
0x40024000 PWM3 : NS
[Link] TASKS_STOP
Address offset: 0x004
Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence
playback
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stops PWM pulse generation on all channels at the end of
current PWM period, and stops sequence playback
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SEQSTART Loads the first PWM value on all enabled channels from
sequence n, and starts playing that sequence at the rate
defined in SEQ[n]REFRESH and/or [Link]. Causes
PWM generation to start if not running.
Trigger 1 Trigger task
[Link] TASKS_NEXTSTEP
Address offset: 0x010
Steps by one value in the current sequence on all enabled channels if [Link]=NextStep. Does
not cause PWM generation to start if not running.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_NEXTSTEP Steps by one value in the current sequence on all enabled
channels if [Link]=NextStep. Does not cause
PWM generation to start if not running.
Trigger 1 Trigger task
[Link] SUBSCRIBE_STOP
Address offset: 0x084
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SEQSTART[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_NEXTSTEP
Address offset: 0x090
Subscribe configuration for task NEXTSTEP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task NEXTSTEP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STOPPED
Address offset: 0x104
Response to STOP task, emitted when PWM pulses are no longer generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED Response to STOP task, emitted when PWM pulses are no
longer generated
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_SEQSTARTED First PWM period started on sequence n
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_SEQEND Emitted at end of every sequence n, when last value from
RAM has been applied to wave counter
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_PWMPERIODEND
Address offset: 0x118
Emitted at the end of each PWM period
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_PWMPERIODEND Emitted at the end of each PWM period
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_LOOPSDONE
Address offset: 0x11C
Concatenated sequences have been played the amount of times defined in [Link]
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_LOOPSDONE Concatenated sequences have been played the amount of
times defined in [Link]
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STOPPED
Address offset: 0x184
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event SEQSTARTED[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event SEQEND[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_PWMPERIODEND
Address offset: 0x198
Publish configuration for event PWMPERIODEND
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event PWMPERIODEND will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_LOOPSDONE
Address offset: 0x19C
Publish configuration for event LOOPSDONE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event LOOPSDONE will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW SEQEND0_STOP Shortcut between event SEQEND[0] and task STOP
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
B RW SEQEND1_STOP Shortcut between event SEQEND[1] and task STOP
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
C RW LOOPSDONE_SEQSTART0 Shortcut between event LOOPSDONE and task SEQSTART[0]
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
D RW LOOPSDONE_SEQSTART1 Shortcut between event LOOPSDONE and task SEQSTART[1]
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
E RW LOOPSDONE_STOP Shortcut between event LOOPSDONE and task STOP
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
C-D RW SEQSTARTED[i] (i=0..1) Enable or disable interrupt for event SEQSTARTED[i]
Disabled 0 Disable
Enabled 1 Enable
E-F RW SEQEND[i] (i=0..1) Enable or disable interrupt for event SEQEND[i]
Disabled 0 Disable
Enabled 1 Enable
G RW PWMPERIODEND Enable or disable interrupt for event PWMPERIODEND
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Disabled 0 Disable
Enabled 1 Enable
H RW LOOPSDONE Enable or disable interrupt for event LOOPSDONE
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C-D RW SEQSTARTED[i] (i=0..1) Write '1' to enable interrupt for event SEQSTARTED[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E-F RW SEQEND[i] (i=0..1) Write '1' to enable interrupt for event SEQEND[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW PWMPERIODEND Write '1' to enable interrupt for event PWMPERIODEND
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW LOOPSDONE Write '1' to enable interrupt for event LOOPSDONE
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
B RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
C-D RW SEQSTARTED[i] (i=0..1) Write '1' to disable interrupt for event SEQSTARTED[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E-F RW SEQEND[i] (i=0..1) Write '1' to disable interrupt for event SEQEND[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW PWMPERIODEND Write '1' to disable interrupt for event PWMPERIODEND
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW LOOPSDONE Write '1' to disable interrupt for event LOOPSDONE
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ENABLE
Address offset: 0x500
PWM module enable register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable PWM module
Disabled 0 Disabled
Enabled 1 Enable
[Link] MODE
Address offset: 0x504
Selects operating mode of the wave counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW UPDOWN Selects up mode or up-and-down mode for the counter
Up 0 Up counter, edge-aligned PWM duty cycle
UpAndDown 1 Up and down counter, center-aligned PWM duty cycle
[Link] COUNTERTOP
Address offset: 0x508
Value up to which the pulse generator counter counts
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A
Reset 0x000003FF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW COUNTERTOP [3..32767] Value up to which the pulse generator counter counts. This
register is ignored when [Link]=WaveForm and
only values from RAM are used.
[Link] PRESCALER
Address offset: 0x50C
Configuration for PWM_CLK
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PRESCALER Prescaler of PWM_CLK
DIV_1 0 Divide by 1 (16 MHz)
DIV_2 1 Divide by 2 (8 MHz)
DIV_4 2 Divide by 4 (4 MHz)
DIV_8 3 Divide by 8 (2 MHz)
DIV_16 4 Divide by 16 (1 MHz)
DIV_32 5 Divide by 32 (500 kHz)
DIV_64 6 Divide by 64 (250 kHz)
DIV_128 7 Divide by 128 (125 kHz)
[Link] DECODER
Address offset: 0x510
Configuration of the decoder
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LOAD How a sequence is read from RAM and spread to the
compare register
Common 0 1st half word (16-bit) used in all PWM channels 0..3
Grouped 1 1st half word (16-bit) used in channel 0..1; 2nd word in
channel 2..3
Individual 2 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in ch.3
WaveForm 3 1st half word (16-bit) in ch.0; 2nd in ch.1; ...; 4th in
COUNTERTOP
B RW MODE Selects source for advancing the active sequence
RefreshCount 0 SEQ[n].REFRESH is used to determine loading internal
compare registers
NextStep 1 NEXTSTEP task causes a new value to be loaded to internal
compare registers
[Link] LOOP
Address offset: 0x514
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CNT Number of playbacks of pattern cycles
Disabled 0 Looping disabled (stop at the end of the sequence)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Beginning address in RAM of this sequence
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CNT Number of values (duty cycles) in this sequence
Disabled 0 Sequence is disabled, and shall not be started as it is empty
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW CNT Number of additional PWM periods between samples
loaded into compare register (load every [Link]+1
PWM periods)
Continuous 0 Update every PWM period
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CNT Time added after the sequence in PWM periods
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
32.768 kHz
RTC
STOP COUNTER
CLEAR OVRFLW
TRIGOVRFLW
CC[0:n]
CAPTURE[0:n] COMPARE[0:n]
The RTC module features a 24-bit COUNTER, a 12-bit (1/X) prescaler, capture/compare registers, and a tick
event generator for low power, tickless RTOS implementation.
When started, the RTC will automatically request the LFCLK source with RC oscillator if the LFCLK is not
already running.
See CLOCK — Clock control on page 64 for more information about clock sources.
The PRESCALER register is read/write when the RTC is stopped. Once the RTC is started, the prescaler
register is read-only and thus writing to it when the RTC is started has no effect.
The prescaler is restarted on tasks START, CLEAR and TRIGOVRFLW. That is, the prescaler value is latched to
an internal register (<<PRESC>>) on these tasks.
Examples:
1. Desired COUNTER frequency 100 Hz (10 ms counter period)
PRESCALER = round(32.768 kHz / 100 Hz) - 1 = 327
fRTC = 99.9 Hz
10009.576 μs counter period
2. Desired COUNTER frequency 8 Hz (125 ms counter period)
PRESCALER = round(32.768 kHz / 8 Hz) – 1 = 4095
fRTC = 8 Hz
125 ms counter period
SysClk
LFClk
TICK
PRESC 0x000
SysClk
LFClk
TICK
PRESC 0x001
6.11.4 Overflow
An OVRFLW event is generated on COUNTER register overflow (overflowing from 0xFFFFFF to 0).
The TRIGOVRFLW task will then set the COUNTER value to 0xFFFFF0, to allow software test of the overflow
condition.
This means that the RTC implements a slightly different task and event system compared to the standard
system described in Peripheral interface on page 15. The RTC task and event system is illustrated in the
figure below.
RTC
write
TASK
OR
task
RTC
core
event
EVTEN m INTEN m
EVENT m
IRQ signal to NVIC
6.11.7 Compare
The RTC implements one COMPARE event for every available capture/compare register.
When the COUNTER is incremented and then becomes equal to the value specified in the capture
compare register CC[n], the corresponding compare event COMPARE[n] is generated.
When setting a compare register, the following behavior of the RTC COMPARE event should be noted:
• If a CC register value is 0 when a CLEAR task is set, this will not trigger a COMPARE event.
SysClk
LFClk
PRESC 0x000
COUNTER X 0x000000
CLEAR
CC[0] 0x000000
COMPARE[0] 0
LFClk
PRESC 0x000
START
CC[0] N
COMPARE[0] 0
LFClk
PRESC 0x000
CC[0] N
COMPARE[0] 0 1
SysClk
LFClk
PRESC 0x000
CC[0] X N+2
COMPARE[0] 0 1
LFClk
PRESC 0x000
>= 0
CC[0] X N+1
COMPARE[0] 0
LFClk
PRESC 0x000
>= 0
CC[0] N X
COMPARE[0] 0 1
1. CLEAR and STOP (and TRIGOVRFLW; not shown) will be delayed as long as it takes for the peripheral to
clock a falling edge and rising of the LFCLK. This is between 15.2585 μs and 45.7755 μs – rounded to 15
μs and 46 μs for the remainder of the section.
SysClk
CLEAR
LFClk
PRESC 0x000
SysClk
STOP
LFClk
PRESC 0x000
COUNTER X X+1
LFClk
PRESC 0x000
>= ~15 us
START 0 or more SysClk before
SysClk
First tick
LFClk
PRESC 0x000
<= ~250 us
START
Task Delay
CLEAR, START, STOP, TRIGOVRFLOW +15 to 46 μs
Operation/Function Jitter
START to COUNTER increment +/- 15 μs
6.11.10 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50014000 RTC0 : S
RTC US NA Real time counter 0
0x40014000 RTC0 : NS
0x50015000 RTC1 : S
RTC US NA Real time counter 1
0x40015000 RTC1 : NS
8
Assumes RTC runs continuously between these events.
Note: 32.768 kHz clock jitter is additional to the numbers provided above.
[Link] TASKS_START
Address offset: 0x000
Start RTC counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Start RTC counter
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x004
Stop RTC counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop RTC counter
Trigger 1 Trigger task
[Link] TASKS_CLEAR
Address offset: 0x008
Clear RTC counter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CLEAR Clear RTC counter
Trigger 1 Trigger task
[Link] TASKS_TRIGOVRFLW
Address offset: 0x00C
Set counter to 0xFFFFF0
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_TRIGOVRFLW Set counter to 0xFFFFF0
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x084
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_CLEAR
Address offset: 0x088
Subscribe configuration for task CLEAR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CLEAR will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_TRIGOVRFLW
Address offset: 0x08C
Subscribe configuration for task TRIGOVRFLW
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task TRIGOVRFLW will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_TICK
Address offset: 0x100
Event on counter increment
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TICK Event on counter increment
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_OVRFLW
Address offset: 0x104
Event on counter overflow
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_OVRFLW Event on counter overflow
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_COMPARE Compare event on CC[n] match
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_TICK
Address offset: 0x180
Publish configuration for event TICK
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TICK will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_OVRFLW
Address offset: 0x184
Publish configuration for event OVRFLW
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event OVRFLW will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event COMPARE[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TICK Write '1' to enable interrupt for event TICK
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW OVRFLW Write '1' to enable interrupt for event OVRFLW
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C-F RW COMPARE[i] (i=0..3) Write '1' to enable interrupt for event COMPARE[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TICK Write '1' to disable interrupt for event TICK
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW OVRFLW Write '1' to disable interrupt for event OVRFLW
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C-F RW COMPARE[i] (i=0..3) Write '1' to disable interrupt for event COMPARE[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] EVTEN
Address offset: 0x340
Enable or disable event routing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TICK Enable or disable event routing for event TICK
Disabled 0 Disable
Enabled 1 Disable
B RW OVRFLW Enable or disable event routing for event OVRFLW
Disabled 0 Disable
Enabled 1 Disable
C-F RW COMPARE[i] (i=0..3) Enable or disable event routing for event COMPARE[i]
Disabled 0 Disable
Enabled 1 Disable
[Link] EVTENSET
Address offset: 0x344
Enable event routing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TICK Write '1' to enable event routing for event TICK
Disabled 0 Read: Disabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Enabled 1 Read: Enabled
Set 1 Enable
B RW OVRFLW Write '1' to enable event routing for event OVRFLW
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Set 1 Enable
C-F RW COMPARE[i] (i=0..3) Write '1' to enable event routing for event COMPARE[i]
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Set 1 Enable
[Link] EVTENCLR
Address offset: 0x348
Disable event routing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TICK Write '1' to disable event routing for event TICK
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Clear 1 Disable
B RW OVRFLW Write '1' to disable event routing for event OVRFLW
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Clear 1 Disable
C-F RW COMPARE[i] (i=0..3) Write '1' to disable event routing for event COMPARE[i]
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Clear 1 Disable
[Link] COUNTER
Address offset: 0x504
Current counter value
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R COUNTER Counter value
[Link] PRESCALER
Address offset: 0x508
12-bit prescaler for counter frequency (32768/(PRESCALER+1)). Must be written when RTC is stopped.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PRESCALER Prescaler value
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW COMPARE Compare value
6.12.2 Overview
The ADC supports up to eight external analog input channels, depending on package variant. It can be
operated in a one-shot mode with sampling under software control, or a continuous conversion mode
with a programmable sampling rate.
The analog inputs can be configured as eight single-ended inputs, four differential inputs or a combination
of these. Each channel can be configured to select AIN0 to AIN7 pins, or the VDD pin. Channels can be
sampled individually in one-shot or continuous sampling modes, or, using scan mode, multiple channels
can be sampled in sequence. Channels can also be oversampled to improve noise performance.
PSEL_A PSEL_A
PSEL_A
PSEL_A
PSEL_A PSEL_A
PSEL_A
PSEL_A
PSEL_A PSEL_A
PSEL_A
PSEL_A
CH[X].PSELP CH[X].CONFIG
NC
AIN0 ADC
AIN1
AIN2 RAM
AIN3
AIN4 MUX
AIN5 RESULT
P
AIN6 RESP RESULT
AIN7
VDD RESULT
SAR
GAIN EasyDMA RESULT
core
NC RESULT
AIN0 N
RESULT
AIN1 RESN RESULT
AIN2
RESULT
AIN3
AIN4 MUX [Link]
AIN5
AIN6
AIN7
VDD VDD
START REFSEL STARTED
Internal reference
SAMPLE END
STOP STOPPED
CH[X].PSELN
PSEL_A
PSEL_A
PSEL_A
PSEL_A
PSEL_A
PSEL_A
Internally, the ADC is always a differential analog-to-digital converter, but by default it is configured with
single-ended input in the MODE field of the CH[n].CONFIG register. In single-ended mode, the negative
input will be shorted to ground internally.
The assumption in single-ended mode is that the internal ground of the ADC is the same as the external
ground that the measured voltage is referred to. The ADC is thus sensitive to ground bounce on the PCB in
single-ended mode. If this is a concern we recommend using differential measurement.
where
V(P)
is the voltage at input P
V(N)
is the voltage at input N
GAIN
is the selected gain setting
REFERENCE
is the selected reference voltage
and m=0 if [Link]=SE, or m=1 if [Link]=Diff.
The result generated by the ADC will deviate from the expected due DC errors like offset, gain, differential
non-linearity (DNL), and integral non-linearity (INL). See Electrical specification for details on these
parameters. The result can also vary due to AC errors like non-linearities in the GAIN block, settling errors
due to high source impedance and sampling jitter. For battery measurement the DC errors are most
noticeable.
The ADC has a wide selection of gains controlled in the GAIN field of the CH[n].CONFIG register. If
CH[n].[Link]=0, the input range of the ADC core is nominally ±0.6 V differential and the input
must be scaled accordingly.
The ADC has a temperature dependent offset. If the ADC is to operate over a large temperature range, we
recommend running CALIBRATEOFFSET at regular intervals. The CALIBRATEDONE event will be fired when
the calibration has been completed. Note that the DONE and RESULTDONE events will also be generated.
Important: Channels selected for COMP cannot be used at the same time for ADC sampling,
though channels not selected for use by these blocks can be used by the ADC.
[Link] Oversampling
An accumulator in the ADC can be used to average noise on the analog input. In general, oversampling
improves the signal-to-noise ratio (SNR). Oversampling, however, does not improve the integral non-
linearity (INL), or differential non-linearity (DNL).
Oversampling and scan should not be combined, since oversampling and scan will average over input
channels.
The accumulator is controlled in the OVERSAMPLE register. The SAMPLE task must be set 2OVERSAMPLE
number of times before the result is written to RAM. This can be achieved by:
• Configuring a fixed sampling rate using the local timer or a general purpose timer and PPI to trigger a
SAMPLE task
• Triggering SAMPLE 2OVERSAMPLE times from software
• Enabling BURST mode
CH[n].[Link] can be enabled to avoid setting SAMPLE task 2OVERSAMPLE times. With BURST = 1 the
ADC will sample the input 2OVERSAMPLE times as fast as it can (actual timing: <(tACQ+tCONV)×2OVERSAMPLE).
Thus, for the user it will just appear like the conversion took a bit longer time, but other than that, it is
similar to one-shot mode.
A DONE event signals that one sample has been taken.
In this mode, the RESULTDONE event signals that enough conversions have taken place for an
oversampled result to get transferred into RAM. Note that both events may occur before the actual value
has been transferred into RAM by EasyDMA.
In this mode, the RESULTDONE event signals has the same meaning as DONE when no oversampling
takes place. Note that both events may occur before the actual values have been transferred into RAM by
EasyDMA.
Example of RAM placement (even [Link]), channels 1, 2 and 5 enabled on page 199 provides
an example of results placement in Data RAM, with an even [Link]. In this example, channels 1,
2 and 5 are enabled, all others are disabled.
31 16 15 0
st st
[Link] CH[2] 1 result CH[1] 1 result
nd
[Link] + 4 CH[1] 2 result CH[5] 1st result
(…)
[Link] +
2*([Link] – 2)
CH[5] last result CH[2] last result
Figure 63: Example of RAM placement (even [Link]), channels 1, 2 and 5 enabled
Example of RAM placement (odd [Link]), channels 1, 2 and 5 enabled on page 199 provides
an example of results placement in Data RAM, with an odd [Link]. In this example, channels 1, 2
and 5 are enabled, all others are disabled. The last 32-bit word is populated only with one 16-bit result.
31 16 15 0
st st
[Link] CH[2] 1 result CH[1] 1 result
nd
[Link] + 4 CH[1] 2 result CH[5] 1st result
(…)
[Link] +
2*([Link] – 1)
CH[5] last result
Figure 64: Example of RAM placement (odd [Link]), channels 1, 2 and 5 enabled
6.12.6 EasyDMA
After configuring [Link] and [Link], the ADC resources are started by triggering the START
task. The ADC is using EasyDMA to store results in a Result buffer in RAM.
The Result buffer is located at the address specified in the [Link] register. The [Link] register
is double-buffered and it can be updated and prepared for the next START task immediately after the
STARTED event is generated. The size of the Result buffer is specified in the [Link] register
and the ADC will generate an END event when it has filled up the Result buffer, see ADC on page 200.
Results are stored in little-endian byte order in Data RAM. Every sample will be sign extended to 16 bit
before stored in the Result buffer.
The ADC is stopped by triggering the STOP task. The STOP task will terminate an ongoing sampling. The
ADC will generate a STOPPED event when it has stopped. If the ADC is already stopped when the STOP task
is triggered, the STOPPED event will still be generated.
Data RAM
0x20000000
Result 0
0x20000002
Result 1
0x20000010
Result 2
0x20000012
Result 3
0x20000020
0
0x20000022
0
ADC
Sample and convert RAM Sample and convert RAM Sample and convert RAM Sample and convert RAM
STARTED
STARTED
END
END
Lifeline
1 2 3
[Link] = 0x20000000
[Link] = 0x20000010
[Link] = 0x20000020
SAMPLE
SAMPLE
SAMPLE
SAMPLE
[Link]
START
START
CNT
If the [Link] is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault
or RAM corruption. See Memory on page 20 for more information about the different memory regions.
The EasyDMA will have finished accessing the RAM when the END or STOPPED event has been generated.
The [Link] register can be read following an END event or a STOPPED event to see how many
results have been transferred to the Result buffer in RAM since the START task was triggered.
In scan mode, SAMPLE tasks can be triggered once the START task is triggered. The END event is generated
when the number of samples transferred to memory reaches the value specified by [Link].
After an END event, the START task needs to be triggered again before new samples can be taken. Also
make sure that the size of the Result buffer is large enough to have space for minimum one result from
each of the enabled channels, by specifying [Link] >= number of channels enabled. For more
information about the scan mode, see Scan mode on page 198.
RESP = Pullup
R
Input Output
RESP = Pulldown
Figure 66: Resistor ladder for positive input (negative input is equivalent, using RESN instead of RESP)
6.12.8 Reference
The ADC can use two different references, controlled in the REFSEL field of the CH[n].CONFIG register.
These are:
• Internal reference
• VDD as reference
The internal reference results in an input range of ±0.6 V on the ADC core. VDD as reference results in an
input range of ±VDD/4 on the ADC core. The gain block can be used to change the effective input range of
the ADC.
For example, choosing VDD as reference, single ended input (grounded negative input), and a gain of 1/4
the input range will be:
With internal reference, single ended input (grounded negative input), and a gain of 1/6 the input range
will be:
ADC
Rsource
TACQ
VIN
CH[n].[Link]
CH[n].[Link]
events
EVENTS_CH[n].LIMITH
EVENTS_CH[n].LIMITH
EVENTS_CH[n].LIMITH
EVENTS_CH[n].LIMITL
Note that when setting the limits, CH[n].[Link] shall always be higher than or equal to
CH[n].[Link] . In other words, an event can be fired only when the input signal has been sampled
outside of the defined limits. It is not possible to fire an event when the input signal is inside a defined
range by swapping high and low limits.
The comparison to limits always takes place, there is no need to enable it. If comparison is not required
on a channel, the software shall simply ignore the related events. In that situation, the value of the limits
registers is irrelevant, so it does not matter if CH[n].[Link] is lower than CH[n].[Link] or not.
6.12.11 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5000E000 SAADC : S
SAADC US SA Analog to digital converter
0x4000E000 SAADC : NS
[Link] TASKS_START
Address offset: 0x000
Start the ADC and prepare the result buffer in RAM
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Start the ADC and prepare the result buffer in RAM
Trigger 1 Trigger task
[Link] TASKS_SAMPLE
Address offset: 0x004
Take one ADC sample, if scan is enabled all channels are sampled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SAMPLE Take one ADC sample, if scan is enabled all channels are
sampled
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x008
Stop the ADC and terminate any on-going conversion
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop the ADC and terminate any on-going conversion
Trigger 1 Trigger task
[Link] TASKS_CALIBRATEOFFSET
Address offset: 0x00C
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CALIBRATEOFFSET Starts offset auto-calibration
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_SAMPLE
Address offset: 0x084
Subscribe configuration for task SAMPLE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SAMPLE will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x088
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_CALIBRATEOFFSET
Address offset: 0x08C
Subscribe configuration for task CALIBRATEOFFSET
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CALIBRATEOFFSET will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STARTED
Address offset: 0x100
The ADC has started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STARTED The ADC has started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_END
Address offset: 0x104
The ADC has filled up the Result buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_END The ADC has filled up the Result buffer
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_DONE
Address offset: 0x108
A conversion task has been completed. Depending on the mode, multiple conversions might be needed for
a result to be transferred to RAM.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_DONE A conversion task has been completed. Depending on the
mode, multiple conversions might be needed for a result to
be transferred to RAM.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RESULTDONE
Address offset: 0x10C
A result is ready to get transferred to RAM.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RESULTDONE A result is ready to get transferred to RAM.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_CALIBRATEDONE
Address offset: 0x110
Calibration is complete
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_CALIBRATEDONE Calibration is complete
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_STOPPED
Address offset: 0x114
The ADC has stopped
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED The ADC has stopped
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIMITH Last results is equal or above CH[n].[Link]
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIMITL Last results is equal or below CH[n].[Link]
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STARTED
Address offset: 0x180
Publish configuration for event STARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_END
Address offset: 0x184
Publish configuration for event END
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event END will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_DONE
Address offset: 0x188
Publish configuration for event DONE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event DONE will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RESULTDONE
Address offset: 0x18C
Publish configuration for event RESULTDONE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RESULTDONE will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_CALIBRATEDONE
Address offset: 0x190
Publish configuration for event CALIBRATEDONE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event CALIBRATEDONE will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_STOPPED
Address offset: 0x194
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event CH[n].LIMITH will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event CH[n].LIMITL will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Enable or disable interrupt for event STARTED
Disabled 0 Disable
Enabled 1 Enable
B RW END Enable or disable interrupt for event END
Disabled 0 Disable
Enabled 1 Enable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
C RW DONE Enable or disable interrupt for event DONE
Disabled 0 Disable
Enabled 1 Enable
D RW RESULTDONE Enable or disable interrupt for event RESULTDONE
Disabled 0 Disable
Enabled 1 Enable
E RW CALIBRATEDONE Enable or disable interrupt for event CALIBRATEDONE
Disabled 0 Disable
Enabled 1 Enable
F RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
G RW CH0LIMITH Enable or disable interrupt for event CH0LIMITH
Disabled 0 Disable
Enabled 1 Enable
H RW CH0LIMITL Enable or disable interrupt for event CH0LIMITL
Disabled 0 Disable
Enabled 1 Enable
I RW CH1LIMITH Enable or disable interrupt for event CH1LIMITH
Disabled 0 Disable
Enabled 1 Enable
J RW CH1LIMITL Enable or disable interrupt for event CH1LIMITL
Disabled 0 Disable
Enabled 1 Enable
K RW CH2LIMITH Enable or disable interrupt for event CH2LIMITH
Disabled 0 Disable
Enabled 1 Enable
L RW CH2LIMITL Enable or disable interrupt for event CH2LIMITL
Disabled 0 Disable
Enabled 1 Enable
M RW CH3LIMITH Enable or disable interrupt for event CH3LIMITH
Disabled 0 Disable
Enabled 1 Enable
N RW CH3LIMITL Enable or disable interrupt for event CH3LIMITL
Disabled 0 Disable
Enabled 1 Enable
O RW CH4LIMITH Enable or disable interrupt for event CH4LIMITH
Disabled 0 Disable
Enabled 1 Enable
P RW CH4LIMITL Enable or disable interrupt for event CH4LIMITL
Disabled 0 Disable
Enabled 1 Enable
Q RW CH5LIMITH Enable or disable interrupt for event CH5LIMITH
Disabled 0 Disable
Enabled 1 Enable
R RW CH5LIMITL Enable or disable interrupt for event CH5LIMITL
Disabled 0 Disable
Enabled 1 Enable
S RW CH6LIMITH Enable or disable interrupt for event CH6LIMITH
Disabled 0 Disable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Enabled 1 Enable
T RW CH6LIMITL Enable or disable interrupt for event CH6LIMITL
Disabled 0 Disable
Enabled 1 Enable
U RW CH7LIMITH Enable or disable interrupt for event CH7LIMITH
Disabled 0 Disable
Enabled 1 Enable
V RW CH7LIMITL Enable or disable interrupt for event CH7LIMITL
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Write '1' to enable interrupt for event STARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW END Write '1' to enable interrupt for event END
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW DONE Write '1' to enable interrupt for event DONE
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW RESULTDONE Write '1' to enable interrupt for event RESULTDONE
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW CALIBRATEDONE Write '1' to enable interrupt for event CALIBRATEDONE
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW CH0LIMITH Write '1' to enable interrupt for event CH0LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW CH0LIMITL Write '1' to enable interrupt for event CH0LIMITL
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW CH1LIMITH Write '1' to enable interrupt for event CH1LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW CH1LIMITL Write '1' to enable interrupt for event CH1LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
K RW CH2LIMITH Write '1' to enable interrupt for event CH2LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
L RW CH2LIMITL Write '1' to enable interrupt for event CH2LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
M RW CH3LIMITH Write '1' to enable interrupt for event CH3LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
N RW CH3LIMITL Write '1' to enable interrupt for event CH3LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
O RW CH4LIMITH Write '1' to enable interrupt for event CH4LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
P RW CH4LIMITL Write '1' to enable interrupt for event CH4LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Q RW CH5LIMITH Write '1' to enable interrupt for event CH5LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
R RW CH5LIMITL Write '1' to enable interrupt for event CH5LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
S RW CH6LIMITH Write '1' to enable interrupt for event CH6LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
T RW CH6LIMITL Write '1' to enable interrupt for event CH6LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Enabled 1 Read: Enabled
U RW CH7LIMITH Write '1' to enable interrupt for event CH7LIMITH
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
V RW CH7LIMITL Write '1' to enable interrupt for event CH7LIMITL
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STARTED Write '1' to disable interrupt for event STARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW END Write '1' to disable interrupt for event END
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW DONE Write '1' to disable interrupt for event DONE
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW RESULTDONE Write '1' to disable interrupt for event RESULTDONE
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW CALIBRATEDONE Write '1' to disable interrupt for event CALIBRATEDONE
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW CH0LIMITH Write '1' to disable interrupt for event CH0LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW CH0LIMITL Write '1' to disable interrupt for event CH0LIMITL
Clear 1 Disable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW CH1LIMITH Write '1' to disable interrupt for event CH1LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW CH1LIMITL Write '1' to disable interrupt for event CH1LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
K RW CH2LIMITH Write '1' to disable interrupt for event CH2LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
L RW CH2LIMITL Write '1' to disable interrupt for event CH2LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
M RW CH3LIMITH Write '1' to disable interrupt for event CH3LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
N RW CH3LIMITL Write '1' to disable interrupt for event CH3LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
O RW CH4LIMITH Write '1' to disable interrupt for event CH4LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
P RW CH4LIMITL Write '1' to disable interrupt for event CH4LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Q RW CH5LIMITH Write '1' to disable interrupt for event CH5LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
R RW CH5LIMITL Write '1' to disable interrupt for event CH5LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
S RW CH6LIMITH Write '1' to disable interrupt for event CH6LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
T RW CH6LIMITL Write '1' to disable interrupt for event CH6LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID V U T S R Q P O N M L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
U RW CH7LIMITH Write '1' to disable interrupt for event CH7LIMITH
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
V RW CH7LIMITL Write '1' to disable interrupt for event CH7LIMITL
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] STATUS
Address offset: 0x400
Status
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R STATUS Status
Ready 0 ADC is ready. No on-going conversion.
Busy 1 ADC is busy. Conversion in progress.
[Link] ENABLE
Address offset: 0x500
Enable or disable ADC
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable ADC
Disabled 0 Disable ADC
Enabled 1 Enable ADC
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PSELP Analog positive input channel
NC 0 Not connected
AnalogInput0 1 AIN0
AnalogInput1 2 AIN1
AnalogInput2 3 AIN2
AnalogInput3 4 AIN3
AnalogInput4 5 AIN4
AnalogInput5 6 AIN5
AnalogInput6 7 AIN6
AnalogInput7 8 AIN7
VDD 9 VDD
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PSELN Analog negative input, enables differential channel
NC 0 Not connected
AnalogInput0 1 AIN0
AnalogInput1 2 AIN1
AnalogInput2 3 AIN2
AnalogInput3 4 AIN3
AnalogInput4 5 AIN4
AnalogInput5 6 AIN5
AnalogInput6 7 AIN6
AnalogInput7 8 AIN7
VDD 9 VDD
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID G F E E E D C C C B B A A
Reset 0x00020000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RESP Positive channel resistor control
Bypass 0 Bypass resistor ladder
Pulldown 1 Pull-down to GND
Pullup 2 Pull-up to VDD
VDD1_2 3 Set input at VDD/2
B RW RESN Negative channel resistor control
Bypass 0 Bypass resistor ladder
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID G F E E E D C C C B B A A
Reset 0x00020000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Pulldown 1 Pull-down to GND
Pullup 2 Pull-up to VDD
VDD1_2 3 Set input at VDD/2
C RW GAIN Gain control
Gain1_6 0 1/6
Gain1_5 1 1/5
Gain1_4 2 1/4
Gain1_3 3 1/3
Gain1_2 4 1/2
Gain1 5 1
Gain2 6 2
Gain4 7 4
D RW REFSEL Reference control
Internal 0 Internal reference (0.6 V)
VDD1_4 1 VDD/4 as reference
E RW TACQ Acquisition time, the time the ADC uses to sample the input
voltage
3us 0 3 us
5us 1 5 us
10us 2 10 us
15us 3 15 us
20us 4 20 us
40us 5 40 us
F RW MODE Enable differential mode
SE 0 Single ended, PSELN will be ignored, negative input to ADC
shorted to GND
Diff 1 Differential
G RW BURST Enable burst mode
Disabled 0 Burst mode is disabled (normal operation)
Enabled 1 Burst mode is enabled. SAADC takes 2^OVERSAMPLE
number of samples as fast as it can, and sends the average
to Data RAM.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B B B B B B B B B B B B B B B B A A A A A A A A A A A A A A A A
Reset 0x7FFF8000 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LOW [-32768 to +32767] Low level limit
B RW HIGH [-32768 to +32767] High level limit
[Link] RESOLUTION
Address offset: 0x5F0
Resolution configuration
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW VAL Set the resolution
8bit 0 8 bit
10bit 1 10 bit
12bit 2 12 bit
14bit 3 14 bit
[Link] OVERSAMPLE
Address offset: 0x5F4
Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is
applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OVERSAMPLE Oversample control
Bypass 0 Bypass oversampling
Over2x 1 Oversample 2x
Over4x 2 Oversample 4x
Over8x 3 Oversample 8x
Over16x 4 Oversample 16x
Over32x 5 Oversample 32x
Over64x 6 Oversample 64x
Over128x 7 Oversample 128x
Over256x 8 Oversample 256x
[Link] SAMPLERATE
Address offset: 0x5F8
Controls normal or continuous sample rate
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CC [80..2047] Capture and compare value. Sample rate is 16 MHz/CC
B RW MODE Select mode for sample rate control
Task 0 Rate is controlled from SAMPLE task
Timers 1 Rate is controlled from local timer (use CC to control the
rate)
[Link] [Link]
Address offset: 0x62C
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x630
Maximum number of buffer words to transfer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT Maximum number of buffer words to transfer
[Link] [Link]
Address offset: 0x634
Number of buffer words transferred since last START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT Number of buffer words transferred since last START. This
register can be read after an END or STOPPED event.
a
Digital output code at zero volt differential input.
EG1/4 b
Error for Gain = 1/4 -3 3 %
EG1/2 b
Error for Gain = 1/2 -3 4 %
b
Does not include temperature drift
9
Maximum gain corresponds to highest capacitance.
START
STOP
SPIM
GPIO RAM
[Link] [Link]
buffer[0]
buffer[1]
MOSI Pin TXD+1 EasyDMA TXD buffer
buffer[[Link]-1]
[Link]
SCK Pin
buffer[0]
buffer[1]
MISO Pin RXD-1 EasyDMA RXD buffer
buffer[[Link]-1]
[Link] [Link]
STARTED
ENDRX
ENDTX
The SPIM does not implement support for chip select directly. Therefore, the CPU must use available
GPIOs to select the correct slave and control this independently of the SPI master. The SPIM supports SPI
modes 0 through 3. The CONFIG register allows setting CPOL and CPHA appropriately.
CPOL CPHA
SPI_MODE0 0 (Active High) 0 (Leading)
SPI_MODE1 0 (Active High) 1 (Trailing)
SPI_MODE2 1 (Active Low) 0 (Leading)
SPI_MODE3 1 (Active Low) 1 (Trailing)
If the ENDTX event has not already been generated when the SPI master has come to a stop, the SPI
master will generate the ENDTX event explicitly even though all bytes in the TXD buffer, as specified in the
[Link] register, have not been transmitted.
The SPI master is a synchronous interface, and for every byte that is sent, a different byte will be received
at the same time; this is illustrated in SPI master transaction on page 224.
CSN
SCK
ENDRX
ENDTX
CPU 1 2
START
6.13.3 EasyDMA
The SPI master implements EasyDMA for reading and writing of data packets from and to the DATA RAM
without CPU involvement.
[Link] and [Link] point to the RXD buffer (receive buffer) and TXD buffer (transmit buffer)
respectively, see SPIM — SPI master with EasyDMA on page 223. [Link] and [Link]
specify the maximum number of bytes allocated to the buffers. The SPI master will automatically
stop transmitting after [Link] bytes have been transmitted and [Link] bytes have been
received. If [Link] is larger than [Link], the superfluous received bytes will be ignored. If
[Link] is larger than [Link], the remaining transmitted bytes will contain the value defined
in the ORC register.
If [Link] and [Link] are not pointing to Data RAM region, an EasyDMA transfer may result in a
HardFault or RAM corruption. See Memory on page 20 for more information about the different memory
regions.
The .PTR and .MAXCNT registers are double-buffered. They can be updated and prepared for the next
transmission immediately after having received the STARTED event.
The ENDRX/ENDTX events indicate that EasyDMA has finished accessing the RX/TX buffer in RAM
respectively. The END events are generated when both RX and TX are finished accessing the buffers in
RAM.
EasyDMA supports the following list types:
• Array list
This array list does not provide a mechanism to explicitly specify where the next item in the list is located.
Instead, it assumes that the list is organized as a linear array where items are located one after the other
in RAM.
#define BUFFER_SIZE 4
ArrayList_type MyArrayList[3];
//replace 'Channel' below by the specific data channel you want to use,
// for instance 'NRF_SPIM->RXD', 'NRF_TWIM->RXD', etc.
[Link] = BUFFER_SIZE;
[Link] = &MyArrayList;
[Link] = &MyArrayList
Note: addresses are
assuming that
sizeof(buffer[n]) is one byte
0x20000000 : MyArrayList[0] buffer[0] buffer[1] buffer[2] buffer[3]
0x20000004 : MyArrayList[1] buffer[0] buffer[1] buffer[2] buffer[3]
0x20000008 : MyArrayList[2] buffer[0] buffer[1] buffer[2] buffer[3]
6.13.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50008000 SPIM0 : S
SPIM US SA SPI master 0
0x40008000 SPIM0 : NS
0x50009000 SPIM1 : S
SPIM US SA SPI master 1
0x40009000 SPIM1 : NS
0x5000A000 SPIM2 : S
SPIM US SA SPI master 2
0x4000A000 SPIM2 : NS
0x5000B000 SPIM3 : S
SPIM US SA SPI master 3
0x4000B000 SPIM3 : NS
[Link] TASKS_START
Address offset: 0x010
Start SPI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Start SPI transaction
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x014
Stop SPI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop SPI transaction
Trigger 1 Trigger task
[Link] TASKS_SUSPEND
Address offset: 0x01C
Suspend SPI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SUSPEND Suspend SPI transaction
Trigger 1 Trigger task
[Link] TASKS_RESUME
Address offset: 0x020
Resume SPI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_RESUME Resume SPI transaction
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x090
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x094
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_SUSPEND
Address offset: 0x09C
Subscribe configuration for task SUSPEND
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SUSPEND will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_RESUME
Address offset: 0x0A0
Subscribe configuration for task RESUME
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task RESUME will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STOPPED
Address offset: 0x104
SPI transaction has stopped
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED SPI transaction has stopped
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ENDRX
Address offset: 0x110
End of RXD buffer reached
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ENDRX End of RXD buffer reached
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_END
Address offset: 0x118
End of RXD buffer and TXD buffer reached
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_END End of RXD buffer and TXD buffer reached
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ENDTX
Address offset: 0x120
End of TXD buffer reached
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ENDTX End of TXD buffer reached
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_STARTED
Address offset: 0x14C
Transaction started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STARTED Transaction started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STOPPED
Address offset: 0x184
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ENDRX
Address offset: 0x190
Publish configuration for event ENDRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ENDRX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_END
Address offset: 0x198
Publish configuration for event END
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event END will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ENDTX
Address offset: 0x1A0
Publish configuration for event ENDTX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ENDTX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_STARTED
Address offset: 0x1CC
Publish configuration for event STARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW END_START Shortcut between event END and task START
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to enable interrupt for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ENDRX Write '1' to enable interrupt for event ENDRX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW END Write '1' to enable interrupt for event END
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ENDTX Write '1' to enable interrupt for event ENDTX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW STARTED Write '1' to enable interrupt for event STARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ENDRX Write '1' to disable interrupt for event ENDRX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW END Write '1' to disable interrupt for event END
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ENDTX Write '1' to disable interrupt for event ENDTX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW STARTED Write '1' to disable interrupt for event STARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ENABLE
Address offset: 0x500
Enable SPIM
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable SPIM
Disabled 0 Disable SPIM
Enabled 7 Enable SPIM
[Link] [Link]
Address offset: 0x508
Pin select for SCK
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x50C
Pin select for MOSI signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x510
Pin select for MISO signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] FREQUENCY
Address offset: 0x524
SPI frequency. Accuracy depends on the HFCLK source selected.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x04000000 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FREQUENCY SPI master data rate
K125 0x02000000 125 kbps
K250 0x04000000 250 kbps
K500 0x08000000 500 kbps
M1 0x10000000 1 Mbps
M2 0x20000000 2 Mbps
M4 0x40000000 4 Mbps
M8 0x80000000 8 Mbps
[Link] [Link]
Address offset: 0x534
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x538
Maximum number of bytes in receive buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in receive buffer
[Link] [Link]
Address offset: 0x53C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction
[Link] [Link]
Address offset: 0x540
EasyDMA list type
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIST List type
Disabled 0 Disable EasyDMA list
ArrayList 1 Use array list
[Link] [Link]
Address offset: 0x544
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x548
Maximum number of bytes in transmit buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in transmit buffer
[Link] [Link]
Address offset: 0x54C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction
[Link] [Link]
Address offset: 0x550
EasyDMA list type
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIST List type
Disabled 0 Disable EasyDMA list
ArrayList 1 Use array list
[Link] CONFIG
Address offset: 0x554
Configuration register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ORDER Bit order
MsbFirst 0 Most significant bit shifted out first
LsbFirst 1 Least significant bit shifted out first
B RW CPHA Serial clock (SCK) phase
Leading 0 Sample on leading edge of clock, shift serial data on trailing
edge
Trailing 1 Sample on trailing edge of clock, shift serial data on leading
edge
C RW CPOL Serial clock (SCK) polarity
ActiveHigh 0 Active high
ActiveLow 1 Active low
[Link] ORC
Address offset: 0x5C0
Over-read character. Character clocked out in case and over-read of the TXD buffer.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ORC Over-read character. Character clocked out in case and over-
read of the TXD buffer.
10
High bit rates may require GPIOs to be set as High Drive, see GPIO chapter for more details.
a
At 25pF load, including GPIO pin capacitance, see GPIO spec.
tCSCK
CPOL=0
CPHA=0
tWHSCK tRSCK
CPOL=1 tWLSCK tFSCK
SCK (out)
CPHA=0
CPOL=0
CPHA=1
CPOL=1
CPHA=1
tSUMI tHMI
MISO (in) MSb LSb
tVMO tHMO
MOSI (out) MSb LSb
SPIS
CSN MISO MOSI
ACQUIRE
ACQUIRED
END
DEF
OVERREAD
RAM
TXD RXD
TXD+1 RXD+1
TXD+2 RXD+2
TXD+n RXD+n
The SPIS supports SPI modes 0 through 3. The CONFIG register allows setting CPOL and CPHA
appropriately.
CPOL CPHA
SPI_MODE0 0 (Leading) 0 (Active High)
SPI_MODE1 0 (Leading) 1 (Active Low)
SPI_MODE2 1 (Trailing) 0 (Active High)
SPI_MODE3 1 (Trailing) 1 (Active Low)
6.14.2 EasyDMA
The SPI slave implements EasyDMA for reading and writing to and from the RAM. The END event indicates
that EasyDMA has finished accessing the buffer in RAM.
If the [Link] and the [Link] are not pointing to the Data RAM region, an EasyDMA transfer may result
in a HardFault or RAM corruption. See Memory on page 20 for more information about the different
memory regions.
transaction. In case of a race condition where the CPU and the SPI slave try to acquire the semaphore at
the same time, as illustrated in lifeline item 2 in SPI transaction when shortcut between END and ACQUIRE
is enabled on page 242, the semaphore will be granted to the CPU.
If the SPI slave acquires the semaphore, the transaction will be granted. The incoming data on MOSI will
be stored in the RXD buffer and the data in the TXD buffer will be clocked out on MISO.
When a granted transaction is completed and CSN goes high, the SPI slave will automatically release the
semaphore and generate the END event.
As long as the semaphore is available the SPI slave can be granted multiple transactions one after the
other. If the CPU is not able to reconfigure the [Link] and [Link] between granted transactions, the
same TX data will be clocked out and the RX buffers will be overwritten. To prevent this from happening,
the END_ACQUIRE shortcut can be used. With this shortcut enabled the semaphore will be handed over
to the CPU automatically after the granted transaction has completed, giving the CPU the ability to update
the TXPTR and RXPTR between every granted transaction.
If the CPU tries to acquire the semaphore while it is assigned to the SPI slave, an immediate handover
will not be granted. However, the semaphore will be handed over to the CPU as soon as the SPI slave
has released the semaphore after the granted transaction is completed. If the END_ACQUIRE shortcut
is enabled and the CPU has triggered the ACQUIRE task during a granted transaction, only one ACQUIRE
request will be served following the END event.
The MAXRX register specifies the maximum number of bytes the SPI slave can receive in one granted
transaction. If the SPI slave receives more than MAXRX number of bytes, an OVERFLOW will be indicated
in the STATUS register and the incoming bytes will be discarded.
The MAXTX parameter specifies the maximum number of bytes the SPI slave can transmit in one granted
transaction. If the SPI slave is forced to transmit more than MAXTX number of bytes, an OVERREAD will be
indicated in the STATUS register and the ORC character will be clocked out.
The [Link] and [Link] registers are updated when a granted transaction is completed.
The [Link] register indicates how many bytes were read from the TX buffer in the last transaction,
that is, ORC (over-read) characters are not included in this number. Similarly, the [Link] register
indicates how many bytes were written into the RX buffer in the last transaction.
The ENDRX event is generated when the RX buffer has been filled.
0 0 1 2 0 1 2
MISO
ACQUIRED
ACQUIRED
ACQUIRED
END
&
Lifeline
1 2 3 4
RELEASE
RELEASE
ACQUIRE
ACQUIRE
ACQUIRE
Figure 74: SPI transaction when shortcut between END and ACQUIRE is enabled
Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in
unpredictable behavior.
6.14.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50008000 SPIS0 : S
SPIS US SA SPI slave 0
0x40008000 SPIS0 : NS
0x50009000 SPIS1 : S
SPIS US SA SPI slave 1
0x40009000 SPIS1 : NS
0x5000A000 SPIS2 : S
SPIS US SA SPI slave 2
0x4000A000 SPIS2 : NS
0x5000B000 SPIS3 : S
SPIS US SA SPI slave 3
0x4000B000 SPIS3 : NS
[Link] TASKS_ACQUIRE
Address offset: 0x024
Acquire SPI semaphore
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_ACQUIRE Acquire SPI semaphore
Trigger 1 Trigger task
[Link] TASKS_RELEASE
Address offset: 0x028
Release SPI semaphore, enabling the SPI slave to acquire it
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_RELEASE Release SPI semaphore, enabling the SPI slave to acquire it
Trigger 1 Trigger task
[Link] SUBSCRIBE_ACQUIRE
Address offset: 0x0A4
Subscribe configuration for task ACQUIRE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task ACQUIRE will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_RELEASE
Address offset: 0x0A8
Subscribe configuration for task RELEASE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task RELEASE will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_END
Address offset: 0x104
Granted transaction completed
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_END Granted transaction completed
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ENDRX
Address offset: 0x110
End of RXD buffer reached
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ENDRX End of RXD buffer reached
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ACQUIRED
Address offset: 0x128
Semaphore acquired
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ACQUIRED Semaphore acquired
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_END
Address offset: 0x184
Publish configuration for event END
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event END will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ENDRX
Address offset: 0x190
Publish configuration for event ENDRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ENDRX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ACQUIRED
Address offset: 0x1A8
Publish configuration for event ACQUIRED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ACQUIRED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW END_ACQUIRE Shortcut between event END and task ACQUIRE
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW END Write '1' to enable interrupt for event END
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ENDRX Write '1' to enable interrupt for event ENDRX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW ACQUIRED Write '1' to enable interrupt for event ACQUIRED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW END Write '1' to disable interrupt for event END
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ENDRX Write '1' to disable interrupt for event ENDRX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
C RW ACQUIRED Write '1' to disable interrupt for event ACQUIRED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] SEMSTAT
Address offset: 0x400
Semaphore status register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A R SEMSTAT Semaphore status
Free 0 Semaphore is free
CPU 1 Semaphore is assigned to CPU
SPIS 2 Semaphore is assigned to SPI slave
CPUPending 3 Semaphore is assigned to SPI but a handover to the CPU is
pending
[Link] STATUS
Address offset: 0x440
Status from last transaction
Individual bits are cleared by writing a '1' to the bits that shall be cleared
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OVERREAD TX buffer over-read detected, and prevented
NotPresent 0 Read: error not present
Present 1 Read: error present
Clear 1 Write: clear error on writing '1'
B RW OVERFLOW RX buffer overflow detected, and prevented
NotPresent 0 Read: error not present
Present 1 Read: error present
Clear 1 Write: clear error on writing '1'
[Link] ENABLE
Address offset: 0x500
Enable SPI slave
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable SPI slave
Disabled 0 Disable SPI slave
Enabled 2 Enable SPI slave
[Link] [Link]
Address offset: 0x508
Pin select for SCK
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x50C
Pin select for MISO signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x510
Pin select for MOSI signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x514
Pin select for CSN signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PSELSCK [0..31] Pin number configuration for SPI SCK signal
Disconnected 0xFFFFFFFF Disconnect
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PSELMISO [0..31] Pin number configuration for SPI MISO signal
Disconnected 0xFFFFFFFF Disconnect
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PSELMOSI [0..31] Pin number configuration for SPI MOSI signal
Disconnected 0xFFFFFFFF Disconnect
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PSELCSN [0..31] Pin number configuration for SPI CSN signal
Disconnected 0xFFFFFFFF Disconnect
[Link] [Link]
Address offset: 0x534
RXD data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR RXD data pointer
[Link] [Link]
Address offset: 0x538
Maximum number of bytes in receive buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in receive buffer
[Link] [Link]
Address offset: 0x53C
Number of bytes received in last granted transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes received in the last granted transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RXDPTR RXD data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXRX [1..0x1FFF] Maximum number of bytes in receive buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNTRX [1..0x1FFF] Number of bytes received in the last granted transaction
[Link] [Link]
Address offset: 0x544
TXD data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR TXD data pointer
[Link] [Link]
Address offset: 0x548
Maximum number of bytes in transmit buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in transmit buffer
[Link] [Link]
Address offset: 0x54C
Number of bytes transmitted in last granted transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transmitted in last granted transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TXDPTR TXD data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXTX [1..0x1FFF] Maximum number of bytes in transmit buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNTTX [1..0x1FFF] Number of bytes transmitted in last granted transaction
[Link] CONFIG
Address offset: 0x554
Configuration register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ORDER Bit order
MsbFirst 0 Most significant bit shifted out first
LsbFirst 1 Least significant bit shifted out first
B RW CPHA Serial clock (SCK) phase
Leading 0 Sample on leading edge of clock, shift serial data on trailing
edge
Trailing 1 Sample on trailing edge of clock, shift serial data on leading
edge
C RW CPOL Serial clock (SCK) polarity
ActiveHigh 0 Active high
ActiveLow 1 Active low
[Link] DEF
Address offset: 0x55C
Default character. Character clocked out in case of an ignored transaction.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW DEF Default character. Character clocked out in case of an
ignored transaction.
[Link] ORC
Address offset: 0x5C0
Over-read character
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ORC Over-read character. Character clocked out after an over-
read of the transmit buffer.
11
High bit rates may require GPIOs to be set as High Drive, see GPIO chapter for more details.
12
The actual maximum data rate depends on the master's CLK to MISO and MOSI setup and hold
timings.
a
At 25pF load, including GPIO capacitance, see GPIO spec.
13
This is to ensure compatibility to SPI masters sampling MISO on the same edge as MOSI is output
CSN (in)
CPHA=0
tWHSCKIN tRSCKIN
CPOL=1 tWLSCKIN tFSCKIN
CPHA=0 tASO tDISSO
tASA tVSO tHSO tHSO
MISO (out) MSb LSb
tSUSI tHSI
MOSI (in) MSb LSb
CSN (in)
CPHA=1
tWHSCKIN tRSCKIN
CPOL=1 tWLSCKIN tFSCKIN
CPHA=1
tASO tVSO tHSO tDISSO
tASA
MISO (out) MSb LSb
tSUSI tHSI
MOSI (in) MSb LSb
CSN
CPOL=0
CPHA=1
CPOL=1
CPHA=1
tSUMI tHMI tDISSO
tASO tVSO tHSO tHSO
tASA
MISO MSb LSb
SPU
configuration
registers
RAM
Implementation Internal system logic
RAMBlocks
defined RAM
attribution unit Blocks
Cortex-M33 blocks
TrustZone-M (IDAU)
aware
CPU
Secure
control Peripherals
Bus logic
interconnect
Secure
Other control
bus logic
masters
Flash
Figure 77: Simplified view of the protection of RAM, flash and peripherals using SPU
[Link] Special considerations for ARM TrustZone for Cortex-M enabled system
For a ARM® TrustZone® for Cortex®-M enabled CPU, the SPU also controls custom logic.
Custom logic is shown as the implementation defined attribution unit (IDAU) in figure Simplified view of
the protection of RAM, flash and peripherals using SPU on page 257. Full support is provided for:
• ARM® TrustZone® for Cortex®-M related instructions, like test target (TT) for reporting the security
attributes of a region
• Non-secure callable (NSC) regions, to implement secure entry points from non-secure code
The SPU provides the necessary registers to configure the security attributes for memory regions and
peripherals. However, as a requirement to use the SPU, the secure attribution unit (SAU) needs to be
disabled and all memory set as non-secure in the ARM core. This will allow the SPU to control the IDAU
and set the security attribution of all addresses as originally intended.
Read
Allows data read access to the region. Note that code fetch from this region is not controlled by the
read permission but by the execute permission described below.
Write
Allows write or erase access to the region
Execute
Allows code fetch from this region, even if data read is disabled
Secure
Allows only bus accesses with the security attribute set to access the region
Permissions can be set independently. For example, it is possible to configure a flash region to be
accessible only through secure transfer, being read-only (no write allowed) and non-executable
(no code fetch allowed). For each region, permissions can be set and then locked by using the
FLASHPERM[].[Link] bit, to prevent subsequent modifications.
Note that the debugger is able to step through execute-protected memory regions.
The following figure shows the flash memory space and the divided regions:
UICR
Always secure
FICR
SPU registers
32 KB Region #x FLASHREGION[x].PERM
1 MB Access
control
32 KB Region #1
FLASHREGION[0].PERM
32 KB Region #0
0 Access error
Data bus 0 1
Address and control signals
(write) Data bus +
(read) Master identification
Error reporting
Bus error
SPU registers
FLASHNSC[0].REGION == x
FLASHNSC[0].SIZE == m
m !=0
Region #x+1
Region #x-1
FLASHREGION[0].PERM
Figure 79: Non-secure callable region definition in the flash memory space
For a Cortex®-M33 master, the SecureFault exception will take precedence over the BusFault exception if a
security violation occurs simultaneously with another type of violation.
Read
Allows data read access to the region. Code fetch from this region is not controlled by the read
permission but by the execute permission described below.
Write
Allows write access to the region
Execute
Allows code fetch from this region
Secure
Allows only bus accesses with the security attribute set to access the region
Permissions can be set independently. For example, it is possible to configure a RAM region to be
accessible only through secure transfer, being read-only (no write allowed) and non-executable (no
code fetch allowed). For each region, permissions can be set and then locked to prevent subsequent
modifications by using the RAMPERM[].[Link] bit.
The following figure shows the RAM memory space and the devided regions:
8 KB Region #31
8 KB Region #30
RAM7 SPU registers
8 KB Region #29
8 KB Region #28 RAMREGION[31].PERM
8 KB Region #(4x+3)
8 KB Region #(4x+2)
RAMREGION[i].PERM
RAMx 8 KB Region #(4x+1)
Access
256 KB control
8 KB Region #(4*x)
8 KB Region #3
8 KB Region #2
RAM0
8 KB Region #1 RAMREGION[0].PERM
8 KB Region #0
0 Access error
Data bus 0 1
Address and control signals
(write) Data bus +
(read) Master identification
Error reporting
Bus error
SPU registers
RAMNSC[0].REGION == x
RAMNSC[0].SIZE == m
m !=0
Region #x+1
Region #x-1
RAMREGION[0].PERM
Figure 81: Non-secure callable region definition in the RAM memory space
For a Cortex®-M33 master, the SecureFault exception will take precedence over the BusFault exception if a
security violation occurs simultaneously with another type of violation.
Always secure
For a peripheral related to system control
Always non-secure
For some general-purpose peripherals
Configurable
For general-purpose peripherals that may be configured for secure only access
The full list of peripherals and their corresponding security attributes can be found in Memory map on
page 22. For each peripheral with ID id, PERIPHID[id]. PERM will show whether the security attribute for
this peripheral is configurable or not.
If not hardcoded, the security attribute can configured using the PERIPHID[id].PERM.
At reset, all user-selectable and split security peripherals are set to be secure, with secure DMA where
present.
Secure code can access both secure peripherals and non-secure peripherals.
Peripherals with a split security mapping are available at an address starting with:
• 0x4XXX_XXXX for non-secure access and 0x5XXX_XXXX for secure access, if the peripheral security
attribute is set to non-secure
• Secure registers in the 0x4XXX_XXXX range are not visible for secure or non-secure code, and an
attempt to access such a register will result in write-ignore, read-as-zero behavior
• Secure code can access both non-secure and secure registers in the 0x5XXX_XXXX range
• 0x5XXX_XXXX, if the peripheral security attribute is set to secure
Any attempt to access the 0x5000_0000-0x5FFF_FFFF address range from non-secure code will be ignored
and generate a SecureFault exception.
The table below illustrates the address mapping for the three type of peripherals in all possible
configurations
Table 77: Peripheral's address mapping in relation to its security-features and configuration
Peripherals can select the pin(s) they need access to through their PSEL register(s). If a peripheral has
its attribute set to non-secure, but one of its PSEL registers selects a pin with the attribute set to secure,
the SPU controlled logic will ensure that the pin selection is not propagated. In addition, the pin value
will always be read as zero, to prevent a non-secure peripheral from obtaining a value from a secure pin.
Whereas access to other pins with attribute set as non-secure will not be blocked.
Peripherals located in other domains (other than the application domain) can access pins only if the
security attribute of the domain allows access to the pins they are trying to access. That is, secure domains
can access both secure and non-secure pins, whereas non-secure domains can only access non-secure
pins. This is illustrated in the following figure:
SPU
SECATTR [Link][0].PERM
SECATTR [Link][1].PERM
Peripherals
P0.0
EXTDOMAIN[0]
Security
control unit [Link]
[Link]
P0.31 Pin
control
logic
P1.0
Security Peripherals
control unit
EXTDOMAIN[1]
SPU [Link]
P1.n
[Link][0].PERM [Link]
[Link][1].PERM
Application MCU
Figure 82: Pin access for domains other than the application domain
The DETECT_NSEC signal is routed to the non-secure GPIOTE peripheral, GPIOTE1, allowing generation of
events and interrupts from pins marked as non-secured. The DETECT_SEC signal is routed to the secure
GPIOTE peripheral, GPIOTE0, allowing generation of events and interrupts from pins marked as secured.
The following figure illustrates how the DETECT_NSEC and DETECT_SEC signals are generated from the
GPIO PIN[].DETECT signals.
[Link][].PERM register
31 n 0
31 n 0 LATCH
PIN[0].DETECT
PIN[n].DETECT
PIN[31].DETECT
[Link] GPIO.DETECTMODE_SEC
1 0 0 1
DETECT_NSEC DETECT_SEC
to GPIOTE1 to GPIOTE0
DETECT
Event
(to peripheral core)
Peripheral registers
Security
check
SUBSCRIBE_XXXX
DPPI channel[n]
DPPI channel[0]
No error reporting mechanism is associated with the DPPI access control logic.
• Non-secure read accesses to registers CHEN, CHENSET and CHENCLR will always read zero for the bit at
position i
For the channel configuration registers ([Link][...]), access from non-secure code is only possible if
the included channels are all non-secure, whether the channels are enabled or not. If a [Link][g]
register included one or more secure channels, then the group gis considered as secure and only a secure
transfer can read or write [Link][g]. A non-secure write will be ignored and a non-secure read will
return zero.
The DPPIC can subscribe to secure or non-secure channels through SUBSCRIBE_CHG[] registers in order to
trigger task for enabling or disabling groups of channels. But an event from a non-secure channel will be
ignored if the group subscribing to this channel is secure. An event from a secure channel can trigger both
secure and non-secure tasks.
The figure below illustrates how the security control units are used to assign security attributes to
transfers initiated by the external domains:
SPU
SECATTR [Link][0].PERM
SECATTR [Link][1].PERM
SECATTR [Link][n].PERM
RAM
Blocks
RAM
RAM
Blocks
blocks Security
control External domain[0]
unit
Access
Peripherals control
logic
Security
control External domain [n]
unit
Other
bus
masters
Application MCU
Note: TrustZone® ID should not be confounded with the peripheral ID used to identify peripherals.
6.15.9 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50003000 SPU SPU S NA System Protection Unit
[Link] EVENTS_RAMACCERR
Address offset: 0x100
A security violation has been detected for the RAM memory space
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RAMACCERR A security violation has been detected for the RAM memory
space
[Link] EVENTS_FLASHACCERR
Address offset: 0x104
A security violation has been detected for the flash memory space
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_FLASHACCERR A security violation has been detected for the flash memory
space
[Link] EVENTS_PERIPHACCERR
Address offset: 0x108
A security violation has been detected on one or several peripherals
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_PERIPHACCERR A security violation has been detected on one or several
peripherals
[Link] PUBLISH_RAMACCERR
Address offset: 0x180
Publish configuration for event RAMACCERR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RAMACCERR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_FLASHACCERR
Address offset: 0x184
Publish configuration for event FLASHACCERR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event FLASHACCERR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_PERIPHACCERR
Address offset: 0x188
Publish configuration for event PERIPHACCERR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event PERIPHACCERR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RAMACCERR Enable or disable interrupt for event RAMACCERR
Disabled 0 Disable
Enabled 1 Enable
B RW FLASHACCERR Enable or disable interrupt for event FLASHACCERR
Disabled 0 Disable
Enabled 1 Enable
C RW PERIPHACCERR Enable or disable interrupt for event PERIPHACCERR
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RAMACCERR Write '1' to enable interrupt for event RAMACCERR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW FLASHACCERR Write '1' to enable interrupt for event FLASHACCERR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW PERIPHACCERR Write '1' to enable interrupt for event PERIPHACCERR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RAMACCERR Write '1' to disable interrupt for event RAMACCERR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW FLASHACCERR Write '1' to disable interrupt for event FLASHACCERR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW PERIPHACCERR Write '1' to disable interrupt for event PERIPHACCERR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] CAP
Address offset: 0x400
Show implemented features for the current device
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A R TZM Show ARM TrustZone status
NotAvailable 0 ARM TrustZone support not available
Enabled 1 ARM TrustZone support is available
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW SECUREMAPPING Define configuration capabilities for TrustZone Cortex-M
secure attribute
NonSecure 0 The bus access from this external domain always have the
non-secure attribute set
Secure 1 The bus access from this external domain always have the
secure attribute set
UserSelectable 2 Non-secure or secure attribute for bus access from this
domain is defined by the EXTDOMAIN[n].PERM register
B RW SECATTR Peripheral security mapping
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID P O N M L K J I H G F E D C B A
Reset 0x0000FFFF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A-P RW CHANNEL[i] (i=0..15) Select secure attribute.
Secure 1 Channeli has its secure attribute set
NonSecure 0 Channeli has its non-secure attribute set
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LOCK
Locked 1 DPPI[n].PERM register can't be changed until next reset
Unlocked 0 DPPI[n].PERM register content can be changed
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID f e d c b a Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A-f RW PIN[i] (i=0..31) Select secure attribute attribute for PIN i.
Secure 1 Pin i has its secure attribute set
NonSecure 0 Pin i has its non-secure attribute set
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LOCK
Locked 1 GPIOPORT[n].PERM register can't be changed until next
reset
Unlocked 0 GPIOPORT[n].PERM register content can be changed
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW REGION Region number
B RW LOCK
Unlocked 0 This register can be updated
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW SIZE Size of the non-secure callable (NSC) region n
Disabled 0 The region n is not defined as a non-secure callable region.
Normal security attributes (secure or non-secure) are
enforced.
32 1 The region n is defined as non-secure callable with a 32-
byte size
64 2 The region n is defined as non-secure callable with a 64-
byte size
128 3 The region n is defined as non-secure callable with a 128-
byte size
256 4 The region n is defined as non-secure callable with a 256-
byte size
512 5 The region n is defined as non-secure callable with a 512-
byte size
1024 6 The region n is defined as non-secure callable with a 1024-
byte size
2048 7 The region n is defined as non-secure callable with a 2048-
byte size
4096 8 The region n is defined as non-secure callable with a 4096-
byte size
B RW LOCK
Unlocked 0 This register can be updated
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW REGION Region number
B RW LOCK
Unlocked 0 This register can be updated
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW SIZE Size of the non-secure callable (NSC) region n
Disabled 0 The region n is not defined as a non-secure callable region.
Normal security attributes (secure or non-secure) are
enforced.
32 1 The region n is defined as non-secure callable with a 32-
byte size
64 2 The region n is defined as non-secure callable with a 64-
byte size
128 3 The region n is defined as non-secure callable with a 128-
byte size
256 4 The region n is defined as non-secure callable with a 256-
byte size
512 5 The region n is defined as non-secure callable with a 512-
byte size
1024 6 The region n is defined as non-secure callable with a 1024-
byte size
2048 7 The region n is defined as non-secure callable with a 2048-
byte size
4096 8 The region n is defined as non-secure callable with a 4096-
byte size
B RW LOCK
Unlocked 0 This register can be updated
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000017 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1
ID Access
Field Value ID Value Description
A RW EXECUTE Configure instruction fetch permissions from flash region n
Enable 1 Allow instruction fetches from flash region n
Disable 0 Block instruction fetches from flash region n
B RW WRITE Configure write permission for flash region n
Enable 1 Allow write operation to region n
Disable 0 Block write operation to region n
C RW READ Configure read permissions for flash region n
Enable 1 Allow read operation from flash region n
Disable 0 Block read operation from flash region n
D RW SECATTR Security attribute for flash region n
Non_Secure 0 Flash region n security attribute is non-secure
Secure 1 Flash region n security attribute is secure
E RW LOCK
Unlocked 0 This register can be updated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000017 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1
ID Access
Field Value ID Value Description
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E D C B A
Reset 0x00000017 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1
ID Access
Field Value ID Value Description
A RW EXECUTE Configure instruction fetch permissions from RAM region n
Enable 1 Allow instruction fetches from RAM region n
Disable 0 Block instruction fetches from RAM region n
B RW WRITE Configure write permission for RAM region n
Enable 1 Allow write operation to RAM region n
Disable 0 Block write operation to RAM region n
C RW READ Configure read permissions for RAM region n
Enable 1 Allow read operation from RAM region n
Disable 0 Block read operation from RAM region n
D RW SECATTR Security attribute for RAM region n
Non_Secure 0 RAM region n security attribute is non-secure
Secure 1 RAM region n security attribute is secure
E RW LOCK
Unlocked 0 This register can be updated
Locked 1 The content of this register can't be changed until the next
reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B B A A
Reset 0x00000012 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
ID Access
Field Value ID Value Description
A R SECUREMAPPING Define configuration capabilities for TrustZone Cortex-M
secure attribute
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B B A A
Reset 0x00000012 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
ID Access
Field Value ID Value Description
UserSelectable 2 Non-secure or secure attribute for this peripheral is defined
by the PERIPHID[n].PERM register
Split 3 This peripheral implements the split security mechanism.
Non-secure or secure attribute for this peripheral is defined
by the PERIPHID[n].PERM register.
B R DMA Indicate if the peripheral has DMA capabilities and if DMA
transfer can be assigned to a different security attribute
than the peripheral itself
NoDMA 0 Peripheral has no DMA capability
NoSeparateAttribute 1 Peripheral has DMA and DMA transfers always have the
same security attribute as assigned to the peripheral
SeparateAttribute 2 Peripheral has DMA and DMA transfers can have a different
security attribute than the one assigned to the peripheral
C RW SECATTR Peripheral security mapping
CAPTURE[0..n]
COUNT
START
CLEAR
STOP
TIMER
TIMER Core
Increment BITMODE
PCLK1M Counter
Prescaler
PCLK16M fTIMER
CC[0..n]
PRESCALER MODE
COMPARE[0..n]
Figure 86: Block schematic for timer/counter
The timer/counter runs on the high-frequency clock source (HFCLK) and includes a four-bit (1/2X)
prescaler that can divide the timer input clock from the HFCLK controller. Clock source selection between
PCLK16M and PCLK1M is automatic according to TIMER base frequency set by the prescaler. The TIMER
base frequency is always given as 16 MHz divided by the prescaler value.
The PPI system allows a TIMER event to trigger a task of any other system peripheral of the device. The PPI
system also enables the TIMER task/event features to generate periodic output and PWM signals to any
GPIO. The number of input/outputs used at the same time is limited by the number of GPIOTE channels.
The TIMER can operate in two modes, Timer mode and Counter mode. In both modes, the TIMER is
started by triggering the START task, and stopped by triggering the STOP task. After the timer is stopped
the timer can resume timing/counting by triggering the START task again. When timing/counting is
resumed, the timer will continue from the value it had prior to being stopped.
In Timer mode, the TIMER's internal Counter register is incremented by one for every tick of the timer
frequency fTIMER as illustrated in Block schematic for timer/counter on page 281. The timer frequency is
derived from PCLK16M as shown below, using the values specified in the PRESCALER register:
When fTIMER <= 1 MHz the TIMER will use PCLK1M instead of PCLK16M for reduced power consumption.
In counter mode, the TIMER's internal Counter register is incremented by one each time the COUNT task
is triggered, that is, the timer frequency and the prescaler are not utilized in counter mode. Similarly, the
COUNT task has no effect in Timer mode.
The TIMER's maximum value is configured by changing the bit-width of the timer in the BITMODE on page
288 register.
PRESCALER on page 289 and the BITMODE on page 288 must only be updated when the timer is
stopped. If these registers are updated while the TIMER is started then this may result in unpredictable
behavior.
When the timer is incremented beyond its maximum value the Counter register will overflow and the
TIMER will automatically start over from zero.
The Counter register can be cleared, that is, its internal value set to zero explicitly, by triggering the CLEAR
task.
The TIMER implements multiple capture/compare registers.
Independent of prescaler setting the accuracy of the TIMER is equivalent to one tick of the timer
frequency fTIMER as illustrated in Block schematic for timer/counter on page 281.
6.16.1 Capture
The TIMER implements one capture task for every available capture/compare register.
Every time the CAPTURE[n] task is triggered, the Counter value is copied to the CC[n] register.
6.16.2 Compare
The TIMER implements one COMPARE event for every available capture/compare register.
A COMPARE event is generated when the Counter is incremented and then becomes equal to the
value specified in one of the capture compare registers. When the Counter value becomes equal to the
value specified in a capture compare register CC[n], the corresponding compare event COMPARE[n] is
generated.
BITMODE on page 288 specifies how many bits of the Counter register and the capture/compare
register that are used when the comparison is performed. Other bits will be ignored.
6.16.5 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x5000F000 TIMER0 : S
TIMER US NA Timer 0
0x4000F000 TIMER0 : NS
0x50010000 TIMER1 : S
TIMER US NA Timer 1
0x40010000 TIMER1 : NS
0x50011000 TIMER2 : S
TIMER US NA Timer 2
0x40011000 TIMER2 : NS
[Link] TASKS_START
Address offset: 0x000
Start Timer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Start Timer
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x004
Stop Timer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop Timer
Trigger 1 Trigger task
[Link] TASKS_COUNT
Address offset: 0x008
Increment Timer (Counter mode only)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_COUNT Increment Timer (Counter mode only)
Trigger 1 Trigger task
[Link] TASKS_CLEAR
Address offset: 0x00C
Clear time
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CLEAR Clear time
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SHUTDOWN Shut down timer Deprecated
Trigger 1 Trigger task
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_CAPTURE Capture Timer value to CC[n] register
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x084
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_COUNT
Address offset: 0x088
Subscribe configuration for task COUNT
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task COUNT will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_CLEAR
Address offset: 0x08C
Subscribe configuration for task CLEAR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CLEAR will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SHUTDOWN will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task CAPTURE[n] will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_COMPARE Compare event on CC[n] match
NotGenerated 0 Event not generated
Generated 1 Event generated
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event COMPARE[n] will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L K J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-F RW COMPARE[i]_CLEAR Shortcut between event COMPARE[i] and task CLEAR
(i=0..5)
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
G-L RW COMPARE[i]_STOP Shortcut between event COMPARE[i] and task STOP
(i=0..5)
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-F RW COMPARE[i] (i=0..5) Write '1' to enable interrupt for event COMPARE[i]
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A-F RW COMPARE[i] (i=0..5) Write '1' to disable interrupt for event COMPARE[i]
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] MODE
Address offset: 0x504
Timer mode selection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MODE Timer mode
Timer 0 Select Timer mode
Counter 1 Select Counter mode Deprecated
LowPowerCounter 2 Select Low Power Counter mode
[Link] BITMODE
Address offset: 0x508
Configure the number of bits used by the TIMER
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW BITMODE Timer bit width
16Bit 0 16 bit timer bit width
08Bit 1 8 bit timer bit width
24Bit 2 24 bit timer bit width
32Bit 3 32 bit timer bit width
[Link] PRESCALER
Address offset: 0x510
Timer prescaler register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000004 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
ID Access
Field Value ID Value Description
A RW PRESCALER [0..9] Prescaler value
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CC Capture/Compare value
SUSPEND
STARTRX
STARTTX
RESUME
STOP
TWIM
GPIO RAM
[Link] [Link]
buffer[0]
buffer[1] TXD buffer
TXD+1 EasyDMA buffer[[Link]-1]
SDA Pin
SUSPENDED
RXSTARTED
TXSTARTED
ERROR
LASTRX
LASTTX
STOPPED
A typical TWI setup consists of one master and one or more slaves. For an example, see A typical TWI
setup comprising one master and three slaves on page 290. This TWIM is only able to operate as a
single master on the TWI bus. Multi-master bus configuration is not supported.
VDD VDD
TWI slave TWI slave TWI slave
TWI master (EEPROM) (Sensor)
(TWIM)
Address = b1011001 Address = b1011000 Address = b1011011
R R
SDA SCL SCL SDA SCL SDA SCL SDA
Figure 88: A typical TWI setup comprising one master and three slaves
This TWI master supports clock stretching performed by the slaves. Note that the SCK pulse following a
stretched clock cycle may be shorter than specified by the I2C specification.
The TWI master is started by triggering the STARTTX or STARTRX tasks, and stopped by triggering the STOP
task. The TWI master will generate a STOPPED event when it has stopped following a STOP task. The TWI
master cannot get stopped while it is suspended, so the STOP task has to be issued after the TWI master
has been resumed.
After the TWI master is started, the STARTTX task or the STARTRX task should not be triggered again
before the TWI master has stopped, i.e. following a LASTRX, LASTTX or STOPPED event.
If a NACK is clocked in from the slave, the TWI master will generate an ERROR event.
6.17.1 EasyDMA
The TWI master implements EasyDMA for reading and writing to and from the RAM.
If the [Link] and the [Link] are not pointing to the Data RAM region, an EasyDMA transfer may result
in a HardFault or RAM corruption. See Memory on page 20 for more information about the different
memory regions.
The .PTR and .MAXCNT registers are double-buffered. They can be updated and prepared for the next RX/
TX transmission immediately after having received the RXSTARTED/TXSTARTED event.
The STOPPED event indicates that EasyDMA has finished accessing the buffer in RAM.
Stretch
START
WRITE
STOP
ACK
ACK
ACK
ACK
ACK
ACK
TWI
ADDR 0 1 2 N-1 N
SUSPENDED
STOPPED
LASTTX
CPU Lifeline
1 2 3 4
[Link] = N+1
STARTTX
RESUME
SUSPEND
STOP
The TWI master will generate a LASTTX event when it starts to transmit the last byte, this is illustrated in
TWI master writing data to a slave on page 291
The TWI master is stopped by triggering the STOP task, this task should be triggered during the
transmission of the last byte to secure that the TWI will stop as fast as possible after sending the last byte.
It is safe to use the shortcut between LASTTX and STOP to accomplish this.
Note that the TWI master does not stop by itself when the whole RAM buffer has been sent, or when an
error occurs. The STOP task must be issued, through the use of a local or PPI shortcut, or in software as
part of the error handler.
The TWI master cannot get stopped while it is suspended, so the STOP task has to be issued after the TWI
master has been resumed.
address and the READ/WRITE bit set to 1 (WRITE = 0, READ = 1). The address must match the address of
the slave device that the master wants to read from. The READ/WRITE bit is followed by an ACK/NACK bit
(ACK=0 or NACK = 1) generated by the slave.
After having sent the ACK bit the TWI slave will send data to the master using the clock generated by the
master.
Data received will be stored in RAM at the address specified in the [Link] register. The TWI master will
generate an ACK after all but the last byte received from the slave. The TWI master will generate a NACK
after the last byte received to indicate that the read sequence shall stop.
A typical TWI master read sequence is illustrated in The TWI master reading data from a slave on page
292. Occurrence 2 in the figure illustrates clock stretching performed by the TWI master following a
SUSPEND task.
A SUSPENDED event indicates that the SUSPEND task has taken effect; this event can be used to
synchronize the software.
The TWI master will generate a LASTRX event when it is ready to receive the last byte, this is illustrated
in The TWI master reading data from a slave on page 292. If [Link] > 1 the LASTRX event is
generated after sending the ACK of the previously received byte. If [Link] = 1 the LASTRX event is
generated after receiving the ACK following the address and READ bit.
The TWI master is stopped by triggering the STOP task, this task must be triggered before the NACK bit is
supposed to be transmitted. The STOP task can be triggered at any time during the reception of the last
byte. It is safe to use the shortcut between LASTRX and STOP to accomplish this.
Note that the TWI master does not stop by itself when the RAM buffer is full, or when an error occurs. The
STOP task must be issued, through the use of a local or PPI shortcut, or in software as part of the error
handler.
The TWI master cannot get stopped while it is suspended, so the STOP task has to be issued after the TWI
master has been resumed.
START
Stretch
READ
NACK
STOP
ACK
ACK
ACK
ACK
ACK
TWI
ADDR 0 1 2 M-1 M
SUSPENDED
STOPPED
LASTRX
CPU Lifeline
1 2 3 4
[Link] = M+1
STARTRX
RESUME
SUSPEND
STOP
The figure A repeated start sequence, where the TWI master writes two bytes followed by reading 4 bytes
from the slave on page 293 illustrates this:
CPU Lifeline
RESTART
START
WRITE
READ
NACK
STOP
ACK
ACK
ACK
ACK
ACK
ACK
ACK
ADDR 0 1 ADDR 0 1 2 3
STOPPED
LASTTX
LASTRX
CPU Lifeline
1 2
[Link] = 2
[Link] = 4
STARTTX
STARTRX
STOP
Figure 91: A repeated start sequence, where the TWI master
writes two bytes followed by reading 4 bytes from the slave
If a more complex repeated start sequence is needed and the TWI firmware drive is serviced in a low
priority interrupt it may be necessary to use the SUSPEND task and SUSPENDED event to guarantee that
the correct tasks are generated at the correct time. This is illustrated in A double repeated start sequence
using the SUSPEND task to secure safe operation in low priority interrupts on page 293.
RESTART
RESTART
START
WRITE
WRITE
READ
NACK
STOP
Stretch
TWI
ACK
ACK
ACK
ACK
ACK
ACK
ADDR 0 ADDR 0 ADDR 0 1
STOPPED
LASTTX
SUSPENDED
LASTRX
LASTTX
CPU Lifeline
1 2 3 4 5
[Link] = 1
[Link] = 1
[Link] = 2
STARTTX
SUSPEND
STARTRX
RESUME
STOP
STARTTX
will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n]
register. [Link], [Link] must only be configured when the TWI master is disabled.
To secure correct signal levels on the pins used by the TWI master when the system is in OFF mode, and
when the TWI master is disabled, these pins must be configured in the GPIO peripheral as described in
GPIO configuration before enabling peripheral on page 294.
Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in
unpredictable behavior.
TWI master signal TWI master pin Direction Output value Drive strength
6.17.7 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50008000 TWIM0 : S
TWIM US SA Two-wire interface master 0
0x40008000 TWIM0 : NS
0x50009000 TWIM1 : S
TWIM US SA Two-wire interface master 1
0x40009000 TWIM1 : NS
0x5000A000 TWIM2 : S
TWIM US SA Two-wire interface master 2
0x4000A000 TWIM2 : NS
0x5000B000 TWIM3 : S
TWIM US SA Two-wire interface master 3
0x4000B000 TWIM3 : NS
[Link] TASKS_STARTRX
Address offset: 0x000
Start TWI receive sequence
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STARTRX Start TWI receive sequence
Trigger 1 Trigger task
[Link] TASKS_STARTTX
Address offset: 0x008
Start TWI transmit sequence
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STARTTX Start TWI transmit sequence
Trigger 1 Trigger task
[Link] TASKS_STOP
Address offset: 0x014
Stop TWI transaction. Must be issued while the TWI master is not suspended.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop TWI transaction. Must be issued while the TWI master
is not suspended.
Trigger 1 Trigger task
[Link] TASKS_SUSPEND
Address offset: 0x01C
Suspend TWI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SUSPEND Suspend TWI transaction
Trigger 1 Trigger task
[Link] TASKS_RESUME
Address offset: 0x020
Resume TWI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_RESUME Resume TWI transaction
Trigger 1 Trigger task
[Link] SUBSCRIBE_STARTRX
Address offset: 0x080
Subscribe configuration for task STARTRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STARTRX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STARTTX
Address offset: 0x088
Subscribe configuration for task STARTTX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STARTTX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOP
Address offset: 0x094
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_SUSPEND
Address offset: 0x09C
Subscribe configuration for task SUSPEND
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SUSPEND will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_RESUME
Address offset: 0x0A0
Subscribe configuration for task RESUME
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task RESUME will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STOPPED
Address offset: 0x104
TWI stopped
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED TWI stopped
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ERROR
Address offset: 0x124
TWI error
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ERROR TWI error
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_SUSPENDED
Address offset: 0x148
Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_SUSPENDED Last byte has been sent out after the SUSPEND task has
been issued, TWI traffic is now suspended.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RXSTARTED
Address offset: 0x14C
Receive sequence started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXSTARTED Receive sequence started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXSTARTED
Address offset: 0x150
Transmit sequence started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXSTARTED Transmit sequence started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_LASTRX
Address offset: 0x15C
Byte boundary, starting to receive the last byte
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_LASTRX Byte boundary, starting to receive the last byte
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_LASTTX
Address offset: 0x160
Byte boundary, starting to transmit the last byte
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_LASTTX Byte boundary, starting to transmit the last byte
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STOPPED
Address offset: 0x184
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ERROR
Address offset: 0x1A4
Publish configuration for event ERROR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ERROR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_SUSPENDED
Address offset: 0x1C8
Publish configuration for event SUSPENDED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event SUSPENDED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RXSTARTED
Address offset: 0x1CC
Publish configuration for event RXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXSTARTED
Address offset: 0x1D0
Publish configuration for event TXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_LASTRX
Address offset: 0x1DC
Publish configuration for event LASTRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event LASTRX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_LASTTX
Address offset: 0x1E0
Publish configuration for event LASTTX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event LASTTX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LASTTX_STARTRX Shortcut between event LASTTX and task STARTRX
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
B RW LASTTX_SUSPEND Shortcut between event LASTTX and task SUSPEND
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
C RW LASTTX_STOP Shortcut between event LASTTX and task STOP
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
D RW LASTRX_STARTTX Shortcut between event LASTRX and task STARTTX
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
E RW LASTRX_SUSPEND Shortcut between event LASTRX and task SUSPEND
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
F RW LASTRX_STOP Shortcut between event LASTRX and task STOP
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID J I H G F D A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
D RW ERROR Enable or disable interrupt for event ERROR
Disabled 0 Disable
Enabled 1 Enable
F RW SUSPENDED Enable or disable interrupt for event SUSPENDED
Disabled 0 Disable
Enabled 1 Enable
G RW RXSTARTED Enable or disable interrupt for event RXSTARTED
Disabled 0 Disable
Enabled 1 Enable
H RW TXSTARTED Enable or disable interrupt for event TXSTARTED
Disabled 0 Disable
Enabled 1 Enable
I RW LASTRX Enable or disable interrupt for event LASTRX
Disabled 0 Disable
Enabled 1 Enable
J RW LASTTX Enable or disable interrupt for event LASTTX
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID J I H G F D A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ERROR Write '1' to enable interrupt for event ERROR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW SUSPENDED Write '1' to enable interrupt for event SUSPENDED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW RXSTARTED Write '1' to enable interrupt for event RXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW TXSTARTED Write '1' to enable interrupt for event TXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW LASTRX Write '1' to enable interrupt for event LASTRX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW LASTTX Write '1' to enable interrupt for event LASTTX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID J I H G F D A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ERROR Write '1' to disable interrupt for event ERROR
Clear 1 Disable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID J I H G F D A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW SUSPENDED Write '1' to disable interrupt for event SUSPENDED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW RXSTARTED Write '1' to disable interrupt for event RXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW TXSTARTED Write '1' to disable interrupt for event TXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW LASTRX Write '1' to disable interrupt for event LASTRX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW LASTTX Write '1' to disable interrupt for event LASTTX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ERRORSRC
Address offset: 0x4C4
Error source
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OVERRUN Overrun error
[Link] ENABLE
Address offset: 0x500
Enable TWIM
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable TWIM
Disabled 0 Disable TWIM
Enabled 6 Enable TWIM
[Link] [Link]
Address offset: 0x508
Pin select for SCL signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x50C
Pin select for SDA signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] FREQUENCY
Address offset: 0x524
TWI frequency. Accuracy depends on the HFCLK source selected.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x04000000 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW FREQUENCY TWI master clock frequency
K100 0x01980000 100 kbps
K250 0x04000000 250 kbps
K400 0x06400000 400 kbps
[Link] [Link]
Address offset: 0x534
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x538
Maximum number of bytes in receive buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in receive buffer
[Link] [Link]
Address offset: 0x53C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction. In case
of NACK error, includes the NACK'ed byte.
[Link] [Link]
Address offset: 0x540
EasyDMA list type
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIST List type
Disabled 0 Disable EasyDMA list
ArrayList 1 Use array list
[Link] [Link]
Address offset: 0x544
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x548
Maximum number of bytes in transmit buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in transmit buffer
[Link] [Link]
Address offset: 0x54C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction. In case
of NACK error, includes the NACK'ed byte.
[Link] [Link]
Address offset: 0x550
EasyDMA list type
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW LIST List type
Disabled 0 Disable EasyDMA list
ArrayList 1 Use array list
[Link] ADDRESS
Address offset: 0x588
Address used in the TWI transfer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ADDRESS Address used in the TWI transfer
14
High bit rates or stronger pull-ups may require GPIOs to be set as High Drive, see GPIO chapter for
more details.
100 kbps
25
400 kbps
20
15
10
0
0 100 200 300 400 500
cap [pF]
PREPARETX
PREPARERX RXD TXD STOPPED
(signal) (signal)
SUSPEND WRITE
RESUME [Link] EasyDMA EasyDMA [Link] READ
RAM
RXD TXD
RXD+1 TXD+1
RXD+2 TXD+2
RXD+n TXD+n
A typical TWI setup consists of one master and one or more slaves. For an example, see A typical TWI
setup comprising one master and three slaves on page 310. TWIS is only able to operate with a single
master on the TWI bus.
VDD VDD
TWI slave
TWI slave TWI slave
(TWIS)
(EEPROM) (Sensor)
TWI master
Address = b1011001 Address = b1011000
Address = b1011011
R R
SDA SCL SCL SDA SCL SDA SCL SDA
Figure 96: A typical TWI setup comprising one master and three slaves
The TWI slave state machine is illustrated in TWI slave state machine on page 311 and TWI slave state
machine symbols on page 311 is explaining the different symbols used in the state machine.
/ STOPPED
Unprepare TX,
Unprepare RX
IDLE
STOP
[ READ && (TX prepared) ] [ WRITE && (RX prepared) ]
Restart sequence
TX RX
To secure correct behaviour of the TWI slave, [Link], [Link], CONFIG and the ADDRESS[n] registers,
must be configured prior to enabling the TWI slave through the ENABLE register. Similarly, changing these
settings must be performed while the TWI slave is disabled. Failing to do so may result in unpredictable
behaviour.
6.18.1 EasyDMA
The TWI slave implements EasyDMA for reading and writing to and from the RAM.
The STOPPED event indicates that EasyDMA has finished accessing the buffer in RAM.
If the [Link] and the [Link] are not pointing to the Data RAM region, an EasyDMA transfer may result
in a HardFault or RAM corruption. See Memory on page 20 for more information about the different
memory regions.
The TWI slave can be forced to stop by triggering the STOP task. A STOPPED event will be generated when
the TWI slave has stopped. The TWI slave will clear the 'TX prepared' flag and go back to the IDLE state
when it has stopped, see also Terminating an ongoing TWI transaction on page 315.
Each byte sent from the slave will be followed by an ACK/NACK bit sent from the master. The TWI master
will generate a NACK following the last byte that it wants to receive to tell the slave to release the bus so
that the TWI master can generate the stop condition. The [Link] register can be queried after a
transaction to see how many bytes were sent.
A typical TWI slave read command response is illustrated in The TWI slave responding to a read command
on page 313. Occurrence 2 in the figure illustrates clock stretching performed by the TWI slave following
a SUSPEND task.
Stretch
START
READ
NACK
STOP
ACK
ACK
ACK
ACK
ACK
TWI
ADDR 0 1 2 N-1 N
STOPPED
TXSTARTED
READ
CPU Lifeline
1 2 3 4
[Link] = 0x20000000
[Link] >= N+1
PREPARETX
RESUME
SUSPEND
The TWI slave will go back to the IDLE state if the TWI slave receives a restart command when it is in the
RX state.
The TWI slave is stopped when it receives the stop condition from the TWI master. A STOPPED event will
be generated when the transaction has stopped. The TWI slave will clear the internal 'RX prepared' flag
('unprepare RX') and go back to the IDLE state when it has stopped.
The receive buffer is located in RAM at the address specified in the [Link] register. The TWI slave will
only be able to receive as many bytes as specified in the [Link] register. If the TWI master tries to
send more bytes to the slave than the slave is able to receive,these bytes will be discarded and the bytes
will be NACKed by the slave. If this happens, an ERROR event will be generated.
The EasyDMA configuration registers, see [Link] etc., are latched when the RXSTARTED event is
generated.
The TWI slave can be forced to stop by triggering the STOP task. A STOPPED event will be generated when
the TWI slave has stopped. The TWI slave will clear the internal 'RX prepared' flag and go back to the IDLE
state when it has stopped, see also Terminating an ongoing TWI transaction on page 315.
The TWI slave will generate an ACK after every byte received from the master. The [Link] register
can be queried after a transaction to see how many bytes were received.
A typical TWI slave write command response is illustrated in The TWI slave responding to a write
command on page 314. Occurrence 2 in the figure illustrates clock stretching performed by the TWI
slave following a SUSPEND task.
START
WRITE
Stretch
STOP
ACK
ACK
ACK
ACK
ACK
ACK
TWI
ADDR 0 1 2 M-1 M
STOPPED
RXSTARTED
WRITE
CPU Lifeline
1 2 3 4
[Link] >= M+1
[Link] = 0x20000000
PREPARERX
RESUME
SUSPEND
RESTART
START
WRITE
READ
NACK
STOP
TWI
ACK
ACK
ACK
ACK
ACK
ACK
ACK
ADDR 0 1 ADDR 0 1 2 3
TXSTARTED
STOPPED
RXSTARTED
READ
WRITE
CPU Lifeline
1 2 3
[Link] = 0x20000000
[Link] = 0x20000010
[Link] = 2
PREPARERX
[Link] = 4
PREPARETX
SUSPEND
RESUME
Figure 100: A repeated start sequence, where the TWI master
writes two bytes followed by reading four bytes from the slave
TWI slave signal TWI slave pin Direction Output value Drive strength
6.18.8 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50008000 TWIS0 : S
TWIS US SA Two-wire interface slave 0
0x40008000 TWIS0 : NS
0x50009000 TWIS1 : S
TWIS US SA Two-wire interface slave 1
0x40009000 TWIS1 : NS
0x5000A000 TWIS2 : S
TWIS US SA Two-wire interface slave 2
0x4000A000 TWIS2 : NS
0x5000B000 TWIS3 : S
TWIS US SA Two-wire interface slave 3
0x4000B000 TWIS3 : NS
[Link] TASKS_STOP
Address offset: 0x014
Stop TWI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOP Stop TWI transaction
Trigger 1 Trigger task
[Link] TASKS_SUSPEND
Address offset: 0x01C
Suspend TWI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_SUSPEND Suspend TWI transaction
Trigger 1 Trigger task
[Link] TASKS_RESUME
Address offset: 0x020
Resume TWI transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_RESUME Resume TWI transaction
Trigger 1 Trigger task
[Link] TASKS_PREPARERX
Address offset: 0x030
Prepare the TWI slave to respond to a write command
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_PREPARERX Prepare the TWI slave to respond to a write command
Trigger 1 Trigger task
[Link] TASKS_PREPARETX
Address offset: 0x034
Prepare the TWI slave to respond to a read command
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_PREPARETX Prepare the TWI slave to respond to a read command
Trigger 1 Trigger task
[Link] SUBSCRIBE_STOP
Address offset: 0x094
Subscribe configuration for task STOP
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOP will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_SUSPEND
Address offset: 0x09C
Subscribe configuration for task SUSPEND
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task SUSPEND will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_RESUME
Address offset: 0x0A0
Subscribe configuration for task RESUME
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task RESUME will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_PREPARERX
Address offset: 0x0B0
Subscribe configuration for task PREPARERX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task PREPARERX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_PREPARETX
Address offset: 0x0B4
Subscribe configuration for task PREPARETX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task PREPARETX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_STOPPED
Address offset: 0x104
TWI stopped
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_STOPPED TWI stopped
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ERROR
Address offset: 0x124
TWI error
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ERROR TWI error
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RXSTARTED
Address offset: 0x14C
Receive sequence started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXSTARTED Receive sequence started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXSTARTED
Address offset: 0x150
Transmit sequence started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXSTARTED Transmit sequence started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_WRITE
Address offset: 0x164
Write command received
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_WRITE Write command received
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_READ
Address offset: 0x168
Read command received
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_READ Read command received
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_STOPPED
Address offset: 0x184
Publish configuration for event STOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event STOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ERROR
Address offset: 0x1A4
Publish configuration for event ERROR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ERROR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RXSTARTED
Address offset: 0x1CC
Publish configuration for event RXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXSTARTED
Address offset: 0x1D0
Publish configuration for event TXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_WRITE
Address offset: 0x1E4
Publish configuration for event WRITE
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event WRITE will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_READ
Address offset: 0x1E8
Publish configuration for event READ
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event READ will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW WRITE_SUSPEND Shortcut between event WRITE and task SUSPEND
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
B RW READ_SUSPEND Shortcut between event READ and task SUSPEND
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Enable or disable interrupt for event STOPPED
Disabled 0 Disable
Enabled 1 Enable
B RW ERROR Enable or disable interrupt for event ERROR
Disabled 0 Disable
Enabled 1 Enable
E RW RXSTARTED Enable or disable interrupt for event RXSTARTED
Disabled 0 Disable
Enabled 1 Enable
F RW TXSTARTED Enable or disable interrupt for event TXSTARTED
Disabled 0 Disable
Enabled 1 Enable
G RW WRITE Enable or disable interrupt for event WRITE
Disabled 0 Disable
Enabled 1 Enable
H RW READ Enable or disable interrupt for event READ
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to enable interrupt for event STOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ERROR Write '1' to enable interrupt for event ERROR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW RXSTARTED Write '1' to enable interrupt for event RXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW TXSTARTED Write '1' to enable interrupt for event TXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW WRITE Write '1' to enable interrupt for event WRITE
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW READ Write '1' to enable interrupt for event READ
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW STOPPED Write '1' to disable interrupt for event STOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW ERROR Write '1' to disable interrupt for event ERROR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW RXSTARTED Write '1' to disable interrupt for event RXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW TXSTARTED Write '1' to disable interrupt for event TXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Enabled 1 Read: Enabled
G RW WRITE Write '1' to disable interrupt for event WRITE
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW READ Write '1' to disable interrupt for event READ
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ERRORSRC
Address offset: 0x4D0
Error source
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OVERFLOW RX buffer overflow detected, and prevented
NotDetected 0 Error did not occur
Detected 1 Error occurred
B RW DNACK NACK sent after receiving a data byte
NotReceived 0 Error did not occur
Received 1 Error occurred
C RW OVERREAD TX buffer over-read detected, and prevented
NotDetected 0 Error did not occur
Detected 1 Error occurred
[Link] MATCH
Address offset: 0x4D4
Status register indicating which address had a match
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R MATCH [0..1] Which of the addresses in {ADDRESS} matched the incoming
address
[Link] ENABLE
Address offset: 0x500
Enable TWIS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable TWIS
Disabled 0 Disable TWIS
Enabled 9 Enable TWIS
[Link] [Link]
Address offset: 0x508
Pin select for SCL signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x50C
Pin select for SDA signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x534
RXD Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR RXD Data pointer
[Link] [Link]
Address offset: 0x538
Maximum number of bytes in RXD buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in RXD buffer
[Link] [Link]
Address offset: 0x53C
Number of bytes transferred in the last RXD transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last RXD transaction
[Link] [Link]
Address offset: 0x544
TXD Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR TXD Data pointer
[Link] [Link]
Address offset: 0x548
Maximum number of bytes in TXD buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in TXD buffer
[Link] [Link]
Address offset: 0x54C
Number of bytes transferred in the last TXD transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last TXD transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ADDRESS TWI slave address
[Link] CONFIG
Address offset: 0x594
Configuration register for the address match mechanism
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A-B RW ADDRESS[i] (i=0..1) Enable or disable address matching on ADDRESS[i]
Disabled 0 Disabled
Enabled 1 Enabled
[Link] ORC
Address offset: 0x5C0
Over-read character. Character sent out in case of an over-read of the transmit buffer.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ORC Over-read character. Character sent out in case of an over-
read of the transmit buffer.
15
High bit rates or stronger pull-ups may require GPIOs to be set as High Drive, see GPIO chapter for
more details.
RESUME
ENDTX
RX
RXTO EasyDMA EasyDMA
FIFO CTS
ENDRX NCTS
RAM
RXD TXD
RXD+1 TXD+1
RXD+2 TXD+2
RXD+n TXD+n
The GPIOs used for each UART interface can be chosen from any GPIO on the device and are
independently configurable. This enables great flexibility in device pinout and efficient use of board space
and signal routing.
6.19.1 EasyDMA
The UARTE implements EasyDMA for reading and writing to and from the RAM.
If the [Link] and the [Link] are not pointing to the Data RAM region, an EasyDMA transfer may result
in a HardFault or RAM corruption. See Memory on page 20 for more information about the different
memory regions.
The .PTR and .MAXCNT registers are double-buffered. They can be updated and prepared for the next RX/
TX transmission immediately after having received the RXSTARTED/TXSTARTED event.
The ENDRX/ENDTX event indicates that EasyDMA has finished accessing respectively the RX/TX buffer in
RAM.
6.19.2 Transmission
The first step of a DMA transmission is storing bytes in the transmit buffer and configuring EasyDMA. This
is achieved by writing the initial address pointer to [Link], and the number of bytes in the RAM buffer to
[Link]. The UARTE transmission is started by triggering the STARTTX task.
After each byte has been sent over the TXD line, a TXDRDY event will be generated.
When all bytes in the TXD buffer, as specified in the [Link] register, have been transmitted, the
UARTE transmission will end automatically and an ENDTX event will be generated.
A UARTE transmission sequence is stopped by triggering the STOPTX task, a TXSTOPPED event will be
generated when the UARTE transmitter has stopped.
If the ENDTX event has not already been generated when the UARTE transmitter has come to a stop, the
UARTE will generate the ENDTX event explicitly even though all bytes in the TXD buffer, as specified in the
[Link] register, have not been transmitted.
If flow control is enabled through the HWFC field in the CONFIG register, a transmission will be
automatically suspended when CTS is deactivated and resumed when CTS is activated again, as illustrated
in UARTE transmission on page 331. A byte that is in transmission when CTS is deactivated will be fully
transmitted before the transmission is suspended.
CTS
TXD
0 1 2 N-2 N-1 N
TXDRDY
TXDRDY
TXDRDY
TXDRDY
TXDRDY
TXDRDY
TXSTARTED
Lifeline
1 2
[Link] = N+1
ENDTX
STARTTX
The UARTE transmitter will be in its lowest activity level, and consume the least amount of energy, when it
is stopped, i.e. before it is started via STARTTX or after it has been stopped via STOPTX and the TXSTOPPED
event has been generated. See POWER — Power control on page 58 for more information about power
modes.
6.19.3 Reception
The UARTE receiver is started by triggering the STARTRX task. The UARTE receiver is using EasyDMA to
store incoming data in an RX buffer in RAM.
The RX buffer is located at the address specified in the [Link] register. The [Link] register is double-
buffered and it can be updated and prepared for the next STARTRX task immediately after the RXSTARTED
event is generated. The size of the RX buffer is specified in the [Link] register and the UARTE will
generate an ENDRX event when it has filled up the RX buffer, see UARTE reception on page 332.
For each byte received over the RXD line, an RXDRDY event will be generated. This event is likely to occur
before the corresponding data has been transferred to Data RAM.
The [Link] register can be queried following an ENDRX event to see how many new bytes have
been transferred to the RX buffer in RAM since the previous ENDRX event.
Data RAM
0x20000000
1
0x20000001
2
0x20000002
3
0x20000003
4
0x20000004
5
0x20000010
6
0x20000011
7
0x20000012
8
0x20000013
9
0x20000014
10
0x20000020
11
0x20000021
12
0x20000022
-
0x20000023
-
0x20000024
-
EasyDMA
1 2 3 4 5 6 7 8 9 10 11 12
RXD
1 2 3 4 5 6 7 8 9 10 11 12
RXSTARTED
RXSTARTED
RXSTARTED
ENDRX
ENDRX
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
RXDRDY
Lifeline
1 2 3 4
STARTRX
STARTRX
[Link] = 0x20000000
[Link] = 0x20000010
[Link] = 0x20000020
[Link] = 0x20000030
[Link] = 5
ENDRX_STARTRX = 1
STARTRX
The UARTE receiver is stopped by triggering the STOPRX task. An RXTO event is generated when the UARTE
has stopped. The UARTE will make sure that an impending ENDRX event will be generated before the RXTO
event is generated. This means that the UARTE will guarantee that no ENDRX event will be generated after
RXTO, unless the UARTE is restarted or a FLUSHRX command is issued after the RXTO event is generated.
Important: If the ENDRX event has not already been generated when the UARTE receiver has come
to a stop, which implies that all pending content in the RX FIFO has been moved to the RX buffer,
the UARTE will generate the ENDRX event explicitly even though the RX buffer is not full. In this
scenario the ENDRX event will be generated before the RXTO event is generated.
To be able to know how many bytes have actually been received into the RX buffer, the CPU can read the
[Link] register following the ENDRX event or the RXTO event.
The UARTE is able to receive up to four bytes after the STOPRX task has been triggered as long as these are
sent in succession immediately after the RTS signal is deactivated. This is possible because after the RTS is
deactivated the UARTE is able to receive bytes for an extended period equal to the time it takes to send 4
bytes on the configured baud rate.
After the RXTO event is generated the internal RX FIFO may still contain data, and to move this data to
RAM the FLUSHRX task must be triggered. To make sure that this data does not overwrite data in the RX
buffer, the RX buffer should be emptied or the [Link] should be updated before the FLUSHRX task is
triggered. To make sure that all data in the RX FIFO is moved to the RX buffer, the [Link] register
must be set to [Link] > 4, see UARTE reception with forced stop via STOPRX on page 333. The
UARTE will generate the ENDRX event after completing the FLUSHRX task even if the RX FIFO was empty or
if the RX buffer does not get filled up. To be able to know how many bytes have actually been received into
the RX buffer in this case, the CPU can read the [Link] register following the ENDRX event.
EasyDMA
1 2 3 4 5 6 7 8 9 10 11, 12, 13, 14
RXD 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ENDRX
ENDRX
RXSTARTED
RXSTARTED
ENDRX
RXTO
Lifeline
1 2 3 3 4 5
Timeout
STARTRX
ENDRX_STARTRX = 0
STOPRX
[Link] = C
[Link] = B
FLUSHRX
[Link] = 5
[Link] = A
ENDRX_STARTRX = 1
STARTRX
If HW flow control is enabled through the HWFC field in the CONFIG register, the RTS signal will be
deactivated when the receiver is stopped via the STOPRX task or when the UARTE is only able to receive
four more bytes in its internal RX FIFO.
With flow control disabled, the UARTE will function in the same way as when the flow control is enabled
except that the RTS line will not be used. This means that no signal will be generated when the UARTE has
reached the point where it is only able to receive four more bytes in its internal RX FIFO. Data received
when the internal RX FIFO is filled up, will be lost.
The UARTE receiver will be in its lowest activity level, and consume the least amount of energy, when it is
stopped, i.e. before it is started via STARTRX or after it has been stopped via STOPRX and the RXTO event
has been generated. See POWER — Power control on page 58 for more information about power modes.
6.19.9 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
Universal asynchronous
0x50008000 UARTE0 : S
UARTE US SA receiver/transmitter with
0x40008000 UARTE0 : NS
EasyDMA 0
Universal asynchronous
0x50009000 UARTE1 : S
UARTE US SA receiver/transmitter with
0x40009000 UARTE1 : NS
EasyDMA 1
Universal asynchronous
0x5000A000 UARTE2 : S
UARTE US SA receiver/transmitter with
0x4000A000 UARTE2 : NS
EasyDMA 2
Universal asynchronous
0x5000B000 UARTE3 : S
UARTE US SA receiver/transmitter with
0x4000B000 UARTE3 : NS
EasyDMA 3
[Link] TASKS_STARTRX
Address offset: 0x000
Start UART receiver
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STARTRX Start UART receiver
Trigger 1 Trigger task
[Link] TASKS_STOPRX
Address offset: 0x004
Stop UART receiver
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOPRX Stop UART receiver
Trigger 1 Trigger task
[Link] TASKS_STARTTX
Address offset: 0x008
Start UART transmitter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STARTTX Start UART transmitter
Trigger 1 Trigger task
[Link] TASKS_STOPTX
Address offset: 0x00C
Stop UART transmitter
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_STOPTX Stop UART transmitter
Trigger 1 Trigger task
[Link] TASKS_FLUSHRX
Address offset: 0x02C
Flush RX FIFO into RX buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_FLUSHRX Flush RX FIFO into RX buffer
Trigger 1 Trigger task
[Link] SUBSCRIBE_STARTRX
Address offset: 0x080
Subscribe configuration for task STARTRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STARTRX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOPRX
Address offset: 0x084
Subscribe configuration for task STOPRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOPRX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STARTTX
Address offset: 0x088
Subscribe configuration for task STARTTX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STARTTX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_STOPTX
Address offset: 0x08C
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task STOPTX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] SUBSCRIBE_FLUSHRX
Address offset: 0x0AC
Subscribe configuration for task FLUSHRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task FLUSHRX will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_CTS
Address offset: 0x100
CTS is activated (set low). Clear To Send.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_CTS CTS is activated (set low). Clear To Send.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_NCTS
Address offset: 0x104
CTS is deactivated (set high). Not Clear To Send.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_NCTS CTS is deactivated (set high). Not Clear To Send.
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RXDRDY
Address offset: 0x108
Data received in RXD (but potentially not yet transferred to Data RAM)
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXDRDY Data received in RXD (but potentially not yet transferred to
Data RAM)
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ENDRX
Address offset: 0x110
Receive buffer is filled up
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ENDRX Receive buffer is filled up
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXDRDY
Address offset: 0x11C
Data sent from TXD
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXDRDY Data sent from TXD
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ENDTX
Address offset: 0x120
Last TX byte transmitted
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ENDTX Last TX byte transmitted
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_ERROR
Address offset: 0x124
Error detected
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_ERROR Error detected
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RXTO
Address offset: 0x144
Receiver timeout
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXTO Receiver timeout
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_RXSTARTED
Address offset: 0x14C
UART receiver has started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_RXSTARTED UART receiver has started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXSTARTED
Address offset: 0x150
UART transmitter has started
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXSTARTED UART transmitter has started
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] EVENTS_TXSTOPPED
Address offset: 0x158
Transmitter stopped
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TXSTOPPED Transmitter stopped
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_CTS
Address offset: 0x180
Publish configuration for event CTS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event CTS will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_NCTS
Address offset: 0x184
Publish configuration for event NCTS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event NCTS will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RXDRDY
Address offset: 0x188
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXDRDY will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ENDRX
Address offset: 0x190
Publish configuration for event ENDRX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ENDRX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXDRDY
Address offset: 0x19C
Publish configuration for event TXDRDY
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXDRDY will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ENDTX
Address offset: 0x1A0
Publish configuration for event ENDTX
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ENDTX will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_ERROR
Address offset: 0x1A4
Publish configuration for event ERROR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event ERROR will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RXTO
Address offset: 0x1C4
Publish configuration for event RXTO
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXTO will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_RXSTARTED
Address offset: 0x1CC
Publish configuration for event RXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event RXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXSTARTED
Address offset: 0x1D0
Publish configuration for event TXSTARTED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXSTARTED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] PUBLISH_TXSTOPPED
Address offset: 0x1D8
Publish configuration for event TXSTOPPED
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TXSTOPPED will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] SHORTS
Address offset: 0x200
Shortcuts between local events and tasks
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
C RW ENDRX_STARTRX Shortcut between event ENDRX and task STARTRX
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
D RW ENDRX_STOPRX Shortcut between event ENDRX and task STOPRX
Disabled 0 Disable shortcut
Enabled 1 Enable shortcut
[Link] INTEN
Address offset: 0x300
Enable or disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CTS Enable or disable interrupt for event CTS
Disabled 0 Disable
Enabled 1 Enable
B RW NCTS Enable or disable interrupt for event NCTS
Disabled 0 Disable
Enabled 1 Enable
C RW RXDRDY Enable or disable interrupt for event RXDRDY
Disabled 0 Disable
Enabled 1 Enable
D RW ENDRX Enable or disable interrupt for event ENDRX
Disabled 0 Disable
Enabled 1 Enable
E RW TXDRDY Enable or disable interrupt for event TXDRDY
Disabled 0 Disable
Enabled 1 Enable
F RW ENDTX Enable or disable interrupt for event ENDTX
Disabled 0 Disable
Enabled 1 Enable
G RW ERROR Enable or disable interrupt for event ERROR
Disabled 0 Disable
Enabled 1 Enable
H RW RXTO Enable or disable interrupt for event RXTO
Disabled 0 Disable
Enabled 1 Enable
I RW RXSTARTED Enable or disable interrupt for event RXSTARTED
Disabled 0 Disable
Enabled 1 Enable
J RW TXSTARTED Enable or disable interrupt for event TXSTARTED
Disabled 0 Disable
Enabled 1 Enable
L RW TXSTOPPED Enable or disable interrupt for event TXSTOPPED
Disabled 0 Disable
Enabled 1 Enable
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CTS Write '1' to enable interrupt for event CTS
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW NCTS Write '1' to enable interrupt for event NCTS
Set 1 Enable
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW RXDRDY Write '1' to enable interrupt for event RXDRDY
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ENDRX Write '1' to enable interrupt for event ENDRX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW TXDRDY Write '1' to enable interrupt for event TXDRDY
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW ENDTX Write '1' to enable interrupt for event ENDTX
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW ERROR Write '1' to enable interrupt for event ERROR
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW RXTO Write '1' to enable interrupt for event RXTO
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW RXSTARTED Write '1' to enable interrupt for event RXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW TXSTARTED Write '1' to enable interrupt for event TXSTARTED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
L RW TXSTOPPED Write '1' to enable interrupt for event TXSTOPPED
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CTS Write '1' to disable interrupt for event CTS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID L J I H G F E D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
B RW NCTS Write '1' to disable interrupt for event NCTS
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
C RW RXDRDY Write '1' to disable interrupt for event RXDRDY
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
D RW ENDRX Write '1' to disable interrupt for event ENDRX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
E RW TXDRDY Write '1' to disable interrupt for event TXDRDY
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
F RW ENDTX Write '1' to disable interrupt for event ENDTX
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
G RW ERROR Write '1' to disable interrupt for event ERROR
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
H RW RXTO Write '1' to disable interrupt for event RXTO
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
I RW RXSTARTED Write '1' to disable interrupt for event RXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
J RW TXSTARTED Write '1' to disable interrupt for event TXSTARTED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
L RW TXSTOPPED Write '1' to disable interrupt for event TXSTOPPED
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] ERRORSRC
Address offset: 0x480
Error source
Note : this register is read / write one to clear.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D C B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW OVERRUN Overrun error
A valid stop bit is not detected on the serial data input after
all bits in a character have been received.
NotPresent 0 Read: error not present
Present 1 Read: error present
D RW BREAK Break condition
The serial data input is '0' for longer than the length of a
data frame. (The data frame length is 10 bits without parity
bit, and 11 bits with parity bit.).
NotPresent 0 Read: error not present
Present 1 Read: error present
[Link] ENABLE
Address offset: 0x500
Enable UART
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE Enable or disable UARTE
Disabled 0 Disable UARTE
Enabled 8 Enable UARTE
[Link] [Link]
Address offset: 0x508
Pin select for RTS signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x50C
Pin select for TXD signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x510
Pin select for CTS signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] [Link]
Address offset: 0x514
Pin select for RXD signal
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
C RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] BAUDRATE
Address offset: 0x524
Baud rate. Accuracy depends on the HFCLK source selected.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x04000000 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW BAUDRATE Baud rate
Baud1200 0x0004F000 1200 baud (actual rate: 1205)
Baud2400 0x0009D000 2400 baud (actual rate: 2396)
Baud4800 0x0013B000 4800 baud (actual rate: 4808)
Baud9600 0x00275000 9600 baud (actual rate: 9598)
Baud14400 0x003AF000 14400 baud (actual rate: 14401)
Baud19200 0x004EA000 19200 baud (actual rate: 19208)
Baud28800 0x0075C000 28800 baud (actual rate: 28777)
Baud31250 0x00800000 31250 baud
Baud38400 0x009D0000 38400 baud (actual rate: 38369)
Baud56000 0x00E50000 56000 baud (actual rate: 55944)
Baud57600 0x00EB0000 57600 baud (actual rate: 57554)
Baud76800 0x013A9000 76800 baud (actual rate: 76923)
Baud115200 0x01D60000 115200 baud (actual rate: 115108)
Baud230400 0x03B00000 230400 baud (actual rate: 231884)
Baud250000 0x04000000 250000 baud
Baud460800 0x07400000 460800 baud (actual rate: 457143)
Baud921600 0x0F000000 921600 baud (actual rate: 941176)
Baud1M 0x10000000 1Mega baud
[Link] [Link]
Address offset: 0x534
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x538
Maximum number of bytes in receive buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in receive buffer
[Link] [Link]
Address offset: 0x53C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction
[Link] [Link]
Address offset: 0x544
Data pointer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW PTR Data pointer
[Link] [Link]
Address offset: 0x548
Maximum number of bytes in transmit buffer
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW MAXCNT [1..0x1FFF] Maximum number of bytes in transmit buffer
[Link] [Link]
Address offset: 0x54C
Number of bytes transferred in the last transaction
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R AMOUNT [1..0x1FFF] Number of bytes transferred in the last transaction
[Link] CONFIG
Address offset: 0x56C
Configuration of parity and hardware flow control
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C B B B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW HWFC Hardware flow control
Disabled 0 Disabled
Enabled 1 Enabled
B RW PARITY Parity
Excluded 0x0 Exclude parity bit
Included 0x7 Include even parity bit
C RW STOP Stop bits
One 0 One stop bit
Two 1 Two stop bits
16
High baud rates may require GPIOs to be set as High Drive, see GPIO chapter for more details.
When started, the watchdog will automatically force the 32.768 kHz RC oscillator on as long as no other
32.768 kHz clock source is running and generating the 32.768 kHz system clock, see chapter CLOCK —
Clock control on page 64.
6.20.4 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50018000 WDT : S
WDT US NA Watchdog timer
0x40018000 WDT : NS
[Link] TASKS_START
Address offset: 0x000
Start the watchdog
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W TASKS_START Start the watchdog
Trigger 1 Trigger task
[Link] SUBSCRIBE_START
Address offset: 0x080
Subscribe configuration for task START
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that task START will subscribe to
B RW EN
Disabled 0 Disable subscription
Enabled 1 Enable subscription
[Link] EVENTS_TIMEOUT
Address offset: 0x100
Watchdog timeout
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW EVENTS_TIMEOUT Watchdog timeout
NotGenerated 0 Event not generated
Generated 1 Event generated
[Link] PUBLISH_TIMEOUT
Address offset: 0x180
Publish configuration for event TIMEOUT
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW CHIDX [15..0] Channel that event TIMEOUT will publish to.
B RW EN
Disabled 0 Disable publishing
Enabled 1 Enable publishing
[Link] INTENSET
Address offset: 0x304
Enable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TIMEOUT Write '1' to enable interrupt for event TIMEOUT
Set 1 Enable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] INTENCLR
Address offset: 0x308
Disable interrupt
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TIMEOUT Write '1' to disable interrupt for event TIMEOUT
Clear 1 Disable
Disabled 0 Read: Disabled
Enabled 1 Read: Enabled
[Link] RUNSTATUS
Address offset: 0x400
Run status
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R RUNSTATUSWDT Indicates whether or not the watchdog is running
NotRunning 0 Watchdog not running
Running 1 Watchdog is running
[Link] REQSTATUS
Address offset: 0x404
Request status
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A-H R RR[i] (i=0..7) Request status for RR[i] register
DisabledOrRequested 0 RR[i] register is not enabled, or are already requesting
reload
EnabledAndUnrequested 1 RR[i] register is enabled, and are not yet requesting reload
[Link] CRV
Address offset: 0x504
Counter reload value
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW CRV [0x0000000F..0xFFFFFFFF]
Counter reload value in number of cycles of the 32.768 kHz
clock
[Link] RREN
Address offset: 0x508
Enable register for reload request registers
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID H G F E D C B A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A-H RW RR[i] (i=0..7) Enable or disable RR[i] register
Disabled 0 Disable RR[i] register
Enabled 1 Enable RR[i] register
[Link] CONFIG
Address offset: 0x50C
Configuration register
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID C A
Reset 0x00000001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
ID Access
Field Value ID Value Description
A RW SLEEP Configure the watchdog to either be paused, or kept
running, while the CPU is sleeping
Pause 0 Pause watchdog while the CPU is sleeping
Run 1 Keep the watchdog running while the CPU is sleeping
C RW HALT Configure the watchdog to either be paused, or kept
running, while the CPU is halted by the debugger
Pause 0 Pause watchdog while the CPU is halted by the debugger
Run 1 Keep the watchdog running while the CPU is halted by the
debugger
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W RR Reload request register
Reload 0x6E524635 Value to request a reload of the watchdog timer
7.1 Introduction
The long term evolution (LTE) modem consists of baseband processing and RF parts, which together
implement a complete 3GPP LTE release 13 (Rel-13) Cat-M1 and Cat-NB1 and LTE release 14 (Rel-14) Cat-
NB1 and Cat-NB2 capable product.
As illustrated in the image below, the following is a part of the LTE modem:
• RF transceiver
• Modem baseband (BB)
• Embedded flash/RAM
• Modem host processor and peripherals
The modem baseband and host processor provide functions for the LTE L1, L2 and L3 (layer 1, 2 and
3 respectively) as well as IP communication layers. Modem peripherals provide hardware services for
modem operating system and for modem secure execution environment.
Application and modem domains are interacting through interprocessor communication (IPC) mechanism.
LTE modem is accessible to user through the modem API.
The application processor is the master in the system and responsible for starting and stopping of the
modem. LTE modem enables the clocks and power required for its own operation. Shared resources, such
as e.g. clocks, are handled within the platform and require no user involvement. In cases where a hard
fault is detected in the modem, the application domain will perform a hard reset for the modem.
Note: For details regarding the modem API, please refer to nRF Connect SDK document and nRF91
AT Commands, Command Reference Guide document.
Note: nRF9160 is able to run different modem FW builds that define the final modem feature set
in a specific nRF9160 based application.
Figure 107: Connections between LTE modem, card connector, and the ESD device
Only standard transmission speeds are supported as specified in ETSI TS 102 221.
Important: LTE modem must be stopped through the modem API, before removing the UICC.
An ESD (electrostatic discharge) protection device compatible with UICC cards must be used between the
removable card and the LTE modem, to protect LTE modem against a harmful electrostatic discharge from
the card connector.
Simultaneous receiving by LTE modem and external device is always possible, and by so means no
coexistence signaling needed when only receiving is done on the external device side.
LTE modem drives these outputs timing accurately according to LTE protocol timing to set e.g. the correct
antenna tuner settings per used frequency.
User needs to inform the LTE modem through the modem API about the particular RF application e.g.
antenna tuner device configuration, so that LTE modem knows how to drive it.
Note: For details regarding the modem API and supported RF external control features, please
refer to nRF91 AT Commands, Command Reference Guide document.
9.1 Overview
The debug and trace system offers a flexible and powerful mechanism for non-intrusive debugging.
DAP
SWDCLK
CTRL-AP
NVMC
External
SW-DP [Link] / [Link]
debugger UICR
SWDIO DAP bus
interconnect
CxxxPWRUPREQ
Power CPU
POWER
CxxxPWRUPRACK
ARM Cortex-M33
TRACECLK
APB/AHB
TRACEDATA[0] Trace Peripherals
ETM
TRACEDATA[1]
TPIU
TRACEDATA[2]
TRACEDATA[3] Trace
ITM
Note: When a system contains multiple CPU domains, it is important to notice that if one domain
(subsystem A) has master rights on another domain (subsystem B), the master subsystem can
have access to data from the slave subsytem. In this example, even if subsystem B is locked by
APPROTECT or ERASEPROTECT, subsystem A can access some data for subsystem B. Consequently,
even if the security permissions are managed per subsystem, it is mandatory to have a global
approach to the protection. Protecting a slave subsystem does not guarantee system security if the
master subsystem is not protected.
If a RAM or flash region has its permission set to allow code execution, the content of this region will
be visible to the debugger even if the read permission is not set. This allows a debugger to display the
content of the code being executed.
Note:
• The SWDIO line has an internal pull-up resistor.
• The SWDCLK line has an internal pull-down resistor.
There are several access ports that connect to different parts of the system. An overview is given in the
table below.
AP ID Type Description
0 AHB-AP Application subsystem access port
4 CTRL-AP Application subsystem control access port
The AHB-AP and APB-AP are standard ARM® components, and documented in ARM CoreSight SoC-400
Technical Reference Manual, revision r3p2. The control access port (CTRL-AP) is proprietary, and described
in more detail in CTRL-AP - Control access port on page 368.
For details on how to use the debug capabilities, please read the debug documentation of your IDE.
If the device is in System OFF when power is requested via CxxxPWRUPREQ, the system will wake up and
the DIF flag in RESETREAS on page 63 will be set.
9.1.5 Trace
The device supports ETM and ITM trace.
Trace data from the ETM and the ITM is sent to an external debugger via a 4-bit wide parallel trace port
(TPIU), see TRACEDATA[0] through TRACEDATA[3], and TRACECLK in Debug and trace overview on page
365.
For details on how to use the trace capabilities, please read the debug documentation of your IDE.
TPIU's trace pins are multiplexed with GPIOs, see Pin assignments on page 379 for more information.
Trace speed is configured in the TRACEPORTSPEED on page 378 register. The speed of the trace pins
depends on the DRIVE setting of the GPIOs that the trace pins are multiplexed with. Only S0S1 and H0H1
drives are suitable for debugging. S0S1 is the default DRIVE at reset. If parallel or serial trace port signals
are not fast enough in the debugging conditions, all GPIOs in use for tracing should be set to high drive
(H0H1). The user shall make sure that DRIVE setting for these GPIOs is not overwritten by software during
the debugging session.
9.1.6 Registers
[Link] TARGETID
Address offset: 0x042
The TARGETID register provides information about the target when the host is connected to a single
device.
The TARGETID register is accessed by a read of DP register 0x4 when the DPBANKSEL bit in the SELECT
register is set to 0x2.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID D D D D C C C C C C C C C C C C B B B B B B B B B B B A
Reset 0x10090289 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1
ID Access
Field Value ID Value Description
A R UNUSED Reserved, read-as-one
B R TDESIGNER An 11-bit code: JEDEC JEP106 continuation code and
identity code. The ID identifies the designer of the part.
NordicSemi 0x144 Nordic Semiconductor ASA
C R TPARTNO Part number
nRF91 9 nRF91 Series
D R TREVISION Target revision
<keyword 1 nRF9160
keyref="devicename" />
CTRL-AP AHB-AP
ERASEALL MAILBOX
NVMC
CPU
UICR
APPROTECT
SECUREAPPROTECT
MCU SUBSYSTEM
Access port protection (APPROTECT) blocks the debugger access to the AHB-AP, and prevents read
and write access to all CPU registers and memory-mapped addresses. It is possible to enable access
port protection for both secure and non-secure mode, using registers [Link] and
[Link] respectively. The debugger can use register [Link] on page 372 to read
the status of secure and non-secure access port protection.
Control access port has the following features:
• Soft reset
• Erase all
• Mailbox interface
• Debug of protected devices
Note: Setting ERASEPROTECT on page 43 has no effect on debugger access, only on erase all
operation.
Register [Link] on page 372 holds the status for erase protection.
DAP-SIDE CPU-SIDE
RXDATA TXDATA
RXSTATUS TXSTATUS
DAP CPU
TXDATA RXDATA
TXSTATUS RXSTATUS
Note: The mailbox feature of the CTRL-AP can be used by firmware to authenticate the debugger
before allowing it to use the access port.
Note: To prevent misuse, the write-once register [Link] on page 375 should
be set to Default as early in the start-up process as possible. Once written, it will not be possible to
remove the erase protection until next reset.
9.2.5 Registers
[Link] RESET
Address offset: 0x000
Soft reset request.
This register is automatically deactivated by writing Erase to ERASEALL, it is then kept inactive until a reset
source affecting the debug system is asserted. See Reset behavior on page 55.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW RESET Soft reset request and status
NoReset 0 Write to release reset
[Link] ERASEALL
Address offset: 0x004
Perform a secure erase of the device. The device will be returned to factory default settings upon next
reset.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A W ERASEALL Erase flash, SRAM and UICR in sequence
NoOperation 0 No operation
Erase 1 Erase flash, SRAM and UICR in sequence
[Link] ERASEALLSTATUS
Address offset: 0x008
Status register for the ERASEALL operation
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R ERASEALLSTATUS Status register for the ERASEALL operation
Ready 0 ERASEALL is ready
Busy 1 ERASEALL is busy (on-going)
[Link] [Link]
Address offset: 0x00C
Status register for access port protection
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R APPROTECT Status bit for access port protection
Enabled 0 APPROTECT is enabled
Disabled 1 APPROTECT is disabled
B R SECUREAPPROTECT Status bit for secure access port protection
Enabled 0 SECUREAPPROTECT is enabled
Disabled 1 SECUREAPPROTECT is disabled
[Link] [Link]
Address offset: 0x018
Status register for UICR ERASEPROTECT configuration
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R PALL ERASEALL status
Enabled 0 ERASEALL protection is enabled
Disabled 1 ERASELL protection is not enabled and device can be erased
[Link] [Link]
Address offset: 0x01C
Unlock ERASEPROTECT and perform ERASEALL
This register can only be written once per reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW1 KEY Initiate secure erase even though ERASEPROTECT is enabled
if KEY fields match
[Link] [Link]
Address offset: 0x020
Data sent from the debugger to the CPU
Writing to this register will automatically set field DataPending in register TXSTATUS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW Data Data sent from debugger
[Link] [Link]
Address offset: 0x024
Status to indicate if data sent from the debugger to the CPU has been read
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R Status Status of register DATA
NoDataPending 0 No data pending in register TXDATA
DataPending 1 Data pending in register TXDATA
[Link] [Link]
Address offset: 0x028
Data sent from the CPU to the debugger
Reading from this register will automatically set field NoDataPending in register RXSTATUS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R Data Data sent from CPU
[Link] [Link]
Address offset: 0x02C
Status to indicate if data sent from the CPU to the debugger has been read
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R Status Status of register DATA
NoDataPending 0 No data pending in register RXDATA
DataPending 1 Data pending in register RXDATA
[Link] IDR
Address offset: 0x0FC
CTRL-AP Identification Register, IDR
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID E E E E D D D D C C C C C C C B B B B A A A A A A A A
Reset 0x12880000 0 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R APID AP Identification
B R CLASS Access Port (AP) class
NotDefined 0x0 No defined class
MEMAP 0x8 Memory Access Port
C R JEP106ID JEDEC JEP106 identity code
D R JEP106CONT JEDEC JEP106 continuation code
E R REVISION Revision
9.2.6 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0x50006000 CTRLAPPERI CTRL_AP_PERI S NA CTRL-AP-PERI
[Link] [Link]
Address offset: 0x400
Data sent from the debugger to the CPU
Reading from this register will automatically set field NoDataPending in register RXSTATUS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R RXDATA Data received from debugger
[Link] [Link]
Address offset: 0x404
Status to indicate if data sent from the debugger to the CPU has been read
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R RXSTATUS Status of data in register RXDATA
NoDataPending 0 No data pending in register RXDATA
DataPending 1 Data pending in register RXDATA
[Link] [Link]
Address offset: 0x480
Data sent from the CPU to the debugger
Writing to this register will automatically set field DataPending in register TXSTATUS
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TXDATA Data sent to debugger
[Link] [Link]
Address offset: 0x484
Status to indicate if data sent from the CPU to the debugger status has been read
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A R TXSTATUS Status of data in register TXDATA
NoDataPending 0 No data pending in register TXDATA
DataPending 1 Data pending in register TXDATA
[Link] [Link]
Address offset: 0x500
Lock ERASEALL mechanism
This register can only be written once per reset
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW1 ERASEPROTECTLOCK Enable or disable the ERASEALL mechanism
Unlocked 0 ERASEALL can be issued
Locked 1 ERASEALL is locked
[Link] [Link]
Address offset: 0x504
Unlock ERASEPROTECT and perform ERASEALL
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW KEY Initiate secure erase even though ERASEPROTECT is enabled
if KEY fields match
9.3.1 Registers
Base address Peripheral Instance Secure mapping DMA security Description Configuration
0xE0080000 TAD TAD S NA Trace and debug control
[Link] ENABLE
Address offset: 0x500
Enable debug domain and aquire selected GPIOs
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW ENABLE
DISABLED 0 Disable debug domain and release selected GPIOs
ENABLED 1 Enable debug domain and aquire selected GPIOs
[Link] [Link]
Address offset: 0x504
Pin number configuration for TRACECLK
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
B RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] PSEL.TRACEDATA0
Address offset: 0x508
Pin number configuration for TRACEDATA[0]
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
B RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] PSEL.TRACEDATA1
Address offset: 0x50C
Pin number configuration for TRACEDATA[1]
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
B RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] PSEL.TRACEDATA2
Address offset: 0x510
Pin number configuration for TRACEDATA[2]
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
B RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] PSEL.TRACEDATA3
Address offset: 0x514
Pin number configuration for TRACEDATA[3]
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID B A A A A A
Reset 0xFFFFFFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ID Access
Field Value ID Value Description
A RW PIN [0..31] Pin number
B RW CONNECT Connection
Disconnected 1 Disconnect
Connected 0 Connect
[Link] TRACEPORTSPEED
Address offset: 0x518
Clocking options for the Trace Port debug interface
This register is a retained register. Reset behavior is the same as debug components.
Bit number 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID A A
Reset 0x00000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ID Access
Field Value ID Value Description
A RW TRACEPORTSPEED Speed of Trace Port clock. Note that the TRACECLK pin will
output this clock divided by two.
32MHz 0 32 MHz Trace Port clock (TRACECLK = 16 MHz)
16MHz 1 16 MHz Trace Port clock (TRACECLK = 8 MHz)
8MHz 2 8 MHz Trace Port clock (TRACECLK = 4 MHz)
4MHz 3 4 MHz Trace Port clock (TRACECLK = 2 MHz)
A b b1 D E e d1 e1 D2 E2 d2 e2 d3 e3 K L L1 L2 L3
Min. 0.98 15.90 10.40
Nom. 1.04 0.30 0.80 16.00 10.50 0.65 0.50 0.50 15.50 10.00 2.00 1.60 0.10 0.10 5.00 7.75 3.25 0.25 4.25
Max. 1.10 16.10 10.60
10.3.1 Schematic
The bill of material (BOM) is TBD.
VREG
SB1
TP1
R3
10k C7 C8
L4 100pF 100nF
ENABLE
COEX0
COEX1
COEX2
5.6nH
VDD_nRF
P0.04
P0.03
P0.02
P0.01
P0.00
P0.31
P0.30
P0.29
P0.28
P0.27
P0.26
R1 U3 A2
12 MM8130-2600
0R VDD
J6 C64
8 1 L3 R5
C1 OUT IN
4.7µF M1A R6 3.3nH 0R 1462350001
3 GPS_EN 0.8pF
102
101
100
nRF9160 DEV2 GND EN
99
97
96
95
93
92
91
89
88
87
86
84
83
1k5 C9
QM14501 C10 5.1pF
ENABLE
VDD
P0.04
P0.03
P0.02
P0.01
P0.00
COEX0
COEX1
COEX2
P0.31
P0.30
P0.29
P0.28
P0.27
P0.26
N.C.
GND
P0.05 2 67
P0.05 GPS A1
P0.06 3
VDD P0.06
P0.07 4 64
P0.07 AUX
J1 MM8130-2600 C6
61 ANT L1
P0.00 SB2 ANT
P0.00 1.5nH P822601
P0.01 3.5pF
P0.01 1V8-3V3 12 L2
P0.02 VDD_GPIO
P0.02 C3 C4 C5 22nH
P0.03 TP30
P0.03 IO_SUPPLY 13 59 SDATA N.C. N.C. N.C.
P0.04 IO_SUPPLY SDATA TP27
P0.04 58 SCLK
P0.05 SCLK TP28
P0.05 57
P0.06 C12 C11 VIO TP29
P0.06 nRF9160
P0.07 4.7µF 4.7µF
P0.07 P0.08 15 55 GPS_EN
P0.08 P0.08 MAGPIO0
P0.08 P0.09 16 54 MAGPIO1
P0.09 P0.09 MAGPIO1 TP2
P0.09 P0.10 18 53 MAGPIO2
P0.10 P0.10 MAGPIO2 TP3
P0.10 P0.11 19
P0.11 P0.11
P0.11 P0.12 20 M1B
P0.12 P0.12
P0.12 1 6
SWD_CLK
P0.13/AIN0 GND NC
SIM_CLK
SIM_DET
SIM_RST
SIM_1V8
P0.13/AIN0 5 7
SWD_IO
nRESET
SIM_IO
P0.14/AIN1 GND NC
P0.14/AIN1 9 8
P0.13
P0.14
P0.15
P0.16
P0.17
P0.18
P0.19
P0.20
P0.21
P0.22
P0.23
P0.24
P0.25
VDD
P0.15/AIN2 GND NC
P0.15/AIN2 14 10
P0.16/AIN3 GND NC
P0.16/AIN3 17 11
P0.17/AIN4 GND NC
P0.17/AIN4 21 51
P0.18/AIN5 GND NC
22
23
24
25
26
28
29
30
32
33
34
35
37
38
39
40
42
43
45
46
48
49
P0.18/AIN5 27 71
P0.19/AIN6 GND NC
P0.19/AIN6 31 70
P0.20/AIN7 VDD_nRF GND NC
P0.20/AIN7 R2 36 69
P0.13/AIN0
P0.14/AIN1
P0.15/AIN2
P0.16/AIN3
P0.17/AIN4
P0.18/AIN5
P0.19/AIN6
P0.20/AIN7
P0.21 GND NC
SIM_CLK
SWDCLK
SIM_RST
P0.21 41 68
SIM_1V8
nRESET
P0.22 GND NC
SIM_IO
SWDIO
P0.22 0R 44 73
P0.23 GND NC
P0.21
P0.22
P0.23
P0.24
P0.25
P0.23 47 104 Testpoint_4
P0.24 C2 GND NC TP4
P0.24 50 105 Testpoint_5
P0.25 4.7µF GND NC TP5
P0.25 52 106 Testpoint_6
P0.26 GND NC TP6
P0.26 56 107
P0.27 GND NC
P0.27 60 108
P0.28 GND NC
P0.28 62 109
P0.29 GND NC
P0.29 63 110
P0.30 GND NC
P0.30 65 111
P0.31 GND NC
P0.31 66 112
GND NC
72 113
GND NC
74 114
SIM_IO GND NC
SIM_IO 75 115
SIM_CLK GND NC
SIM_CLK 76 116
SIM_RST GND NC
SIM_RST 77 117
SIM_1V8 GND NC
SIM_1V8 78 118
GND NC
79 119
COEX0 GND NC
COEX0 80 120
COEX1 GND NC
COEX1 81 121
COEX2 GND NC
COEX2 82 122
GND NC
Testpoint_50 85 123
Testpoint_50 GND NC
90 124 Testpoint_49
nRESET GND NC TP49
nRESET 94 125 Testpoint_50
GND NC TP50
98 126
GND NC
SWD 103 127
GND NC
SELECT
nRESET
RESET nRF9160 DEV2
P0.22
nRF91_SWD SWO
SWDCLK
SWDCLK
SWDIO
SWDIO
UART
Testpoint_49
TXD
Testpoint_50
RXD
Proprietary_int R11 100k
CTS
R16 100k
RTS
Note: There can be excessive leakage at VDD and/or VDD_GPIO if any of these supply voltages is
outside its range given in Recommended operating conditions on page 386.
13.1 IC marking
The nRF9160 IC package is marked like described below.
N 9 1 6 0
<H> Description
[A . . Z] Hardware version/revision identifier (incremental)
<P> Description
[0 . . 9] Production device identifier (incremental)
[A . . Z] Engineering device identifier (incremental)
<F> Description
[A . . N, P . . Z] Version of preprogrammed firmware
[0] Delivered without preprogrammed firmware
<YY> Description
[15 . . 99] Production year: 2015 to 2099
<WW> Description
[1 . . 52] Week of production
<LL> Description
[AA . . ZZ] Wafer production lot identifier
<CC> Description
R7 7" Reel
R 13" Reel
T Tray
Modification statement
Nordic Semiconductor has not approved any changes or modifications to this device by the user. Any
changes or modifications could void the user's authority to operate the equipment.
Nordic Semiconductor n'approuve aucune modification apportée à l'appareil par l'utilisateur, quelle qu'en
soit la nature. Tout changement ou modification peuvent annuler le droit d'utilisation de l'appareil par
l'utilisateur.
Interference statement
This device complies with Part 15 of the FCC Rules and Industry Canada's licence-exempt RSS standards.
Operation is subject to the following two conditions: (1) this device may not cause interference, and (2)
this device must accept any interference, including interference that may cause undesired operation of the
device.
Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts de
licence. L'exploitation est autorisée aux deux conditions suivantes: (1) l'appareil ne doit pas produire de
brouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si le
brouillage est susceptible d'en compromettre le fonctionnement.
Wireless notice
This equipment complies with FCC and ISED radiation exposure limits set forth for an uncontrolled
environment. The antenna should be installed and operated with minimum distance of 20 cm between the
radiator and your body. This transmitter must not be co-located or operating in conjunction with any other
antenna or transmitter.
Cet appareil est conforme aux limites d'exposition aux rayonnements de l’ISDE pour un environnement non
contrôlé. L'antenne doit être installée de façon à garder une distance minimale de 20 centimètres entre la
source de rayonnements et votre corps. L'émetteur ne doit pas être colocalisé ni fonctionner conjointement
avec à autre antenne ou autre émetteur.
Permitted antenna
This radio transmitter has been approved by FCC and ISED to operate with the antenna types listed below
with the maximum permissible gain indicated. Antenna types not included in this list, having a gain greater
than the maximum gain indicated for that type, are strictly prohibited for use with this device.
Le présent émetteur radio a été approuvé par ISDE pour fonctionner avec les types d'antenne énumérés
ci dessous et ayant un gain admissible maximal. Les types d'antenne non inclus dans cette liste, et dont le
gain est supérieur au gain maximal indiqué, sont strictement interdits pour l'exploitation de l'émetteur.
15.4 Trademarks
All trademarks, service marks, trade names, product names and logos appearing in this documentation are
the property of their respective owners.