Datasheet docs

{ "name": "Nordic Semiconductor", "mpn": "nRF52832-QFAA-G-R" }

Nordic nRF52832-QFAA-G SoC

Nordic nRF52832-QFAA-G QFN48 multiprotocol Bluetooth LE/ANT/2.4 GHz SoC with a 64 MHz Arm Cortex-M4F, 512 kB flash, 64 kB RAM, NFC-A, SAADC, and 32 GPIOs.

MCU

nRF52832 Product Specification v1.9

Key features

2.4 GHz transceiver

• -96 dBm sensitivity in Bluetooth® low energy mode

• Supported data rates: 1 Mbps, 2 Mbps Bluetooth® low energy mode

• -20 to +4 dBm TX power, configurable in 4 dB steps

• On-chip balun (single-ended RF)

• 5.3 mA peak current in TX (0 dBm)

• 5.4 mA peak current in RX

• RSSI (1 dB resolution)

• Arm® Cortex®-M4 32-bit processor with FPU, 64 MHz

• 215 EEMBC CoreMark® score running from flash memory

• 58 μA/MHz running from flash memory

• 51.6 μA/MHz running from RAM

Data watchpoint and trace (DWT), embedded trace macrocell (ETM), and instrumentation trace macrocell (ITM)

• Serial wire debug (SWD)

• Trace port

• Flexible power management

• 1.7 V–3.6 V supply voltage range

• Fully automatic LDO and DC/DC regulator system

• Fast wake-up using 64 MHz internal oscillato

• 0.3 μA at 3 V in System OFF mode

• 0.7 μA at 3 V in System OFF mode with full 64 kB RAM retention

• 1.9 μA at 3 V in System ON mode, no RAM retention, wake on RTC

• Memory

512 kB flash/64 kB RAM

• 256 kB flash/32 kB RAM

• Nordic SoftDevice ready

• Support for concurrent multi-protocol

• Type 2 near field communication (NFC-A) tag with wakeup-on-field and touch to-pair capabilities

• 12-bit, 200 ksps ADC - 8 configurable channels with programmable gain

• 64 level comparator

• 15 level low power comparator with wakeup from System OFF mode

• Temperature sensor

• 32 general purpose I/O pins

• 3x 4-channel pulse width modulator (PWM) unit with EasyDMA

• Digital microphone interface (PDM)

• 5x 32-bit timer with counter mode

• Up to 3x SPI master/slave with EasyDMA

• Up to 2x I2C compatible 2-wire master/slave

• I2S with EasyDMA

• UART (CTS/RTS) with EasyDMA

• Programmable peripheral interconnect (PPI)

• Quadrature decoder (QDEC)

• AES HW encryption with EasyDMA

Autonomous peripheral operation without CPU intervention using PPI and EasyDMA

• 3x real-time counter (RTC)

• Single crystal operation

• Package variants

• QFN48 package, 6 × 6 mm

• WLCSP package, 3.0 × 3.2 mm

Applications

• Home automation

• Sensor networks

• Building automation

• Industrial

• Health/fitness sensor and monitor devices

• Medical devices

• Key fobs and wrist watches

Interactive entertainment devices

• Remote controls

• Gaming controllers

A4WP wireless chargers and devices

Remote control toys

Computer peripherals and I/O devices

Mouse

• Keyboard

• Multi-touch trackpad

• Gaming

Contents

1 Revision history....9
2 About this document....11
2.1 Document naming and status....11
2.2 Peripheral naming and abbreviations....11
2.3 Register tables....11
2.4 Registers....12
3 Block diagram....13
4 Pin assignments....14
4.1 QFN48 pin assignments....14
4.2 WLCSP ball assignments....16
4.3 GPIO usage restrictions....18
5 Absolute maximum ratings....20
6 Recommended operating conditions....21
6.1 WLCSP light sensitivity....21
7 CPU....22
7.1 Floating point interrupt....22
7.2 Electrical specification....22
7.3 CPU and support module configuration....23
8 Memory....24
8.1 RAM - Random access memory....24
8.2 Flash - Non-volatile memory....25
8.3 Memory map....25
8.4 Instantiation....25
9 AHB multilayer....27
9.1 AHB multilayer priorities....27
10 EasyDMA....28
10.1 EasyDMA array list....29
11 NVMC — Non-volatile memory controller....30
11.1 Writing to Flash....30
11.2 Erasing a page in Flash....30
11.3 Writing to user information configuration registers (UICR)....30
11.4 Erasing user information configuration registers (UICR)....30
11.5 Erase all....31
11.6 Cache....31
11.7 Registers....31
11.8 Electrical specification....34
12 BPROT — Block protection....35
12.1 Registers....35
13 FICR — Factory information configuration registers....44
13.1 Registers....44
14 UICR — User information configuration registers....55
14.1 Registers....55
15 Peripheral interface....69
15.1 Peripheral ID....69
15.2 Peripherals with shared ID....69
15.3 Peripheral registers....70
15.4 Bit set and clear....70
15.5 Tasks....70
15.6 Events....71

15.7 Shortcuts....71
15.8 Interrupts....71
16 Debug and trace....73
16.1 DAP - Debug access port....73
16.2 Access port protection....73
16.3 CTRL-AP - Control access port....76
16.4 Debug Interface mode....77
16.5 Real-time debug....78
16.6 Trace....78
17 Power and clock management....79
17.1 Current consumption scenarios....79
18 POWER — Power supply....81
18.1 Regulators....81
18.2 System OFF mode....82
18.3 System ON mode....83
18.4 Power supply supervisor....83
18.5 RAM sections....85
18.6 Reset....85
18.7 Retained registers....86
18.8 Reset behavior....86
18.9 Registers....86
18.10 Electrical specification....102
19 CLOCK — Clock control....104
19.1 HFCLK clock controller....104
19.2 LFCLK clock controller....106
19.3 Registers....108
19.4 Electrical specification....112
20 GPIO — General purpose input/output....114
20.1 Pin configuration....114
20.2 GPIO located near the RADIO....116
20.3 Registers....116
20.4 Electrical specification....157
21 GPIOTE — GPIO tasks and events....161
21.1 Pin events and tasks....161
21.2 Port event....162
21.3 Tasks and events pin configuration....162
21.4 Registers....162
21.5 Electrical specification....171
22 PPI — Programmable peripheral interconnect....172
22.1 Pre-programmed channels....173
22.2 Registers....173
23 RADIO — 2.4 GHz Radio....209
23.1 EasyDMA....209
23.2 Packet configuration....210
23.3 Maximum packet length....211
23.4 Address configuration....211
23.5 Data whitening....211
23.6 CRC....212
23.7 Radio states....213
23.8 Transmit sequence....213
23.9 Receive sequence....215
23.10 Received Signal Strength Indicator (RSSI)....216
23.11 Interframe spacing....216
23.12 Device address match....217
23.13 Bit counter....217
23.14 Registers....218
23.15 Electrical specification....234

24 TIMER — Timer/counter......238
24.1 Capture......239
24.2 Compare......239
24.3 Task delays......239
24.4 Task priority......239
24.5 Registers......239
24.6 Electrical specification......245

25 RTC — Real-time counter......246
25.1 Clock source......246
25.2 Resolution versus overflow and the PRESCALER......246
25.3 COUNTER register......247
25.4 Overflow features......247
25.5 TICK event......247
25.6 Event control feature......248
25.7 Compare feature......248
25.8 TASK and EVENT jitter/delay......250
25.9 Reading the COUNTER register......252
25.10 Registers......252
25.11 Electrical specification......258

26 RNG — Random number generator......259
26.1 Bias correction......259
26.2 Speed......259
26.3 Registers......259
26.4 Electrical specification......261

27 TEMP — Temperature sensor......262
27.1 Registers......262
27.2 Electrical specification......267

28 ECB — AES electronic codebook mode encryption......268
28.1 Shared resources......268
28.2 EasyDMA......268
28.3 ECB data structure......268
28.4 Registers......269
28.5 Electrical specification......270

29 CCM — AES CCM mode encryption......271
29.1 Shared resources......272
29.2 Encryption......272
29.3 Decryption......272
29.4 AES CCM and RADIO concurrent operation......273
29.5 Encrypting packets on-the-fly in radio transmit mode......273
29.6 Decrypting packets on-the-fly in radio receive mode......274
29.7 CCM data structure......275
29.8 EasyDMA and ERROR event......276
29.9 Registers......276

30 AAR — Accelerated address resolver......280
30.1 Shared resources......280
30.2 EasyDMA......280
30.3 Resolving a resolvable address......280
30.4 Use case example for chaining RADIO packet reception with address resolution using AAR......281
30.5 IRK data structure......281
30.6 Registers......282
30.7 Electrical specification......284

31 SPIM — Serial peripheral interface master with EasyDMA......285
31.1 Shared resources......285
31.2 EasyDMA......286
31.3 SPI master transaction sequence......287
31.4 Low power......288

31.5 Master mode pin configuration....288
31.6 Registers....289
31.7 Electrical specification....294

32 SPIS — Serial peripheral interface slave with EasyDMA....296
32.1 Shared resources....296
32.2 EasyDMA....296
32.3 SPI slave operation....297
32.4 Pin configuration....298
32.5 Registers....299
32.6 Electrical specification....307

33 TWIM — I²C compatible two-wire interface master with EasyDMA....309
33.1 Shared resources....310
33.2 EasyDMA....310
33.3 Master write sequence....311
33.4 Master read sequence....312
33.5 Master repeated start sequence....313
33.6 Low power....314
33.7 Master mode pin configuration....314
33.8 Registers....314
33.9 Electrical specification....321

34 TWIS — I²C compatible two-wire interface slave with EasyDMA....323
34.1 Shared resources....325
34.2 EasyDMA....325
34.3 TWI slave responding to a read command....325
34.4 TWI slave responding to a write command....326
34.5 Master repeated start sequence....327
34.6 Terminating an ongoing TWI transaction....328
34.7 Low power....328
34.8 Slave mode pin configuration....328
34.9 Registers....329
34.10 Electrical specification....335

35 UARTE — Universal asynchronous receiver/transmitter with EasyDMA....337
35.1 Shared resources....337
35.2 EasyDMA....337
35.3 Transmission....338
35.4 Reception....338
35.5 Error conditions....340
35.6 Using the UARTE without flow control....340
35.7 Parity configuration....340
35.8 Low power....340
35.9 Pin configuration....341
35.10 Registers....341
35.11 Electrical specification....349

36 QDEC — Quadrature decoder....351
36.1 Sampling and decoding....351
36.2 LED output....352
36.3 Debounce filters....352
36.4 Accumulators....353
36.5 Output/input pins....353
36.6 Pin configuration....353
36.7 Registers....354
36.8 Electrical specification....360

37 SAADC — Successive approximation analog-to-digital converter....361
37.1 Shared resources....361
37.2 Overview....361
37.3 Digital output....362
37.4 Analog inputs and channels....363

37.5 Operation modes....363
37.6 EasyDMA....365
37.7 Resistor ladder....366
37.8 Reference....367
37.9 Acquisition time....367
37.10 Limits event monitoring....368
37.11 Registers....369
37.12 Electrical specification....393
37.13 Performance factors....395

38 COMP — Comparator....396
38.1 Differential mode....397
38.2 Single-ended mode....398
38.3 Registers....400
38.4 Electrical specification....405

39 LPCOMP — Low power comparator....406
39.1 Shared resources....407
39.2 Pin configuration....407
39.3 Registers....408
39.4 Electrical specification....412

40 WDT — Watchdog timer....413
40.1 Reload criteria....413
40.2 Temporarily pausing the watchdog....413
40.3 Watchdog reset....413
40.4 Registers....414
40.5 Electrical specification....418

41 SWI — Software interrupts....419
41.1 Registers....419

42 NFCT — Near field communication tag....420
42.1 Overview....420
42.2 Pin configuration....422
42.3 EasyDMA....422
42.4 Collision resolution....423
42.5 Frame timing controller....424
42.6 Frame assembler....425
42.7 Frame disassembler....426
42.8 Antenna interface....427
42.9 NFCT antenna recommendations....427
42.10 Battery protection....427
42.11 References....428
42.12 Registers....428
42.13 Electrical specification....439

43 PDM — Pulse density modulation interface....440
43.1 Master clock generator....440
43.2 Module operation....440
43.3 Decimation filter....441
43.4 EasyDMA....441
43.5 Hardware example....442
43.6 Pin configuration....442
43.7 Registers....443
43.8 Electrical specification....447

44 I²S — Inter-IC sound interface....449
44.1 Mode....449
44.2 Transmitting and receiving....449
44.3 Left right clock (LRCK)....450
44.4 Serial clock (SCK)....450
44.5 Master clock (MCK)....451
44.6 Width, alignment and format....451

44.7 EasyDMA....453
44.8 Module operation....455
44.9 Pin configuration....456
44.10 Registers....457
44.11 Electrical specification....464

45 MWU — Memory watch unit....465
45.1 Registers....465
46 EGU — Event generator unit....492
46.1 Registers....492
46.2 Electrical specification....498
47 PWM — Pulse width modulation....499
47.1 Wave counter....499
47.2 Decoder with EasyDMA....502
47.3 Limitations....507
47.4 Pin configuration....507
47.5 Registers....508
47.6 Electrical specification....516
48 SPI — Serial peripheral interface master....517
48.1 Functional description....517
48.2 Registers....520
48.3 Electrical specification....523
49 TWI — I²C compatible two-wire interface....525
49.1 Functional description....525
49.2 Master mode pin configuration....525
49.3 Shared resources....526
49.4 Master write sequence....526
49.5 Master read sequence....527
49.6 Master repeated start sequence....528
49.7 Low power....529
49.8 Registers....529
49.9 Electrical specification....533
50 UART — Universal asynchronous receiver/transmitter....535
50.1 Functional description....535
50.2 Pin configuration....535
50.3 Shared resources....536
50.4 Transmission....536
50.5 Reception....536
50.6 Suspending the UART....537
50.7 Error conditions....537
50.8 Using the UART without flow control....538
50.9 Parity configuration....538
50.10 Registers....538
50.11 Electrical specification....543
51 Mechanical specifications....544
51.1 QFN48 6 x 6 mm package....544
51.2 WLCSP package....545
52 Ordering information....546
52.1 IC marking....546
52.2 Box labels....546
52.3 Order code....547
52.4 Code ranges and values....547
52.5 Product options....548
53 Reference circuitry....550
53.1 Schematic QFAA and QFAB QFN48 with internal LDO setup....550
53.2 Schematic QFAA and QFAB QFN48 with DC/DC regulator setup....551
53.3 Schematic QFAA and QFAB QFN48 with DC/DC regulator and NFC setup....552
53.4 Schematic CIAA WLCSP with internal LDO setup....553

53.5 Schematic CIAA WLCSP with DC/DC regulator setup....554
53.6 Schematic CIAA WLCSP with DC/DC regulator and NFC setup....555
53.7 PCB guidelines....555
53.8 PCB layout example....556
53.9 PMIC support....557
54 Legal notices....558

1 Revision history

DateVersionDescription
December 20231.9The following content has been added or updated:Reference circuitry on page 550 - Added PMIC support section
November 20211.8The following content has been added or updated:Ordering information on page 546 - Build codes Fxx not recommended for new designs.
August 20211.7The following content has been added or updated:Pin assignments on page 14 - Added description of standard drive and low frequency I/OFICR — Factory information configuration registers on page 44 - Updated INFO.VARIANT register
April 20211.6The following content has been added or updated:Debug and trace on page 73 - Updated disabling access port protection description.FICR — Factory information configuration registers on page 44 - Updated INFO.VARIANT register.GPIO — General purpose input/output on page 114 - Updated electrical specification.SPIS — Serial peripheral interface slave with EasyDMA on page 296 - Updated SPIS electrical parameters $t_{SPIS,VSO}$ , $t_{SPIS,HSO}$ , $t_{SPIS,SUSI}$ , and $t_{SPIS,HSI}$ .
March 20211.5The following content has been added or updated:Absolute maximum ratings on page 20 - Increased Flash memory retention to 10 years at 85 °C.UICR — User information configuration registers on page 55 - Added value HwDisabled to APPROTECT register.Debug and trace on page 73 - Added description of APPROTECT functionality for devices where APPROTECT is controlled by hardware and software. Added peripheral APPROTECT with necessary registers to control APPROTECT for devices where APPROTECT is controlled by hardware and software.Ordering information on page 546 - Added new product options.
October 20171.4The following content has been added or updated:Recommended operating conditions on page 21 - Added WLCSP light sensitivity information.FICR — Factory information configuration registers on page 44 - Added registers PARTNO, HWREVISION and PRODUCTIONREVISION.UICR — User information configuration registers on page 55 - Changed width of PSELRESETn port fields.SPIM - Polarity in SPI mode table corrected.COMP — Comparator on page 396 - Documentation structure improvements/changes.Liability disclaimer updated - Directive 2011/65/EU (RoHS 2).
February 20171.3The following content has been added or updated:RADIO — 2.4 GHz Radio on page 209 - Introduced 2 Mbps Bluetooth® low energy mode.FICR — Factory information configuration registers on page 44 - Updated INFO.PACKAGE register (new package added).UARTE - Corrected the pin configuration table.PPI — Programmable peripheral interconnect on page 172 - Timing information corrected.Updated the liability disclaimer.
September 20161.2Updated the following:Power and clock management, Current consumption: Ultra-low power on page 80.Power, Current consumption, sleep on page 102
July 20161.1Added documentation for nRF52832 CIAA WLCSP.Added or updated the following content:Cover - Added Key features.Pin assignments on page 14 - Added WLCSP ball assignments. Moved GPIO usage restrictions here from GPIO/Notes on usage and restrictions.Absolute maximum ratings on page 20 - Added environmental information for WLCSP to the table.Memory on page 24 - Added QFAB and CIAA information to the table.FICR — Factory information configuration registers on page 44 - Updated INFO.PACKAGE register.UICR — User information configuration registers on page 55 - Updated APPROTECT register.Debug and trace on page 73 - Updated DAP - Debug access port.POWER — Power supply on page 81 - Updated Pin reset.CLOCK — Clock control on page 104 - Updated information on external 32 kHz clock support.GPIO — General purpose input/output on page 114 - Added GPIO located near the RADIO.RADIO — 2.4 GHz Radio on page 209 - Updated Figure 29 and Interframe spacing.CCM - Updated SCRATCHPTR register.SPIM - Updated Master mode pin configuration.UARTE - Added RXDRDY and TXDRDY events.NFCT - Updated Electrical specifications.PWM — Pulse width modulation on page 499 - Updated SEQ[1].REFRESH register.Mechanical specifications on page 544 - Added WLCSP package.Ordering information on page 546 - Updated with CIAA and QFAB information.Reference circuitry on page 550 - QFAB information added. CIAA WLCSP schematics added.
February 20161.0First release.

2 About this document

This product specification is organized into chapters based on the modules and peripherals that are available in this IC.

The peripheral descriptions are divided into separate sections that include the following information:

• A detailed functional description of the peripheral

• Register configuration for the peripheral

• Electrical specification tables, containing performance data which apply for the operating conditions described in Recommended operating conditions on page 21.

2.1 Document naming and status

Nordic uses three distinct names for this document, which are reflecting the maturity and the status of the document and its content.

Table 1: Defined document names

Document nameDescription
Objective Product Specification (OPS)Applies to document versions up to 0.7.
Preliminary Product Specification (PPS)This product specification contains target specifications for product development.Applies to document versions 0.7 and up to 1.0.
Product Specification (PS)This product specification contains preliminary data. Supplementary data may be published from Nordic Semiconductor ASA later.Applies to document versions 1.0 and higher.This product specification contains final product specifications. Nordic Semiconductor ASA reserves the right to make changes at any time without notice in order to improve design and supply the best possible product.

2.2 Peripheral naming and abbreviations

Every peripheral has a unique capitalized name or an abbreviation of its name, e.g. TIMER, used for identification and reference. This name is used in chapter headings and references, and it will appear in the ARM® Cortex® Microcontroller Software Interface Standard (CMSIS) hardware abstraction layer to identify the peripheral.

The peripheral instance name, which is different from the peripheral name, is constructed using the peripheral name followed by a numbered postfix, starting with 0, for example, TIMER0. A postfix is normally only used if a peripheral can be instantiated more than once. The peripheral instance name is also used in the CMSIS to identify the peripheral instance.

2.3 Register tables

Individual registers are described using register tables. These tables are built up of two sections. The first three colored rows describe the position and size of the different fields in the register. The following rows describe the fields in more detail.

2.3.1 Fields and values

The Id (Field Id) row specifies the bits that belong to the different fields in the register. If a field has enumerated values, then every value will be identified with a unique value id in the Value Id column.

A blank space means that the field is reserved and read as undefined, and it also must be written as 0 to secure forward compatibility. If a register is divided into more than one field, a unique field name is specified for each field in the Field column. The Value Id may be omitted in the single-bit bit fields when values can be substituted with a Boolean type enumerator range, e.g. true/false, disable(d)/enable(d), on/off, and so on.

Values are usually provided as decimal or hexadecimal. Hexadecimal values have a 0x prefix, decimal values have no prefix.

The Value column can be populated in the following ways:

• Individual enumerated values, for example 1, 3, 9.

• Range of values, e.g. [0..4], indicating all values from and including 0 and 4.

• Implicit values. If no values are indicated in the Value column, all bit combinations are supported, or alternatively the field's translation and limitations are described in the text instead.

If two or more fields are closely related, the Value Id, Value, and Description may be omitted for all but the first field. Subsequent fields will indicate inheritance with '..'.

A feature marked Deprecated should not be used for new designs.

2.4 Registers

Table 2: Register Overview

RegisterOffsetDescription
DUMMY0x514Example of a register controlling a dummy feature

2.4.1 DUMMY

Address offset: 0x514

Example of a register controlling a dummy feature

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDCCCBAA
Reset 0x0005000200000000000000101000000000000010
IdRWFieldValue IdValueDescription
ARWFIELD_AExample of a field with several enumerated values
Disabled0The example feature is disabled
NormalMode1The example feature is enabled in normal mode
ExtendedMode2The example feature is enabled along with extra functionality
BRWFIELD_BExample of a deprecated fieldDeprecated
Disabled0The override feature is disabled
Enabled1The override feature is enabled
CRWFIELD_CExample of a field with a valid range of values
ValidRange[2..7]Example of allowed values for this field
DRWFIELD_DExample of a field with no restriction on the values

3 Block diagram

This block diagram illustrates the overall system. Arrows with white heads indicate signals that share physical pins with other signals.


Figure 1: Block diagram

4 Pin assignments

Here we cover the pin assignments for each variant of the chip.

4.1 QFN48 pin assignments


Figure 2: QFN48 pin assignments, top view

Table 3: QFN48 pin assignments

PinNameTypeDescription
Left Side of chip
1DEC1Power0.9 V regulator digital supply decoupling
2P0.00Digital I/OGeneral purpose I/O
XL1Analog inputConnection for 32.768 kHz crystal (LFXO)
3P0.01Digital I/OGeneral purpose I/O
XL2Analog inputConnection for 32.768 kHz crystal (LFXO)
4P0.02Digital I/OGeneral purpose I/O
AIN0Analog inputSAADC/COMP/LPCOMP input
5P0.03Digital I/OGeneral purpose I/O
AIN1Analog inputSAADC/COMP/LPCOMP input
6P0.04Digital I/OGeneral purpose I/O
AIN2Analog inputSAADC/COMP/LPCOMP input
7P0.05Digital I/OGeneral purpose I/O
AIN3Analog inputSAADC/COMP/LPCOMP input
8P0.06Digital I/OGeneral purpose I/O
9P0.07Digital I/OGeneral purpose I/O
10P0.08Digital I/OGeneral purpose I/O
11NFC1NFC inputNFC antenna connection
P0.09Digital I/OGeneral purpose $I/O^1$
12NFC2NFC inputNFC antenna connection
P0.10Digital I/OGeneral purpose $I/O^1$
Bottom side of chip
13VDDPowerPower supply
14P0.11Digital I/OGeneral purpose I/O
15P0.12Digital I/OGeneral purpose I/O
16P0.13Digital I/OGeneral purpose I/O
17P0.14Digital I/OGeneral purpose I/O
TRACEDATA[3]Trace port output
18P0.15Digital I/OGeneral purpose I/O
TRACEDATA[2]Trace port output
19P0.16Digital I/OGeneral purpose I/O
TRACEDATA[1]Trace port output
20P0.17Digital I/OGeneral purpose I/O
21P0.18Digital I/OGeneral purpose I/O
TRACEDATA[0] / SWOSingle wire output
Trace port output
22P0.19Digital I/OGeneral purpose I/O
23P0.20Digital I/OGeneral purpose I/O
TRACECLKTrace port clock output
24P0.21Digital I/OGeneral purpose I/O
nRESETConfigurable as pin reset
Right Side of chip
25SWDCLKDigital inputSerial wire debug clock input for debug and programming
26SWDIODigital I/OSerial wire debug I/O for debug and programming
27P0.22Digital I/OGeneral purpose $I/O^2$
28P0.23Digital I/OGeneral purpose $I/O^2$
29P0.24Digital I/OGeneral purpose $I/O^2$
30ANTRFSingle-ended radio antenna connection
31VSSPowerGround (Radio supply)
32DEC2Power1.3 V regulator supply decoupling (Radio supply)
33DEC3PowerPower supply decoupling
34XC1Analog inputConnection for 32 MHz crystal
35XC2Analog inputConnection for 32 MHz crystal
36VDDPowerPower supply
Top side of chip
37P0.25Digital I/OGeneral purpose $I/O^2$
38P0.26Digital I/OGeneral purpose $I/O^2$
39P0.27Digital I/OGeneral purpose $I/O^2$
40P0.28Digital I/OGeneral purpose $I/O^2$
AIN4Analog inputSAADC/COMP/LPCOMP input
41P0.29Digital I/OGeneral purpose $I/O^2$
AIN5Analog inputSAADC/COMP/LPCOMP input
42P0.30Digital I/OGeneral purpose $I/O^2$
AIN6Analog inputSAADC/COMP/LPCOMP input
43P0.31Digital I/OGeneral purpose $I/O\ pin^2$
44AIN7NCAnalog inputSAADC/COMP/LPCOMP inputNo connectLeave unconnected
45VSSPowerGround
46DEC4Power1.3 V regulator supply decouplingInput from DC/DC regulatorOutput from 1.3 V LDO
47DCCPowerDC/DC regulator output
48VDDPowerPower supply
Bottom of chip
Die padVSSPowerGround padExposed die pad must be connected to ground (VSS) for proper device operation.

4.2 WLCSP ball assignments


Figure 3: WLCSP ball assignments, top view

Table 4: WLCSP ball assignments

BallNameDescription
A1XC2Analog inputConnection for 32 MHz crystal
A2DEC2Power1.3 V regulator supply decoupling (Radio supply)
A3P0.28Digital I/OGeneral purpose $I/O^3$
AIN4Analog inputSAADC/COMP/LPCOMP input
A4P0.29Digital I/OGeneral purpose $I/O^3$
AIN5Analog inputSAADC/COMP/LPCOMP input
A5P0.30Digital I/OGeneral purpose $I/O^3$
AIN6Analog inputSAADC/COMP/LPCOMP input
A6DEC4Power1.3 V regulator supply decouplingInput from DC/DC converter. Output from 1.3 V LDO
A7VDDPowerPower supply
B2XC1Analog inputConnection for 32 MHz crystal
B3P0.25Digital I/OGeneral purpose $I/O^3$

1 See GPIO located near the radio on page 18 for more information.
2 See NFC antenna pins on page 18 for more information.

BallNameDescription
B4P0.27Digital I/OGeneral purpose $I/O^3$
B5P0.31Digital I/OGeneral purpose $I/O^3$
AIN7Analog inputSAADC/COMP/LPCOMP input
B6DCCPowerDC/DC converter output
B7DEC1Power0.9 V regulator digital supply decoupling
C2DEC3PowerPower supply decoupling
C3NCN/ANot connected
C4VSSPowerGround
C5VSSPowerGround
C6P0.02Digital I/OGeneral purpose I/O
AINOAnalog inputSAADC/COMP/LPCOMP input
C7P0.01Digital I/OGeneral purpose I/O
XL2Analog inputConnection for 32.768 kHz crystal (LFXO)
D1ANTRFSingle-ended radio antenna connection
D2VSS_PAPowerGround (Radio supply)
D3P0.26Digital I/OGeneral purpose $I/O^3$
D6P0.03Digital I/OGeneral purpose I/O
AIN1Analog inputSAADC/COMP/LPCOMP input
D7P0.00Digital I/OGeneral purpose I/O
XL1Analog inputConnection for 32.768 kHz crystal (LFXO)
E1P0.24Digital I/OGeneral purpose $I/O^3$
E2P0.23Digital I/OGeneral purpose $I/O^3$
E3VSSPowerGround
E6P0.04Digital I/OGeneral purpose I/O
AIN2Analog inputSAADC/COMP/LPCOMP input
E7P0.05Digital I/OGeneral purpose I/O
AIN3Analog inputSAADC/COMP/LPCOMP input
F1SWDCLKDigital inputSerial wire debug clock input for debug and programming
F2P0.22Digital I/OGeneral purpose $I/O^3$
F3P0.19Digital I/OGeneral purpose I/O
F4P0.11Digital I/OGeneral purpose I/O
F5VSSPowerGround
F6P0.07Digital I/OGeneral purpose I/O
F7P0.06Digital I/OGeneral purpose I/O
G1SWDIODigital I/OSerial wire debug I/O for debug and programming
G2P0.20Digital I/OGeneral purpose I/O
TRACECLKTrace port clock output
G3P0.17Digital I/OGeneral purpose I/O
G4P0.13Digital I/OGeneral purpose I/O
G5NFC2NFC inputNFC antenna connection
P0.10Digital I/OGeneral purpose $I/O^4$
G6NFC1NFC inputNFC antenna connection
P0.09Digital I/OGeneral purpose $I/O^4$
G7P0.08Digital I/OGeneral purpose I/O
H1P0.21Digital I/OGeneral purpose I/O
nRESETConfigurable as pin reset
H2P0.18Digital I/OGeneral purpose I/O
TRACEDATA[0]Trace port output
H3P0.16Digital I/OGeneral purpose I/O
TRACEDATA[1]Trace port output
H4P0.15Digital I/OGeneral purpose I/O
BallNameDescription
TRACEDATA[2]Trace port output
H5P0.14Digital I/OGeneral purpose I/O
TRACEDATA[3]Trace port output
H6P0.12Digital I/OGeneral purpose I/O
H7VDDPowerPower supply

4.3 GPIO usage restrictions

For more information on standard drive, see GPIO — General purpose input/output on page 114. Low frequency I/O is a signal with a frequency up to 10 kHz.

4.3.1 GPIO located near the radio

Radio performance parameters, such as sensitivity, may be affected by high frequency digital I/O with large sink/source current close to the Radio power supply and antenna pins.

Table 5: GPIO recommended usage for QFN48 package on page 18 and Table 6: GPIO recommended usage for WLCSP package on page 18 identify some GPIO that have recommended usage guidelines to maximize radio performance in an application.

Table 5: GPIO recommended usage for QFN48 package

PinGPIORecommended usage
27P0.22Low drive, low frequency I/O only.
28P0.23
29P0.24
37P0.25
38P0.26
39P0.27
40P0.28
41P0.29
42P0.30
43P0.31

Table 6: GPIO recommended usage for WLCSP package

PinGPIORecommended usage
F2P0.22Low drive, low frequency I/O only.
E2P0.23
E1P0.24
B3P0.25
D3P0.26
B4P0.27
A3P0.28
A4P0.29
A5P0.30
B5P0.31

4.3.2 NFC antenna pins

Two physical pins can be configured either as NFC antenna pins (factory default), or as GPIOs, as shown below.

Table 7: GPIO pins used by NFC

NFC pad nameGPIO
NFC1P0.09
NFC2P0.10

When configured as NFC antenna pins, the GPIOs on those pins will automatically be set to DISABLE state and a protection circuit will be enabled preventing the chip from being damaged in the presence of a strong

NFC field. The protection circuit will short the two pins together if voltage difference exceeds approximately 2 V.

For information on how to configure these pins as normal GPIOs, see NFCT — Near field communication tag on page 420 and UICR — User information configuration registers on page 55. Note that the device will not be protected against strong NFC field damage if the pins are configured as GPIO and an NFC antenna is connected to the device. The pins will always be configured as NFC pins during power-on reset until the configuration is set according to the UICR register.

These two pins will have some limitations when configured as GPIO. The pin capacitance will be higher on these pins, and there is some current leakage between the two pins if they are driven to different logical values. To avoid leakage between the pins when configured as GPIO, these GPIOs should always be at the same logical value whenever entering one of the device power saving modes. See Electrical specification.

5 Absolute maximum ratings

Maximum ratings are the extreme limits to which the chip can be exposed for a limited amount of time without permanently damaging it. Exposure to absolute maximum ratings for prolonged periods of time may affect the reliability of the device.

Table 8: Absolute maximum ratings

Min.Max.Unit
Supply voltages
VDD-0.3+3.9V
VSS0V
I/O pin voltage
$V_{I/O}$ , VDD ≤3.6 V-0.3VDD + 0.3 VV
$V_{I/O}$ , VDD >3.6 V-0.33.9 VV
NFC antenna pin current
$I_{NFC1/2}$ 80mA
Radio
RF input level10dBm
Environmental QFN48, 6×6 mm package
Storage temperature-40+125°C
MSL (moisture sensitivity level)2
ESD HBM (human body model)4kV
ESD CDM (charged device model)1000V
Environmental WLCSP, 3.0×3.2 mm package
Storage temperature-40+125°C
MSL1
ESD HBM2kV
ESD CDM500V
Flash memory
Endurance10 000Write/erase cycles
Retention10 years at 85°C

ATTENTION

OBSERVE PRECAUTION FOR HANDLING ELECTROSTATIC SENSITIVE DEVICE

HBM (Human Body Model): Class 3A

6 Recommended operating conditions

The operating conditions are the physical parameters that the chip can operate within.

Table 9: Recommended operating conditions

SymbolParameterNotesMin.Nom.Max.Units
VDDSupply voltage, independent of DCDC enable1.73.03.6V
$t_{R\_VDD}$ Supply rise time (0 V to 1.7 V)60ms
TAOperating temperature-402585°C

Important: The on-chip power-on reset circuitry may not function properly for rise times longer than the specified maximum.

6.1 WLCSP light sensitivity

All WLCSP package variants are sensitive to visible and close-range infrared light. This means that a final product design must shield the chip properly, either by final product encapsulation or by shielding/coating of the WLCSP device.

7 CPU

The ARM® Cortex®-M4 processor with floating-point unit (FPU) 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)

The ARM Cortex Microcontroller Software Interface Standard (CMSIS) hardware abstraction layer for the ARM Cortex processor series is implemented and available for the M4 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 flash will have a wait state penalty on the nRF52 Series. An 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 22 shows CPU performance parameters including wait states in different modes, CPU current and efficiency, and processing power and efficiency based on the CoreMark® benchmark.

7.1 Floating point interrupt

The floating point unit (FPU) may generate exceptions when used due to e.g. overflow or underflow. These exceptions will trigger the FPU interrupt (see Instantiation on page 25). To clear the IRQ line when an exception has occurred, the relevant exception bit within the FPSCR register needs to be cleared. For more information about the FPSCR or other FPU registers, see Cortex-M4 Devices Generic User Guide.

7.2 Electrical specification

7.2.1 CPU performance

The CPU clock speed is 64 MHz. Current and efficiency data is taken when in System ON and the CPU is executing the CoreMark™ benchmark. It includes power regulator and clock base currents. All other blocks are IDLE.

SymbolDescriptionMin.Typ.Max.Units
$W_{FLASH}$ CPU wait states, running from flash, cache disabled02
$W_{FLASHCACHE}$ CPU wait states, running from flash, cache enabled03
$W_{RAM}$ CPU wait states, running from RAM0
$I_{DDFLASHCACHE}$ CPU current, running from flash, cache enabled, LDO7.4mA
$I_{DDFLASHCACHEDCDC}$ CPU current, running from flash, cache enabled, DCDC 3V3.7mA
$I_{DDFLASH}$ CPU current, running from flash, cache disabled, LDO8.0mA
$I_{DDFLASHDCDC}$ CPU current, running from flash, cache disabled, DCDC 3V3.9mA
$I_{DDRAM}$ CPU current, running from RAM, LDO6.7mA
$I_{DDRAMDCDC}$ CPU current, running from RAM, DCDC 3V3.3mA
$I_{DDFLASH/MHz}$ CPU efficiency, running from flash, cache enabled, LDO125μA/MHz
$I_{DDFLASHDCDC/MHz}$ CPU efficiency, running from flash, cache enabled, DCDC 3V58μA/MHz
$CM_{FLASH}$ CoreMark $^5$ , running from flash, cache enabled215CoreN
$CM_{FLASH/MHz}$ CoreMark per MHz, running from flash, cache enabled3.36CoreNMHz
$CM_{FLASH/mA}$ CoreMark per mA, running from flash, cache enabled, DCDC 3V58CoreNmA

7.3 CPU and support module configuration

The ARM® Cortex®-M4 processor has a number of CPU options and support modules implemented on the device.

Option / ModuleDescriptionImplemented
Core options
NVICNested Vector Interrupt Controller37 vectors
PRIORITIESPriority bits3
WICWakeup Interrupt ControllerNO
EndiannessMemory system endiannessLittle endian
Bit BandingBit banded memoryNO
DWTData Watchpoint and TraceYES
SysTickSystem tick timerYES
Modules
MPUMemory protection unitYES
FPUFloating point unitYES
DAPDebug Access PortYES
ETMEmbedded Trace MacrocellYES
ITMInstrumentation Trace MacrocellYES
TPIUTrace Port Interface UnitYES
ETBEmbedded Trace BufferNO
FPBFlash Patch and Breakpoint UnitYES
HTMAHB Trace MacrocellNO

8 Memory

The nRF52832 contains flash and RAM that can be used for code and data storage.

The amount of RAM and flash will vary depending on variant, see Table 10: Memory variants on page 24.

Table 10: Memory variants

Device nameRAMFlashComments
nRF52832-QFAA64 kB512 kB
nRF52832-QFAB32 kB256 kB
nRF52832-CIAA64 kB512 kB

The CPU and the EasyDMA can access memory via the AHB multilayer interconnect. The CPU is also able to access peripherals via the AHB multilayer interconnect, as illustrated in Figure 4: Memory layout on page 24.

Figure 4: Memory layout

See AHB multilayer on page 27 and EasyDMA on page 28 for more information about the AHB multilayer interconnect and the EasyDMA.

The same physical RAM is mapped to both the Data RAM region and the Code RAM region. It is up to the application to partition the RAM within these regions so that one does not corrupt the other.

8.1 RAM - Random access memory

The RAM interface is divided into multiple RAM AHB slaves.

Each RAM AHB slave is connected to two 4-kilobyte RAM sections, see Section 0 and Section 1 in Figure 4: Memory layout on page 24.

Each of the RAM sections have separate power control for System ON and System OFF mode operation, which is configured via RAM register (see the POWER — Power supply on page 81).

8.2 Flash - Non-volatile memory

The Flash can be read an unlimited number of times by the CPU, but it has restrictions on the number of times it can be written and erased and also on how it can be written.

Writing to Flash is managed by the Non-volatile memory controller (NVMC), see NVMC — Non-volatile memory controller on page 30.

The Flash is divided into multiple pages that can be accessed by the CPU via both the ICODE and DCODE buses as shown in, Figure 4: Memory layout on page 24. Each page is divided into 8 blocks.

8.3 Memory map

The complete memory map is shown in Figure 5: Memory map on page 25. As described in Memory on page 24, Code RAM and the Data RAM are the same physical RAM.

nRF52832 Address MapCortex M4 System Address Map
0xE010 0000ROM TableSystem
0xEOFF 0000External PPB
0xE004 2000ETMPrivate Peripheral Bus - External
0xE004 1000TPIUPrivate Peripheral Bus - Internal
0xE004 0000
0xE004 0000ReservedExternal device 1.0GB
0xE000 F000SCS
0xE000 E000Reserved
0xE000 3000FPB
0xE000 2000DWT
0xE000 1000ITMExternal RAM 1.0GB
0xE000 0000
0x2000 0000Reserved
UICR
Reserved
FICR
Reserved
Code RAM
Reserved
Flash

Figure 5: Memory map

8.4 Instantiation

Table 11: Instantiation table

IDBase AddressPeripheralInstanceDescription
00x40000000POWERPOWERPower control
00x40000000CLOCKCLOCKClock control
00x40000000APPROTECTAPPROTECTAPPROTECT control
00x40000000BPROTBPROTBlock Protect
10x40001000RADIORADIO2.4 GHz radio
20x40002000UARTEUARTE0Universal Asynchronous Receiver/Transmitter with EasyDMA
20x40002000UARTUART0Universal Asynchronous Receiver/TransmitterDeprecated
30x40003000SPIMSPIMOSPI master 0
30x40003000SPISSPISOSPI slave 0
30x40003000SPISPI0SPI master 0Deprecated
30x40003000TWIMTWIMOTwo-wire interface master 0
30x40003000TWISTWISOTwo-wire interface slave 0
30x40003000TWITWIOTwo-wire interface master 0Deprecated
40x40004000TWITWI1Two-wire interface master 1Deprecated
40x40004000TWIMTWIM1Two-wire interface master 1
40x40004000TWISTWIS1Two-wire interface slave 1
40x40004000SPISPI1SPI master 1Deprecated
40x40004000SPIMSPIM1SPI master 1
40x40004000SPISSPIS1SPI slave 1
50x40005000NFCTNFCTNear Field Communication Tag
60x40006000GPIOTEGPIOTEGPIO Tasks and Events
70x40007000SAADCSAADCAnalog to digital converter
80x40008000TIMERTIMER0Timer 0
90x40009000TIMERTIMER1Timer 1
100x4000A000TIMERTIMER2Timer 2
110x4000B000RTCRTC0Real-time counter 0
120x4000C000TEMPTEMPTemperature sensor
130x4000D000RNGRNGRandom number generator
140x4000E000ECBECBAES Electronic Code Book (ECB) mode block encryption
150x4000F000CCMCCMAES CCM Mode Encryption
150x4000F000AARAARAccelerated Address Resolver
160x40010000WDTWDTWatchdog timer
170x40011000RTCRTC1Real-time counter 1
180x40012000QDECQDECQuadrature decoder
190x40013000LPCOMPLPCOMPLow power comparator
190x40013000COMPCOMPGeneral purpose comparator
200x40014000EGUEGU0Event Generator Unit 0
200x40014000SWISWIOSoftware interrupt 0
210x40015000EGUEGU1Event Generator Unit 1
210x40015000SWISWI1Software interrupt 1
220x40016000SWISWI2Software interrupt 2
220x40016000EGUEGU2Event Generator Unit 2
230x40017000SWISWI3Software interrupt 3
230x40017000EGUEGU3Event Generator Unit 3
240x40018000SWISWI4Software interrupt 4
240x40018000EGUEGU4Event Generator Unit 4
250x40019000SWISWI5Software interrupt 5
250x40019000EGUEGU5Event Generator Unit 5
260x4001A000TIMERTIMER3Timer 3
270x4001B000TIMERTIMER4Timer 4
280x4001C000PWMPWM0Pulse Width Modulation Unit 0
290x4001D000PDMPDMPulse Density Modulation (Digital Microphone Interface)
300x4001E000NVMCNVMCNon-Volatile Memory Controller
310x4001F000PPIPPIProgrammable Peripheral Interconnect
320x40020000MWUMWUMemory Watch Unit
330x40021000PWMPWM1Pulse Width Modulation Unit 1
340x40022000PWMPWM2Pulse Width Modulation Unit 2
350x40023000SPISSPIS2SPI slave 2
350x40023000SPISPI2SPI master 2Deprecated
350x40023000SPIMSPIM2SPI master 2
360x40024000RTCRTC2Real-time counter 2
370x40025000I2SI2SInter-IC Sound Interface
380x40026000FPUFPUFPU interrupt
00x50000000GPIOGPIOGeneral purpose input and outputDeprecated
00x50000000GPIOP0General purpose input and output
N/A0x10000000FICRFICRFactory Information Configuration
N/A0x10001000UICRUICRUser Information Configuration

9 AHB multilayer

The CPU and all of the EasyDMAs are AHB bus masters on the AHB multilayer, while the RAM and various other modules are AHB slaves.

See Block diagram on page 13 for an overview of which peripherals implement EasyDMA.

The CPU has exclusive access to all AHB slaves except for the RAM that can also be accessed by the EasyDMA.

Access rights to each of the RAM AHB slaves are resolved using the priority of the different bus masters in the system

See AHB multilayer priorities on page 27 for information about the priority of the different AHB bus masters in the system. It is possible for two or more bus masters to have the same priority in cases where it is guaranteed by design that the related masters will never be able to access the same slave at the same time.

9.1 AHB multilayer priorities

Each master connected to the AHB multilayer is assigned a priority.

Table 12: AHB bus masters

Bus master namePriorityDescription
CPUHighest priority
SPIS1Applies to SPIM1, SPIS1, TWIM1, TWIS1
RADIO
CCM/ECB/AAR
SAADC
UARTE
SERIAL0Applies to SPIM0, SPISO, TWIM0, TWISO
SERIAL2Applies to SPIM2, SPIS2
NFCT
I2SI2S
PDMPDM
PWMLowest priorityApplies to PWM0, PWM1, PWM2

10 EasyDMA

EasyDMA is an easy-to-use direct memory access module that some peripherals implement to gain direct access to Data RAM.

The EasyDMA is an AHB bus master similar to the CPU and it is connected to the AHB multilayer interconnect for direct access to the Data RAM. The EasyDMA is not able to access the Flash.

A peripheral can implement multiple EasyDMA instances, for example to provide a dedicated channel for reading data from RAM into the peripheral at the same time as a second channel is dedicated for writing data to the RAM from the peripheral. This concept is illustrated in Figure 6: EasyDMA example on page 28


Figure 6: EasyDMA example

An EasyDMA channel is usually exposed to the user in the form illustrated below, but some variations may occur:

READERBUFFER_SIZE 5
WRITERBUFFER_SIZE 6

uint8_t readerBuffer[READERBUFFER_SIZE] __at__ 0x20000000;
uint8_t writerBuffer[WRITERBUFFER_SIZE] __at__ 0x20000005;

// Configuring the READER channel
MYPERIPHERAL->READER.MAXCNT = READERBUFFER_SIZE;
MYPERIPHERAL->READER.PTR = &readerBuffer;

// Configure the WRITER channel
MYPERIPHERAL->WRITER.MAXCNT = WRITEERBUFFER_SIZE;
MYPERIPHERAL->WRITER.PTR = &writerBuffer;

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 here assumed that the peripheral will read 5 bytes from the readerBuffer located in RAM at address 0x20000000, process the data and then 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 Figure 7: EasyDMA memory layout on page 29.

0x20000000readerBuffer[0]readerBuffer[1]readerBuffer[2]readerBuffer[3]
0x20000004readerBuffer[4]writerBuffer[0]writerBuffer[1]writerBuffer[2]
0x20000008writerBuffer[3]writerBuffer[4]writerBuffer[5]

Figure 7: EasyDMA memory layout

The EasyDMA channel's MAXCNT register cannot be specified larger than the actual size of the buffer. If, for example, the WRITER.MAXCNT register is specified larger than the size of the writerBuffer, the WRITER EasyDMA channel may overflow the writerBuffer.

After the peripheral has completed the EasyDMA transfer, the CPU can read the EasyDMA channel's AMOUNT register to see how many bytes that were transferred, e.g. it is possible for the CPU to read the MYPERIPHERAL->WRITER.AMOUNT register to see how many bytes the WRITER wrote to RAM.

10.1 EasyDMA array list

The EasyDMA is able to operate in a mode called array list.

The EasyDMA array list can be represented by the data structure ArrayList_type illustrated in the code example below.

This data structure includes only a buffer with size equal to READER.MAXCNT. EasyDMA will use the READER.MAXCNT register to determine when the buffer is full.

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
typedef struct ArrayList {
    uint8_t buffer[BUFFER_SIZE];
} ArrayList_type;
ArrayList_type ReaderList[3];
READER.MAXCNT = BUFFER_SIZE;
READER.PTR = &ReaderList;

READER.PTR = &ReaderList

0x20000000 : ReaderList[0]

0x20000004 : ReaderList[1]

0x20000008 : ReaderList[2]

buffer[0]buffer[1]buffer[2]buffer[3]
buffer[0]buffer[1]buffer[2]buffer[3]
buffer[0]buffer[1]buffer[2]buffer[3]

Figure 8: EasyDMA array list

11 NVMC — Non-volatile memory controller

The Non-volatile memory controller (NVMC) is used for writing and erasing the internal Flash memory and the UICR.

Before a write can be performed, the NVMC must be enabled for writing in CONFIG.WEN. Similarly, before an erase can be performed, the NVMC must be enabled for erasing in CONFIG.EEN, 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.

11.1 Writing to Flash

When writing is enabled, the Flash is written by writing a full 32-bit word to a word-aligned address in the Flash.

The NVMC is only able to write '0' to bits in the Flash that are erased, that is, set to '1'. It cannot write back a bit to '1'.

As illustrated in Memory on page 24, the Flash is divided into multiple pages that are further divided into multiple blocks. The same block in the Flash can only be written $n _ { W R I T E }$ number of times before an erase must be performed using ERASEPAGE or ERASEALL. See the memory size and organization in Memory on page 24 for block size.

Only full 32-bit words can be written to Flash using the NVMC interface. To write less than 32 bits to Flash, write the data as a word, and set all the bits that should remain unchanged in the word to '1'. Note that the restriction about the number of writes (see above) still applies in this case.

The time it takes to write a word to the Flash is specified by $t _ { W R I T E } .$ . The CPU is halted while the NVMC is writing to the Flash.

Only word-aligned writes are allowed. Byte or half-word-aligned writes will result in a hard fault.

11.2 Erasing a page in Flash

When erase is enabled, the Flash can be erased page by page using the ERASEPAGE register.

After erasing a Flash page, all bits in the page are set to '1'. The time it takes to erase a page is specified by t . The CPU is halted while the NVMC performs the erase operation.

11.3 Writing to user information configuration registers (UICR)

User information configuration registers (UICR) are written in the same way as Flash. After UICR has been written, the new UICR configuration will only take effect after a reset.

UICR can only be written n number of times before an erase must be performed using ERASEUICR or ERASEALL.

The time it takes to write a word to the UICR is specified by tWRITE. The CPU is halted while the NVMC is writing to the UICR.

11.4 Erasing user information configuration registers (UICR)

When erase is enabled, UICR can be erased using the ERASEUICR register.

After erasing UICR all bits in UICR are set to '1'. The time it takes to erase UICR is specified by tERASEPAGE. The CPU is halted while the NVMC performs the erase operation.

11.5 Erase all

When erase is enabled, the whole Flash and UICR can be erased in one operation by using the ERASEALL register. ERASEALL will not erase the factory information configuration registers (FICR).

The time it takes to perform an ERASEALL command is specified by tERASEALL The CPU is halted while the NVMC performs the erase operation.

11.6 Cache

An instruction cache (I-Cache) can be enabled for the ICODE bus in the NVMC.

See the Memory map in Memory map on page 25 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 22

Enabling the cache can increase 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 will use some 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 reduce.

When disabled, the cache does not use current and does not retain its content.

It is possible to enable cache profiling to analyze the performance of the cache for your program using the ICACHECNF register. When profiling is enabled, the IHIT and IMISS registers are incremented for every instruction cache hit or miss respectively. The hit and miss profiling registers do not wrap around after reaching the maximum value. If the maximum value is reached, consider profiling for a shorter duration to get correct numbers.

11.7 Registers

Table 13: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4001E000NVMCNVMCNon-Volatile Memory Controller

Table 14: Register Overview

RegisterOffsetDescription
READY0x400Ready flag
CONFIG0x504Configuration register
ERASEPAGE0x508Register for erasing a page in Code area
ERASEPCR10x508Register for erasing a page in Code area. Equivalent to ERASEPAGE.Deprecated
ERASEALL0x50CRegister for erasing all non-volatile user memory
ERASEPCRO0x510Register for erasing a page in Code area. Equivalent to ERASEPAGE.Deprecated
ERASEUICR0x514Register for erasing User Information Configuration Registers
ICACHECNF0x540I-Code cache configuration register.
IHIT0x548I-Code cache hit counter.
IMISS0x54CI-Code cache miss counter.

11.7.1 READY

Address offset: 0x400

Ready flag

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARREADY
Busy0
Ready1

11.7.2 CONFIG

Address offset: 0x504

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWWEN
Ren0
Wen1
Een2

11.7.3 ERASEPAGE

Address offset: 0x508

Register for erasing a page in Code area

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWERASEPAGERegister for starting erase of a page in Code areaThe value is the address to the page to be erased. (Addresses of first word in page). Note that code erase has to be enabled by CONFIG.EEN before the page can be erased. Attempts to erase pages that are outside the code area may result in undesirable behaviour, e.g. the wrong page may be erased.

11.7.4 ERASEPCR1 ( Deprecated )

Address offset: 0x508

Register for erasing a page in Code area. Equivalent to ERASEPAGE.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWERASEPCR1

Register for erasing a page in Code area. Equivalent to ERASEPAGE.

11.7.5 ERASEALL

Address offset: 0x50C

Register for erasing all non-volatile user memory

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWERASEALL
UICR can be erased.
NoOperation0
Erase1

11.7.6 ERASEPCR0 ( Deprecated )

Address offset: 0x510

Register for erasing a page in Code area. Equivalent to ERASEPAGE.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWERASEPCRO

Register for starting erase of a page in Code area. Equivalent to ERASEPAGE.

11.7.7 ERASEUICR

Address offset: 0x514

Register for erasing User Information Configuration Registers

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWERASEUICR
NoOperation0
Erase1

11.7.8 ICACHECNF

Address offset: 0x540

I-Code cache configuration register.

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCACHEENCache enable
Disabled0Disable cache. Invalidates all cache entries.
Enabled1Enable cache
BRWCACHEPROFENCache profiling enable
Disabled0Disable cache profiling
Enabled1Enable cache profiling

11.7.9 IHIT

Address offset: 0x548

I-Code cache hit counter.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWHITSNumber of cache hits

11.7.10 IMISS

Address offset: 0x54C

I-Code cache miss counter.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMISSESNumber of cache misses

11.8 Electrical specification

11.8.1 Flash programming

SymbolDescriptionMin.Typ.Max.Units
$n_{WRITE,BLOCK}$ Amount of writes allowed in a block between erase181
$t_{WRITE}$ Time to write one word67.5338μs
$t_{ERASEPAGE}$ Time to erase one page2.0589.7ms
$t_{ERASEALL}$ Time to erase all flash6.72295.3ms

11.8.2 Cache size

SymbolDescriptionMin.Typ.Max.Units
$Size_{ICODE}$ I-Code cache size2048Bytes

12 BPROT — Block protection

The mechanism for protecting non-volatile memory can be used to prevent application code from erasing or writing to protected blocks.

Non-volatile memory can be protected from erases and writes depending on the settings in the CONFIG registers. One bit in a CONFIG register represents one protected block of 4 kB. There are four CONFIG registers of 32 bits, which means there are 128 protectable blocks in total.

Important: If an erase or write to a protected block is detected, the CPU will hard fault. If an ERASEALL operation is attempted from the CPU while any block is protected, it will be blocked and the CPU will hard fault.

On reset, all the protection bits are cleared. To ensure safe operation, the first task after reset must be to set the protection bits. The only way of clearing protection bits is by resetting the device from any reset source.

The protection mechanism is turned off when in debug interface mode (a debugger is connected) and the DISABLEINDEBUG register is set to disable. For more information, see Debug and trace on page 73.


Figure 9: Protected regions of program memory

12.1 Registers

Table 15: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40000000BPROTBPROTBlock Protect

Table 16: Register Overview

RegisterOffsetDescription
CONFIG00x600Block protect configuration register 0
CONFIG10x604Block protect configuration register 1
DISABLEINDEBUG0x608Disable protection mechanism in debug interface mode
0x60CReserved
CONFIG20x610Block protect configuration register 2
CONFIG30x614Block protect configuration register 3

12.1.1 CONFIG0

Address offset: 0x600

Block protect configuration register 0

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWREGION0Enable protection for region 0. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
BRWREGION1Enable protection for region 1. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
CRWREGION2Enable protection for region 2. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
DRWREGION3Enable protection for region 3. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
ERWREGION4Enable protection for region 4. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
FRWREGION5Enable protection for region 5. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enableGRWREGION6
Disabled0Protection disabled
Enabled1Protection enable
HRWREGION7Enable protection for region 7. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
IRWREGION8Enable protection for region 8. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
JRWREGION9Enable protection for region 9. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enableRWREGION10
Disabled0Protection disabled
Enabled1Protection enable
LRWREGION11Enable protection for region 11. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enableRWREGION12
Disabled0Protection disabled
Enabled1Protection enable
NRWREGION13Enable protection for region 13. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
IdRWFieldValue IdValue
Enabled1
RRWREGION17
Disabled0
Enabled1
SRWREGION18
Disabled0
Enabled1
TRWREGION19
Disabled0
Enabled1Protection enable
URWREGION20
Disabled0Protection disabled
Enabled1Protection enable
VRWREGION21Enable protection for region 21. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
WRWREGION22Enable protection for region 22. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
XRWREGION23Enable protection for region 23. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
YRWREGION24Enable protection for region 24. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
ZRWREGION25Enable protection for region 25. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
aRWREGION26Enable protection for region 26. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
bRWREGION27Enable protection for region 27. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
cRWREGION28Enable protection for region 28. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
dRWREGION29Enable protection for region 29. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
eRWREGION30Enable protection for region 30. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable
fRWREGION31Enable protection for region 31. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enable

12.1.2 CONFIG1

Address offset: 0x604

Block protect configuration register 1

Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
idRWFieldValue IdValueDescription
ARWREGION32
Disabled0Enable protection for region 32. Write '0' has no effect.
Enabled1Protection enabled
BRWREGION33
Disabled0Enable protection for region 33. Write '0' has no effect.
Enabled1Protection enabled
CRWREGION34
Disabled0Enable protection for region 34. Write '0' has no effect.
Enabled1Protection enabled
DRWREGION35
Disabled0Enable protection for region 35. Write '0' has no effect.
Enabled1Protection enabled
ERWREGION36
Disabled0Enable protection for region 36. Write '0' has no effect.
Enabled1Protection enabled
FRWREGION37
Disabled0Enable protection for region 37. Write '0' has no effect.
Enabled1Protection enabled
GRWREGION38
Disabled0Enable protection for region 38. Write '0' has no effect.
Enabled1Protection enabled
HRWREGION39
Disabled0Enable protection for region 39. Write '0' has no effect.
Enabled1Protection enabled
IRWREGION40
Disabled0Enable protection for region 40. Write '0' has no effect.
Enabled1Protection enabled
JRWREGION41
Disabled0Enable protection for region 41. Write '0' has no effect.
Enabled1Protection enabled
KRWREGION42
Disabled0Enable protection for region 42. Write '0' has no effect.
Enabled1Protection enabled
LRWREGION43
Disabled0Enable protection for region 43. Write '0' has no effect.
Enabled1Protection enabled
MRWREGION44
Disabled0Enable protection for region 44. Write '0' has no effect.
Enabled1Protection enabled
NRWREGION45
Disabled0Enable protection for region 45. Write '0' has no effect.
Enabled1Protection enabled
ORWREGION46
Disabled0Enable protection for region 46. Write '0' has no effect.
Enabled1Protection enabled
PRWREGION47
Disabled0Enable protection for region 47. Write '0' has no effect.
Enabled1Protection enabled
QRWREGION48
Disabled0Enable protection for region 48. Write '0' has no effect.
Enabled1Protection enabled
RRWREGION49
Disabled0Enable protection for region 49. Write '0' has no effect.
Enabled1Protection enabled
SRWREGION50
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
TRWREGION51
Disabled0
Enabled1
URWREGION52
Disabled0
Enabled1
VRWREGION53
Disabled0
Enabled1Enable protection for region 53. Write '0' has no effect.
WRWREGION54
Disabled0Enable protection for region 54. Write '0' has no effect.
Enabled1Enable protection for region 55. Write '0' has no effect.
XRWREGION55Enable protection for region 56. Write '0' has no effect.
Disabled0Enable protection for region 57. Write '0' has no effect.
Enabled1Enable protection for region 58. Write '0' has no effect.
YRWREGION56Enable protection for region 59. Write '0' has no effect.
Disabled0Enable protection for region 60. Write '0' has no effect.
Enabled1Enable protection for region 61. Write '0' has no effect.
ZRWREGION57Enable protection for region 62. Write '0' has no effect.
Disabled0Enable protection for region 63. Write '0' has no effect.
Enabled1Enable protection for region 64. Write '0' has no effect.
aRWREGION58Enable protection for region 65. Write '0' has no effect.
Disabled0Enable protection for region 66. Write '0' has no effect.
Enabled1Enable protection for region 67. Write '0' has no effect.
bRWREGION59Enable protection for region 68. Write '0' has no effect.
Disabled0Enable protection for region 69. Write '0' has no effect.
Enabled1Enable protection for region 70. Write '0' has no effect.
cRWREGION60Enable protection for region 71. Write '0' has no effect.
Disabled0Enable protection for region 72. Write '0' has no effect.
Enabled1Enable protection for region 73. Write '0' has no effect.
dRWREGION61Enable protection for region 74. Write '0' has no effect.
Disabled0Enable protection for region 75. Write '0' has no effect.
Enabled1Enable protection for region 76. Write '0' has no effect.
eRWREGION62Enable protection for region 77. Write '0' has no effect.
Disabled0Enable protection for region 78. Write '0' has no effect.
Enabled1Enable protection for region 79. Write '0' has no effect.
fRWREGION63Enable protection for region 80. Write '0' has no effect.
Disabled0Enable protection for region 81. Write '0' has no effect.
Enabled1Enable protection for region 82. Write '0' has no effect.

12.1.3 DISABLEINDEBUG

Address offset: 0x608

Disable protection mechanism in debug interface mode

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000100000000000000000000000000000001
IdRWFieldValue IdValue
ARWDISABLEINDEBUG
Disabled1
Bit number
Id
Reset 0x00000001
IdRWFieldValue Id
Enabled

12.1.4 CONFIG2

Address offset: 0x610

Block protect configuration register 2

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREGION64
Disabled0
Enabled1
BRWREGION65
Disabled0
Enabled1
CRWREGION66
Disabled0
Enabled1Protection enabled
DRWREGION67
Disabled0Protection enabled
Enabled1Protection enabled
ERWREGION68Enable protection for region 68. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
FRWREGION69Enable protection for region 69. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
GRWREGION70Enable protection for region 70. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
HRWREGION71Enable protection for region 71. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
IRWREGION72Enable protection for region 72. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled5
JRWREGION73Enable protection for region 73. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
KRWREGION74Enable protection for region 74. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
LRWREGION75Enable protection for region 75. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
MRWREGION76Enable protection for region 76. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
NRWREGION77Enable protection for region 77. Write '0' has no effect.
Disabled0Protection enabled
Enabled1Protection enabled
ORWREGION78Enable protection for region 78. Write '0' has no effect.
Disabled0Protection enabled
Enabled1
PRWREGION79
Disabled0
Enabled1
QRWREGION80
Disabled0
Enabled1
RRWREGION81
Disabled0
Enabled1Protection enabled
SRWREGION82
Disabled0Protection disabled
Enabled1Protection enabled
TRWREGION83Enable protection for region 83. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
URWREGION84Enable protection for region 84. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
VRWREGION85Enable protection for region 85. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
WRWREGION86Enable protection for region 86. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
XRWREGION87Enable protection for region 87. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
YRWREGION88Enable protection for region 88. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled5
ZRWREGION89Enable protection for region 89. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
aRWREGION90Enable protection for region 90. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
bRWREGION91Enable protection for region 91. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled

12.1.5 CONFIG3

Address offset: 0x614

Block protect configuration register 3

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWREGION96Enable protection for region 96. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
BRWREGION97Enable protection for region 97. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
CRWREGION98Enable protection for region 98. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
DRWREGION99Enable protection for region 99. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
ERWREGION100Enable protection for region 100. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabledProtection enabled
FRWREGION101Enable protection for region 101. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
GRWREGION102Enable protection for region 102. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
HRWREGION103Enable protection for region 103. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
IRWREGION104Enable protection for region 104. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\text{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$
JRWREGION105Enable protection for region 105. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ P_{\mathrm{t}} \) $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\text{t}}$
KRWREGION106Enable protection for region 106. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $ \mathrm{P}_{\mathrm{t}} \) $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ $\mathrm{P}_{\mathrm{t}}$ \( \left( \begin{array}{llll} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 & 27 & 28 & 29 & 30 & 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 & 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 & 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 & 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 & 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 & 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 & 91 & 92 & 93 & 94 & 95 & 96 & 97 & 98 & 99 & 100 & 101 & 102 & 103 & 104 & 105 & 106 & 107 & 108 & 109 & 110 & 111 & 112 & 113 & 114 & 115 & 116 & 117 & 118 & 119 & 120 & 121 & 122 & 123 & 124 & 125 & 126 & 127 & 128 & 129 & 130 & 131 & 132 & 133 & 134 & 135 & 136 & 137 & 138 & 139 & 140 & 141 & 142 & 143 & 144 & 145 & 146 & 147 & 148 & 149 & 150 & 151 & 152 & 153 & 154 & 155 & 156 & 157 & 158 & 159 & 160 & 161 & 162 & 163 & 164 & 165 & 166 & 167 & 168 & 169 & 170 & 171 & 172 & 173 & 174 & 175 & 176 & 177 & 178 & 179 & 180 & 181 & 182 & 183 & 184 & 185 & 186 & 187 & 188 & 189 & 190 & 191 & 192 & 193 & 194 & 195 & 196 & 197 & 198 & 199 & 200 & 201 & 202 & 203 & 204 & 205 & 206 & 207 & 208 & 209 & 210 & 211 & 212 & 213 & 214 & 215 & 216 & 217 & 218 & 219 & 220 & 221 & 222 & 223 & 224 & 225 & 226 & 227 & 228 & 229 & 230 & 231 & 232 & 233 & 234 & 235 & 236 & 237 & 238 & 239 & 240 & 241 & 242 & 243 & 244 & 245 & 246 & 247 & 248 & 249 & 250 & 251 & 252 & 253 & 254 & 255 & 256 & 257 & 258 & 259 & 260 & 261 & 262 & 263 & 264 & 265 & 266 & 267 & 268 & 269 & 270 & 271 & 272 & 273 & 274 & 275 & 276 & 277 & 278 & 279 & 280 & 281 & 282 & 283 & 284 & 285 & 286 & 287 & 288 & 289 & 290 & 291 & 292 & 293 & 294 & 295 & 296 & 297 & 298 & 299 & 300 & 301 & 302 & 303 & 304 & 305 & 306 & 307 & 308 & 309 & 310 & 311 & 312 & 313 & 314 & 315 & 316 & 317 & 318 & 319 & 320 & 321 & 322 & 323 & 324 & 325 & 326 & 327 & 328 & 329 & 330 & 331 & 332 & 333 & 334 & 335 & 336 & 337 & 338 & 339 & 340 & 341 & 342 & 343 & 344 & 345 & 346 & 347 & 348 & 349 & 350 & 351 & 352 & 353 & 354 & 355 & 356 & 357 & 358 & 359 & 360 & 361 & 362 & 363 & 364 & 365 & 366 & 367 & 368 & 369 & 370 & 371 & 372 & 373 & 374 & 375 & 376 & 377 & 378 & 379 & 380 & 381 & 382 & 383 & 384 & 385 & 386 & 387 & 388 & 389 & 390 & 391 & 392 & 393 & 394 & 395 & 396 & 397 & 398 & 399 & 400 & 401 & 402 & 403 & 404 & 405 & 406 & 407 & 408 & 409 & 410 & 411 & 412 & 413 & 414 & 415 & 416 & 417 & 418 & 419 & 420 & 421 & 422 & 423 & 424 & 425 & 426 & 427 & 428 & 429 & 430 & 431 & 432 & 433 & 434 & 435 & 436 & 437 & 438 & 439 & 440 & 441 & 442 & 443 & 444 & 445 & 446 & 447 & 448 & 449 & 450 & 451 & 452 & 453 & 454 & 455 & 456 & 457 & 458 & 459 & 460 & 461 & 462 & 463 & 464 & 465 & 466 & 467 & 468 & 469 & 470 & 471 & 472 & 473 & 474 & 475 & 476 & 477 & 478 & 479 & 480 & 481 & 482 & 483 & 484 & 485 & 486 & 487 & 488 & 489 & 490 & 491 & 492 & 493 & 494 & 495 & 496 & 497 & 498 & 499 & 500 & 501 & 502 & 503 & 504 & 505 & 506 & 507 & 508 & 509 & 510 & 511 & 512 & 513 & 514 & 515 & 516 & 517 & 518 & 519 & 520 & 521 & 522 & 523 & 524 & 525 & 526 & 527 & 528 & 529 & 530 & 531 & 532 & 533 & 534 & 535 & 536 & 537 & 538 & 539 & 540 & 541 & 542 & 543 & 544 & 545 & 546 & 547 & 548 & 549 & 550 & 551 & 552 & 553 & 554 & 555 & 556 & 557 & 558 & 559 & 560 & 561 & 562 & 563 & 564 & 565 & 566 & 567 & 568 & 569 & 570 & 571 & 572 & 573 & 574 & 575 & 576 & 577 & 578 & 579 & 580 & 581 & 582 & 583 & 584 & 585 & 586 & 587 & 588 & 589 & 590 & 591 & 592 & 593 & 594 & 595 & 596 & 597 & 598 & 599 & 600 & 601 & 602 & 603 & 604 & 605 & 606 & 607 & 608 & 609 & 610 & 611 & 612 & 613 & 614 & 615 & 616 & 617 & 618 & 619 & 620 & 621 & 622 & 623 & 624 & 625 & 626 & 627 & 628 & 629 & 630 & 631 & 632 & 633 & 634 & 635 & 636 & 637 & 638 & 639 & 640 & 641 & 642 & 643 & 644 & 645 & 646 & 647 & 648 & 649 & 650 & 651 & 652 & 653 & 654 & 655 & 656 & 657 & 658 & 659 & 660 & 661 & 662 & 663 & 664 & 665 & 666 & 667 & 668 & 669 & 670 & 671 & 672 & 673 & 674 & 675 & 676 & 677 & 678 & 679 & 680 & 681 & 682 & 683 & 684 & 685 & 686 & 687 & 688 & 689 & 690 & 691 & 692 & 693 & 694 & 695 & 696 & 697 & 698 & 699 & 700 & 701 & 702 & 703 & 704 & 705 & 706 & 707 & 708 & 709 & 710 & 711 & 712 & 713 & 714 & 715 & 716 & 717 & 718 & 719 & 720 & 721 & 722 & 723 & 724 & 725 & 726 & 727 & 728 & 729 & 730 & 731 & 732 & 733 & 734 & 735 & 736 & 737 & 738 & 739 & 740 & 741 & 742 & 743 & 744 & 745 & 746 & 747 & 748 & 749 & 750 & 751 & 752 & 753 & 754 & 755 & 756 & 757 & 758 & 759 & 760 & 761 & 762 & 763 & 764 & 765 & 766 & 767 & 768 & 769 & 770 & 771 &
IdRWFieldValue IdValue
Enabled1
RRWREGION113
Disabled0
Enabled1
SRWREGION114
Disabled0
Enabled1
TRWREGION115
Disabled0
Enabled1Protection enabled
URWREGION116
Disabled0Protection disabled
Enabled1Protection enabled
VRWREGION117Enable protection for region 117. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
WRWREGION118Enable protection for region 118. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
XRWREGION119Enable protection for region 119. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
YRWREGION120Enable protection for region 120. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
ZRWREGION121Enable protection for region 121. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
aRWREGION122Enable protection for region 122. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabledb
bRWREGION123Enable protection for region 123. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
cRWREGION124Enable protection for region 124. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled
dRWREGION125Enable protection for region 125. Write '0' has no effect.
Disabled0Protection disabled
Enabled1Protection enabled

13 FICR — Factory information configuration registers

Factory information configuration registers (FICR) are pre-programmed in factory and cannot be erased by the user. These registers contain chip-specific information and configuration.

13.1 Registers

Table 17: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x10000000FICRFICRFactory Information Configuration

Table 18: Register Overview

RegisterOffsetDescription
CODEPAGESIZE0x010Code memory page size
CODESIZE0x014Code memory size
DEVICEID[0]0x060Device identifier
DEVICEID[1]0x064Device identifier
ER[0]0x080Encryption Root, word 0
ER[1]0x084Encryption Root, word 1
ER[2]0x088Encryption Root, word 2
ER[3]0x08CEncryption Root, word 3
IR[0]0x090Identity Root, word 0
IR[1]0x094Identity Root, word 1
IR[2]0x098Identity Root, word 2
IR[3]0x09CIdentity Root, word 3
DEVICEADDRTYPE0x0A0Device address type
DEVICEADDR[0]0x0A4Device address 0
DEVICEADDR[1]0x0A8Device address 1
INFO.PART0x100Part code
INFO.VARIANT0x104Part Variant, Hardware version and Production configuration
INFO.PACKAGE0x108Package option
INFO.RAM0x10CRAM variant
INFO.FLASH0x110Flash variant
0x114
0x118
0x11C
TEMP.A00x404Slope definition A0.
TEMP.A10x408Slope definition A1.
TEMP.A20x40CSlope definition A2.
TEMP.A30x410Slope definition A3.
TEMP.A40x414Slope definition A4.
TEMP.A50x418Slope definition A5.
TEMP.B00x41Cy-intercept B0.
TEMP.B10x420y-intercept B1.
TEMP.B20x424y-intercept B2.
TEMP.B30x428y-intercept B3.
TEMP.B40x42Cy-intercept B4.
TEMP.B50x430y-intercept B5.
TEMP.T00x434Segment end T0.
TEMP.T10x438Segment end T1.
TEMP.T20x43CSegment end T2.
TEMP.T30x440Segment end T3.
TEMP.T40x444Segment end T4.
NFC.TAGHEADER00x450Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
NFC.TAGHEADER10x454Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
NFC.TAGHEADER20x458Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
NFC.TAGHEADER30x45CDefault header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.

13.1.1 CODEPAGESIZE

Address offset: 0x010

Code memory page size

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARCODEPAGESIZECode memory page size

13.1.2 CODESIZE

Address offset: 0x014

Code memory size

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARCODESIZECode memory size in number of pages

Total code space is: CODEPAGESIZE * CODESIZE

13.1.3 DEVICEID[0]

Address offset: 0x060

Device identifier

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARDEVICEID64 bit unique device identifier

DEVICEID[0] contains the least significant bits of the device identifier. DEVICEID[1] contains the most significant bits of the device identifier.

13.1.4 DEVICEID[1]

Address offset: 0x064

Device identifier

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARDEVICEID64 bit unique device identifier
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue

13.1.5 ER[0]

Address offset: 0x080

Encryption Root, word 0

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
AREREncryption Root, word n

13.1.6 ER[1]

Address offset: 0x084

Encryption Root, word 1

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
AREREncryption Root, word n

13.1.7 ER[2]

Address offset: 0x088

Encryption Root, word 2

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
AREREncryption Root, word n

13.1.8 ER[3]

Address offset: 0x08C

Encryption Root, word 3

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
AREREncryption Root, word n

13.1.9 IR[0]

Address offset: 0x090

Identity Root, word 0

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARIRIdentity Root, word n

13.1.10 IR[1]

Address offset: 0x094

Identity Root, word 1

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARIRIdentity Root, word n

13.1.11 IR[2]

Address offset: 0x098

Identity Root, word 2

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARIRIdentity Root, word n

13.1.12 IR[3]

Address offset: 0x09C

Identity Root, word 3

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARIRIdentity Root, word n

13.1.13 DEVICEADDRTYPE

Address offset: 0x0A0

Device address type

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValue
ARDEVICEADDRTYPE
Public0
Random1

13.1.14 DEVICEADDR[0]

Address offset: 0x0A4

Device address 0

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARDEVICEADDR

13.1.15 DEVICEADDR[1]

Address offset: 0x0A8

Device address 1

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARDEVICEADDR

13.1.16 INFO.PART

Address offset: 0x100

Part code

Bit number
Id
Reset 0x00052832
IdRWFieldValue IdValueDescription
ARPARTPart code
N528320x52832nRF52832
Unspecified0xFFFFFFFFUnspecified

13.1.17 INFO.VARIANT

Address offset: 0x104

Part Variant, Hardware version and Production configuration

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x4141414201000001010000010100000101000010
IdRWFieldValue IdValueDescription
ARVARIANTPart Variant, Hardware version and Production configuration, encoded as ASCII
AAAAAAAA
AAACAAAC
AABAAABA
AABBAABB
AABOAABO
ABBOABBO
AAEOAAEO
ABEOABEO
AAGBAAGB
ABGBABGB
AAGOAAGO
ABGOABGO
IdRWFieldValue IdValue
Unspecified0xFFFFFFF

13.1.18 INFO.PACKAGE

Address offset: 0x108

Package option

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000200000000000000000000010000000000000
IdRWFieldValue IdValueDescription
ARPACKAGEPackage option
QF0x2000QFxx - 48-pin QFN
CH0x2001CHxx - 7x8 WLCSP 56 balls
CI0x2002CIxx - 7x8 WLCSP 56 balls
CK0x2005CKxx - 7x8 WLCSP 56 balls with backside coating for light protection
Unspecified0xFFFFFFFFUnspecified

13.1.19 INFO.RAM

Address offset: 0x10C

RAM variant

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000004000000000000000000000000000100000
IdRWFieldValue IdValueDescription
ARRAMRAM variant
K160x1016 kByte RAM
K320x2032 kByte RAM
K640x4064 kByte RAM
Unspecified0xFFFFFFFUnspecified

13.1.20 INFO.FLASH

Address offset: 0x110

Flash variant

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000020000000000000000000000001000000000
IdRWFieldValue IdValueDescription
ARFLASHFlash variant
K1280x80128 kByte FLASH
K2560x100256 kByte FLASH
K5120x200512 kByte FLASH
Unspecified0xFFFFFFFFUnspecified

13.1.21 TEMP.A0

Address offset: 0x404

Slope definition A0.

Bit number
Id
Reset 0x00000320
IdRWFieldValue IdValueDescription
ARAA (slope definition) register.

13.1.22 TEMP.A1

Address offset: 0x408

Slope definition A1.

Bit number
Id
Reset 0x00000343
IdRWFieldValue IdValueDescription
ARAA (slope definition) register.

13.1.23 TEMP.A2

Address offset: 0x40C

Slope definition A2.

Bit number
Id
Reset 0x0000035D
IdRWFieldValue IdValueDescription
ABAA (slope definition) register

13.1.24 TEMP.A3

Address offset: 0x410

Slope definition A3.

Bit number
Id
Reset 0x00000400
IdRWFieldValue IdValueDescription
ABAA (clone definition) register

13.1.25 TEMP.A4

Address offset: 0x414

Slope definition A4.

Bit number
Id
Reset 0x00000452
IdRWFieldValue IdValueDescription
ARAA (slope definition) register.

13.1.26 TEMP.A5

Address offset: 0x418

Slope definition A5.

Bit number
Id
Reset 0x0000037B
IdRWFieldValue IdValueDescription
ARAA (slope definition) register.

13.1.27 TEMP.B0

Address offset: 0x41C

y-intercept B0.

Bit number
Id
Reset 0x00003FCC
IdRWFieldValue IdValue
ARB

13.1.28 TEMP.B1

Address offset: 0x420

y-intercept B1.

Bit number
Id
Reset 0x00003F98
IdRWFieldValue IdValueDescription
ARBB (y-intercept)

13.1.29 TEMP.B2

Address offset: 0x424

y-intercept B2.

Bit number
Id
Reset 0x00003F98
IdRWFieldValue IdValueDescription
ARBB (y-intercept)

13.1.30 TEMP.B3

Address offset: 0x428

y-intercept B3.

Bit number
Id
Reset 0x00000012
IdRWFieldValue IdValueDescription
ARBB (y-intercept)

13.1.31 TEMP.B4

Address offset: 0x42C

y-intercept B4.

Bit number
Id
Reset 0x0000004D
IdRWFieldValue IdValueDescription
ARBB (y-intercept)

13.1.32 TEMP.B5

Address offset: 0x430

y-intercept B5.

Bit number
Id
Reset 0x00003E10
IdRWFieldValue IdValueDescription
ARBB (y-intercept)

13.1.33 TEMP.T0

Address offset: 0x434

Segment end T0.

Bit number
Id
Reset 0x000000E2
IdRWFieldValue IdValueDescription
ARTT (segment end)register.

13.1.34 TEMP.T1

Address offset: 0x438

Segment end T1.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ABTT /segment end\register

13.1.35 TEMP.T2

Address offset: 0x43C

Segment end T2.

Bit number
Id
Reset 0x00000014
IdRWFieldValue IdValueDescription
ARTT (segment end)register.

13.1.36 TEMP.T3

Address offset: 0x440

Segment end T3.

Bit number
Id
Reset 0x00000019
IdRWFieldValue IdValueDescription
ARTT (segment end)register.

13.1.37 TEMP.T4

Address offset: 0x444

Segment end T4.

Bit number
Id
Reset 0x00000050
IdRWFieldValue IdValueDescription
ARTT (segment end)register.

13.1.38 NFC.TAGHEADER0

Address offset: 0x450

Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0xFFFFF5F11111111111111111111111101011111
IdRWFieldValue IdValue
ARMFGID
BRUD1
CRUD2
DRUD3

13.1.39 NFC.TAGHEADER1

Address offset: 0x454

Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARUD4
BRUD5
CRUD6
DRUD7

13.1.40 NFC.TAGHEADER2

Address offset: 0x458

Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARUD8Unique identifier byte 8
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
BRUD9Unique identifier byte 9
CRUD10Unique identifier byte 10
DRUD11Unique identifier byte 11

13.1.41 NFC.TAGHEADER3

Address offset: 0x45C

Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARUD12
BRUD13
CRUD14
DRUD15

14 UICR — User information configuration registers

The user information configuration registers (UICRs) are non-volatile memory (NVM) registers for configuring user specific settings.

For information on writing UICR registers, see the NVMC — Non-volatile memory controller on page 30 and Memory on page 24 chapters.

14.1 Registers

Table 19: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x10001000UICRUICRUser Information Configuration

Table 20: Register Overview

RegisterOffsetDescription
0x000
0x004
0x008
0x010
NRFFW[0]0x014Reserved for Nordic firmware design
NRFFW[1]0x018Reserved for Nordic firmware design
NRFFW[2]0x01CReserved for Nordic firmware design
NRFFW[3]0x020Reserved for Nordic firmware design
NRFFW[4]0x024Reserved for Nordic firmware design
NRFFW[5]0x028Reserved for Nordic firmware design
NRFFW[6]0x02CReserved for Nordic firmware design
NRFFW[7]0x030Reserved for Nordic firmware design
NRFFW[8]0x034Reserved for Nordic firmware design
NRFFW[9]0x038Reserved for Nordic firmware design
NRFFW[10]0x03CReserved for Nordic firmware design
NRFFW[11]0x040Reserved for Nordic firmware design
NRFFW[12]0x044Reserved for Nordic firmware design
NRFFW[13]0x048Reserved for Nordic firmware design
NRFFW[14]0x04CReserved for Nordic firmware design
NRFHW[0]0x050Reserved for Nordic hardware design
NRFHW[1]0x054Reserved for Nordic hardware design
NRFHW[2]0x058Reserved for Nordic hardware design
NRFHW[3]0x05CReserved for Nordic hardware design
NRFHW[4]0x060Reserved for Nordic hardware design
NRFHW[5]0x064Reserved for Nordic hardware design
NRFHW[6]0x068Reserved for Nordic hardware design
NRFHW[7]0x06CReserved for Nordic hardware design
NRFHW[8]0x070Reserved for Nordic hardware design
NRFHW[9]0x074Reserved for Nordic hardware design
NRFHW[10]0x078Reserved for Nordic hardware design
NRFHW[11]0x07CReserved for Nordic hardware design
CUSTOMER[0]0x080Reserved for customer
CUSTOMER[1]0x084Reserved for customer
CUSTOMER[2]0x088Reserved for customer
CUSTOMER[3]0x08CReserved for customer
CUSTOMER[4]0x090Reserved for customer
CUSTOMER[5]0x094Reserved for customer
CUSTOMER[6]0x098Reserved for customer
CUSTOMER[7]0x09CReserved for customer
CUSTOMER[8]0x0A0Reserved for customer
CUSTOMER[9]0x0A4Reserved for customer
CUSTOMER[10]0x0A8Reserved for customer
CUSTOMER[11]0x0ACReserved for customer
CUSTOMER[12]0x0B0Reserved for customer
CUSTOMER[13]0x0B4Reserved for customer
CUSTOMER[14]0x0B8Reserved for customer
CUSTOMER[15]0x0BCReserved for customer
CUSTOMER[16]0x0C0Reserved for customer
CUSTOMER[17]0x0C4Reserved for customer
CUSTOMER[18]0x0C8Reserved for customer
CUSTOMER[19]0x0CCReserved for customer
CUSTOMER[20]0x0D0Reserved for customer
CUSTOMER[21]0x0D4Reserved for customer
CUSTOMER[22]0x0D8Reserved for customer
CUSTOMER[23]0x0DCReserved for customer
CUSTOMER[24]0x0E0Reserved for customer
CUSTOMER[25]0x0E4Reserved for customer
CUSTOMER[26]0x0E8Reserved for customer
CUSTOMER[27]0x0ECReserved for customer
CUSTOMER[28]0x0F0Reserved for customer
CUSTOMER[29]0x0F4Reserved for customer
CUSTOMER[30]0x0F8Reserved for customer
CUSTOMER[31]0x0FCReserved for customer
PSELRESET[0]0x200Mapping of the nRESET function (see POWER chapter for details)
PSELRESET[1]0x204Mapping of the nRESET function (see POWER chapter for details)
APPROTECT0x208Access port protection
NFCPINS0x20CSetting of pins dedicated to NFC functionality: NFC antenna or GPIO

14.1.1 NRFFW[0]

Address offset: 0x014

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.2 NRFFW[1]

Address offset: 0x018

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.3 NRFFW[2]

Address offset: 0x01C

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue Id
ARWNRFFW

14.1.4 NRFFW[3]

Address offset: 0x020

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.5 NRFFW[4]

Address offset: 0x024

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.6 NRFFW[5]

Address offset: 0x028

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.7 NRFFW[6]

Address offset: 0x02C

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.8 NRFFW[7]

Address offset: 0x030

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.9 NRFFW[8]

Address offset: 0x034

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.10 NRFFW[9]

Address offset: 0x038

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.11 NRFFW[10]

Address offset: 0x03C

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.12 NRFFW[11]

Address offset: 0x040

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.13 NRFFW[12]

Address offset: 0x044

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNREEWReserved for Nordic firmware design

14.1.14 NRFFW[13]

Address offset: 0x048

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue Id
ARWNRFFW

14.1.15 NRFFW[14]

Address offset: 0x04C

Reserved for Nordic firmware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFFWReserved for Nordic firmware design

14.1.16 NRFHW[0]

Address offset: 0x050

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.17 NRFHW[1]

Address offset: 0x054

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.18 NRFHW[2]

Address offset: 0x058

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.19 NRFHW[3]

Address offset: 0x05C

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.20 NRFHW[4]

Address offset: 0x060

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.21 NRFHW[5]

Address offset: 0x064

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.22 NRFHW[6]

Address offset: 0x068

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.23 NRFHW[7]

Address offset: 0x06C

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.24 NRFHW[8]

Address offset: 0x070

Reserved for Nordic hardware design

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARWNREFHW

Reserved for Nordic hardware design

14.1.25 NRFHW[9]

Address offset: 0x074

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.26 NRFHW[10]

Address offset: 0x078

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.27 NRFHW[11]

Address offset: 0x07C

Reserved for Nordic hardware design

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWNRFHWReserved for Nordic hardware design

14.1.28 CUSTOMER[0]

Address offset: 0x080

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.29 CUSTOMER[1]

Address offset: 0x084

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.30 CUSTOMER[2]

Address offset: 0x088

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.31 CUSTOMER[3]

Address offset: 0x08C

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.32 CUSTOMER[4]

Address offset: 0x090

Reserved for customer

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARWCUSTOMER
Reserved for customer

14.1.33 CUSTOMER[5]

Address offset: 0x094

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.34 CUSTOMER[6]

Address offset: 0x098

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.35 CUSTOMER[7]

Address offset: 0x09C

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.36 CUSTOMER[8]

Address offset: 0x0A0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.37 CUSTOMER[9]

Address offset: 0x0A4

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.38 CUSTOMER[10]

Address offset: 0x0A8

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.39 CUSTOMER[11]

Address offset: 0x0AC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.40 CUSTOMER[12]

Address offset: 0x0B0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.41 CUSTOMER[13]

Address offset: 0x0B4

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.42 CUSTOMER[14]

Address offset: 0x0B8

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.43 CUSTOMER[15]

Address offset: 0x0BC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.44 CUSTOMER[16]

Address offset: 0x0C0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.45 CUSTOMER[17]

Address offset: 0x0C4

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.46 CUSTOMER[18]

Address offset: 0x0C8

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValue
ARWCUSTOMER

14.1.47 CUSTOMER[19]

Address offset: 0x0CC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.48 CUSTOMER[20]

Address offset: 0x0D0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.49 CUSTOMER[21]

Address offset: 0x0D4

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.50 CUSTOMER[22]

Address offset: 0x0D8

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.51 CUSTOMER[23]

Address offset: 0x0DC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.52 CUSTOMER[24]

Address offset: 0x0E0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.53 CUSTOMER[25]

Address offset: 0x0E4

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.54 CUSTOMER[26]

Address offset: 0x0E8

Reserved for customer

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARWCUSTOMER

14.1.55 CUSTOMER[27]

Address offset: 0x0EC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.56 CUSTOMER[28]

Address offset: 0x0F0

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.57 CUSTOMER[29]

Address offset: 0x0F4

Reserved for customer

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARWCUSTOMER

14.1.58 CUSTOMER[30]

Address offset: 0x0F8

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.59 CUSTOMER[31]

Address offset: 0x0FC

Reserved for customer

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCUSTOMERReserved for customer

14.1.60 PSELRESET[0]

Address offset: 0x200

Mapping of the nRESET function (see POWER chapter for details)

All PSELRESET registers have to contain the same value for a pin mapping to be valid. If values are not the same, there will be no nRESET function exposed on a GPIO. As a result, the device will always start independently of the levels present on any of the GPIOs.

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN21GPIO number P0.n onto which Reset is exposed
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

14.1.61 PSELRESET[1]

Address offset: 0x204

Mapping of the nRESET function (see POWER chapter for details)

All PSELRESET registers have to contain the same value for a pin mapping to be valid. If values are not the same, there will be no nRESET function exposed on a GPIO. As a result, the device will always start independently of the levels present on any of the GPIOs.

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN21GPIO number P0.n onto which Reset is exposed
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

14.1.62 APPROTECT

Address offset: 0x208

Access port protection

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValue
ARWPALL
Disabled0xFF
HwDisabled0x5A
Enabled0x00

14.1.63 NFCPINS

Address offset: 0x20C

Setting of pins dedicated to NFC functionality: NFC antenna or GPIO

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPROTECT
Disabled0
NFC1

15 Peripheral interface

Peripherals are controlled by the CPU by writing to configuration registers and task registers. Peripheral events are indicated to the CPU by event registers and interrupts if they are configured for a given event.


Figure 10: Tasks, events, shortcuts, and interrupts

15.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 25 for more information about which peripherals are available and where they are located in the address map.

There is a direct relationship between the 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:

• Some peripherals share some registers or other common resources.

• Operation is mutually exclusive. Only one of the peripherals can be used at a time.

• Switching from one peripheral to another must follow a specific pattern (disable the first, then enable the second peripheral).

15.2 Peripherals with shared ID

In general, and with the exception of ID 0, peripherals sharing an ID and base address may not be used simultaneously. The user can only enable one at the time on this specific ID.

When switching between two peripherals that share an ID, the user should do the following to prevent unwanted behavior:

• Disable the previously used peripheral

• Remove any PPI connections set up for the peripheral that is being disabled

• Clear all bits in the INTEN register, i.e. INTENCLR = 0xFFFFFFFF.

• Explicitly configure the peripheral that you enable and do not rely on configuration values that may be inherited from the peripheral that was disabled.

• Enable the now configured peripheral.

For each of the rows in the following table, the instance ID listed is shared by the peripherals in the same row.

Table 21: Peripherals sharing an ID

Instance
ID 2 (0x40002000)UARTEUART
-
ID 3 (0x40003000)SPIMSPISSPITWIMTWISTWI
ID 4 (0x40004000)SPIMSPISSPITWIMTWISTWI
ID 35 (0x40023000)SPIMSPISSPI
-
ID 15 (0x4000F000)AARCCM
-
ID 19 (0x40013000)COMPLPCOMP
-
ID 20 (0x40014000)SWIEGU
ID 21 (0x40015000)SWIEGU
ID 22 (0x40016000)SWIEGU
ID 23 (0x40017000)SWIEGU
ID 24 (0x40018000)SWIEGU
ID 25 (0x40019000)SWIEGU

15.3 Peripheral registers

Most peripherals feature an ENABLE register. Unless otherwise specified in the relevant chapter, the peripheral registers (in particular the PSEL registers) must be configured before enabling the peripheral.

Note that the peripheral must be enabled before tasks and events can be used.

15.4 Bit set and clear

Registers with multiple single-bit bit fields may implement the "set-and-clear" pattern. This pattern enables firmware to set and clear individual bits in a register without having to perform a read-modify-write operation on the main register.

This pattern is implemented using three consecutive addresses in the register map where the main register is followed by a dedicated SET and CLR register in that order.

The SET register is used to set individual bits in the main register while the CLR register is used to clear individual bits in the main register. Writing a '1' to a bit in the SET or CLR register will set or clear the same bit in the main register respectively. Writing a '0' to a bit in the SET or CLR register has no effect. Reading the SET or CLR registers returns the value of the main register.

Restriction: The main register may not be visible and hence not directly accessible in all cases.

15.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 a '1' to the task register or when the peripheral itself or another peripheral toggles the corresponding task signal. See Figure 10: Tasks, events, shortcuts, and interrupts on page 69.

15.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 with each event having 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 10: Tasks, events, shortcuts, and interrupts on page 69. An event register is only cleared when firmware writes a '0' to it.

Events can be generated by the peripheral even when the event register is set to '1'.

15.7 Shortcuts

A shortcut is a direct connection between an event and a task within the same peripheral. If a shortcut is enabled, its associated task is automatically triggered when its associated event is generated.

Using a shortcut is the equivalent to making the same connection outside the peripheral and through the PPI. However, the propagation delay through the shortcut is usually shorter than the propagation delay through the PPI.

Shortcuts are predefined, which means 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.

15.8 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 the INTEN, INTENSET and INTENCLR registers, 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 periphera registers will indicate the source.

Some peripherals implement only INTENSET and INTENCLR, and the INTEN register is not available on those peripherals. Refer to the individual chapters for details. In all cases, however, reading back the INTENSET or INTENCLR register returns the same information as in INTEN.

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 shown in Figure 10: Tasks, events, shortcuts, and interrupts on page 69.

15.8.1 Interrupt clearing

When clearing an interrupt by writing "0" to an event register, or disabling an interrupt using the INTENCLR register, it can take up to four CPU clock cycles to take effect. This means that an interrupt may reoccur immediatelly even if a new event has not come, if the program exits an interrupt handler after the interrupt is cleared or disabled, but before four clock cycles have passed.

Important: 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.

This will cause a one to three-cycle delay and ensure the interrupt is cleared before exiting the interrupt handler. Care should be taken to ensure the compiler does not remove the read operation as an optimization. If the program can guarantee a four-cycle delay after event clear or interrupt disable another way, then a read of a register is not required.

16 Debug and trace

The debug and trace system offers a flexible and powerful mechanism for non-intrusive debugging.

Figure 11: Debug and trace overview

The main features of the debug and trace system are the following:

• Two-pin serial wire debug (SWD) interface

• Flash patch and breakpoint (FPB) unit that supports the following comparators:

• Two literal comparators

• Six instruction comparators

• Data watchpoint and trace (DWT) unit with four comparators

• Instrumentation trace macrocell (ITM)

• Embedded trace macrocell (ETM)

• Trace port interface unit (TPIU)

• 4-bit parallel trace of ITM and ETM trace data

• Serial wire output (SWO) trace of ITM data

16.1 DAP - Debug access port

An external debugger can access the device via the DAP.

The debug access port (DAP) implements a standard ARM® CoreSight™ serial wire debug port (SW-DP), which implements the serial wire debug protocol (SWD). SWD is a two-pin serial interface, see SWDCLK and SWDIO in Figure 11: Debug and trace overview on page 73.

In addition to the default access port in CPU (AHB-AP), the DAP includes a custom control access port (CTRL-AP). The CTRL-AP is described in more detail in CTRL-AP - Control access port on page 76.

Note:

• The SWDIO line has an internal pull-up resistor.

• The SWDCLK line has an internal pull-down resistor.

16.2 Access port protection

Access port protection blocks the debugger from read and write access to all CPU registers and memorymapped addresses when enabled.

Access port protection is enabled and disabled differently depending on the build code of the device.

16.2 Access port protection controlled by hardware

This information refers to build codes Fxx and earlier.

By default, access port protection is disabled.

Access port protection is enabled by writing UICR.APPROTECT to Enabled and performing any reset. See Reset on page 85 for more information.

Access port protection is disabled by issuing an ERASEALL command via CTRL-AP. This command will erase the flash, UICR, and RAM, including UICR.APPROTECT. Erasing UICR will set UICR.APPROTECT value to Disabled. CTRL-AP is described in more detail in CTRL-AP - Control access port on page 76.

16.2 Access port protection controlled by hardware and software

This information refers to build codes Gxx and later.

By default, access port protection is enabled.

Access port protection is disabled by issuing an ERASEALL command via CTRL-AP. Read CTRL-AP.APPROTECTSTATUS to ensure that access port protection is disabled, and repeat the ERASEALL command if needed. This command will erase the flash, UICR, and RAM. CTRL-AP is described in more detail in CTRL-AP - Control access port on page 76. Access port protection will remain disabled until one of the following occurs:

• Pin reset

• Power or brownout reset

• Watchdog reset if not in Debug Interface Mode, see Debug Interface mode on page 77

• Wake from System OFF if not in Emulated System OFF

To keep access port protection disabled, the following actions must be performed:

• Program UICR.APPROTECT to HwDisabled. This disables the hardware part of the access port protection scheme after the first reset of any type. The hardware part of the access port protection wil stay disabled as long as UICR.APPROTECT is not overwritten.

• Firmware must write APPROTECT.DISABLE to SwDisable. This disables the software part of the access port protection scheme.

Note: Register APPROTECT.DISABLE is reset after pin reset, power or brownout reset, watchdog reset, or wake from System OFF as mentioned above.

The following figure is an example on how a device with access port protection enabled can be erased, programmed, and configured to allow debugging. Operations sent from debugger as well as registers written by firmware will affect the access port state.


Figure 12: Access port unlocking

Access port protection is enabled when the disabling conditions are not present. For additional security, it is recommended to write Enabled to UICR.APPROTECT, and have firmware write Force to APPROTECT.FORCEPROTECT. This is illustrated in the following figure.

Note: Register APPROTECT.FORCEPROTECT is reset after any reset.


Figure 13: Force access port protection

16.2.1 Registers

Table 22: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40000000APPROTECTAPPROTECTAPPROTECT control

Table 23: Register Overview

RegisterOffsetDescription
FORCEPROTECT0x550Software force enable APPROTECT mechanism until next reset.
This register can only be written once.
DISABLE0x558Software disable APPROTECT mechanism

FORCEPROTECT

Address offset: 0x550

Software force enable APPROTECT mechanism until next reset.

This register can only be written once.

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWFORCEPROTECTWrite 0x0 to force enable APPROTECT mechanism
Force0x0Software force enable APPROTECT mechanism

DISABLE

Address offset: 0x558

Software disable APPROTECT mechanism

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDISABLESoftware disable APPROTECT mechanism
SwDisable0x5ASoftware disable APPROTECT mechanism

16.3 CTRL-AP - Control access port

The control access port (CTRL-AP) is a custom access port that enables control of the device when other access ports in the DAP are disabled by the access port protection.

Access port protection is described in more detail in Access port protection on page 73.

Control access port has the following features:

• Soft reset - see Reset on page 85 for more information

• Disabling of access port protection - device control is allowed through CTRL-AP even when all other access ports in DAP are disabled by access port protection

16.3.1 Registers

Table 24: Register Overview

RegisterOffsetDescription
RESET0x000Soft reset triggered through CTRL-AP
ERASEALL0x004Erase all
ERASEALLSTATUS0x008Status register for the ERASEALL operation
APPROTECTSTATUS0x00CStatus register for access port protection
IDR0x0FCCTRL-AP identification register, IDR

RESET

Address offset: 0x000

Soft reset triggered through CTRL-AP

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWRESET
NoReset0
Reset1

ERASEALL

Address offset: 0x004

Erase all

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
AWERASEALL
NoOperation0
Erase1

ERASEALLSTATUS

Address offset: 0x008

Status register for the ERASEALL operation

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARERASEALLSTATUS
Ready0
Busy1

APPROTECTSTATUS

Address offset: 0x00C

Status register for access port protection

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAPPROTECTSTATUS
Enabled0
Disabled1

IDR

Address offset: 0x0FC

CTRL-AP identification register, IDR

Bit number313029282726252423222120191817161514131211109876543210
IdEEEEDDDDCCCCCCCBBBBAAAAAAAA
Reset 0x0288000000000010100010000000000000000000
IdRWFieldValue IdValueDescription
ARAPIDAP identification
BRCLASSAccess port (AP) class
NotDefined0x0No defined class
MEMAP0x8Memory access port
CRJEP106IDJEDEC JEP106 identity code
DRJEP106CONTJEDEC JEP106 continuation code
ERREVISIONRevision

16.3.2 Electrical specification

Control access port

SymbolDescriptionMin.Typ.Max.Units
$R_{pull}$ Internal SWDIO and SWDCLK pull up/down resistance......kΩ
$f_{SWDCLK}$ SWDCLK frequency......MHz

16.4 Debug Interface mode

Before an external debugger can access either CPU's access port (AHB-AP) or the control access port (CTRL-AP), the debugger must first request the device to power up via CxxxPWRUPREQ in the SWJ-DP.

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 88 will be set. The device is in the Debug Interface mode as long as the debugger is requesting power via CxxxPWRUPREQ. Once the debugger stops requesting power via CxxxPWRUPREQ, the device is back in normal mode. Some peripherals behave differently in Debug Interface mode compared to normal mode. These differences are described in more detail in the chapters of the peripherals that are affected.

When a debug session is over, the external debugger must make sure to put the device back into normal mode since the overall power consumption is higher in Debug Interface mode than in normal mode.

For details on how to use the debug capabilities, read the debug documentation of your IDE.

16.5 Real-time debug

The nRF52832 supports real-time debugging.

Real-time debugging allows interrupts to execute to completion in real time when breakpoints are set in Thread mode or lower priority interrupts. This enables developers to set breakpoints and single-step through the code without the risk of real-time event-driven threads running at higher priority failing. For example, this enables the device to continue to service the high-priority interrupts of an external controller or sensor without failure or loss of state synchronization while the developer steps through code in a low-priority thread.

16.6 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 interface unit (TPIU), see TRACEDATA[0] through TRACEDATA[3] and TRACECLK in Figure 11: Debug and trace overview on page 73.

In addition to parallel trace, the TPIU supports serial trace via the serial wire output (SWO) trace protocol. Parallel and serial trace cannot be used at the same time. ETM trace is only supported in Parallel Trace mode, while ITM trace is supported in both Parallel and Serial Trace modes.

For details on how to use the trace capabilities, read the debug documentation of your IDE.

TPIU's trace pins are multiplexed with GPIOs. SWO and TRACEDATA[0] use the same GPIO. See Pin assignments on page 14 for more information.

Trace speed is configured in register TRACECONFIG on page 111. 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 setting at reset. If parallel or serial trace port signals are not fast enough with the default settings, all GPIOs in use for tracing should be set to high drive (H0H1). The DRIVE setting for these GPIOs should not be overwritten by firmware during the debugging session.

16.6.1 Electrical specification

Trace port

SymbolDescriptionMin.Typ.Max.Units
$T_{cyc}$ Clock period as defined by Arm in the Timing specifications for Trace Port Physical Interface of the Embedded Trace Macrocell Architecture Specification62.5500ns

17 Power and clock management

Power and clock management in nRF52832 is optimized for ultra-low power applications.

The core of the power and clock management system is the Power Management Unit (PMU) illustrated in Figure 14: Power Management Unit on page 79.


Figure 14: Power Management Unit

The user application is not required to actively control power and clock, since the PMU is able to automatically detect which resources are required by the different components in the system at any given time. The PMU will continuously optimize the system based on this information to achieve the lowest power consumption possible without user interaction.

17.1 Current consumption scenarios

As the system is being constantly tuned by the PMU, estimating the energy consumption of an application can be challenging if the designer is not able to do measurements on the hardware directly. See Electrica specification on page 79 for application scenarios showing average current drawn from the VDD supply.

Each scenario specifies a set of active operations and conditions applying to the given scenario. Table 25: Current consumption scenarios, common conditions on page 79 shows the conditions used for a scenario unless otherwise is stated in the scenario description.

Table 25: Current consumption scenarios, common conditions

ConditionValue
VDD3 V
Temperature25°C
CPUWFI/WFE sleep
PeripheralsAll idle
ClockNot running
RegulatorDCDC

17.1.1 Electrical specification

Current consumption: Radio

SymbolDescriptionMin.Typ.Max.Units
$I_{\text{RADIO\_TX0}}$ 0 dBm TX @ 1 Mb/s Bluetooth Low Energy mode, Clock = HFXO7.1mA
$I_{\text{RADIO\_TX1}}$ -40 dBm TX @ 1 Mb/s Bluetooth Low Energy mode, Clock = HFXO4.1mA
$I_{\text{RADIO\_RX0}}$ Radio RX @ 1 Mb/s Bluetooth Low Energy mode, Clock = HFXO6.5mA

Current consumption: Radio protocol configurations

SymbolDescriptionMin.Typ.Max.Units
$I_{S0}$ CPU running CoreMark from Flash, Radio 0 dBm TX @ 1 Mb/sBluetooth Low Energy mode, Clock = HFXO, Cache enabled9.2mA
$I_{S1}$ CPU running CoreMark from Flash, Radio RX @ 1 Mb/sBluetooth Low Energy mode, Clock = HFXO, Cache enabled9.2mA

Current consumption: Ultra-low power

SymbolDescriptionMin.Typ.Max.Units
$I_{ON\_RAMOFF\_EVENT}$ System ON, No RAM retention, Wake on any event1.2μA
$I_{ON\_RAMON\_EVENT}$ System ON, Full RAM retention, Wake on any event1.5μA
$I_{ON\_RAMOFF\_RTC}$ System ON, No RAM retention, Wake on RTC1.9μA
$I_{OFF\_RAMOFF\_RESET}$ System OFF, No RAM retention, Wake on reset0.3μA
$I_{OFF\_RAMOFF\_GPIO}$ System OFF, No RAM retention, Wake on GPIO0.3μA
$I_{OFF\_RAMOFF\_LPCOMP}$ System OFF, No RAM retention, Wake on LPCOMP1.9μA
$I_{OFF\_RAMOFF\_NFC}$ System OFF, No RAM retention, Wake on NFC field0.7μA
$I_{OFF\_RAMON\_RESET}$ System OFF, Full 64 kB RAM retention, Wake on reset0.7μA

18 POWER — Power supply

This device has the following power supply features:

• On-chip LDO and DC/DC regulators

• Global System ON/OFF modes

• Individual RAM section power control for all system modes

• Analog or digital pin wakeup from System OFF

• Supervisor HW to manage power on reset, brownout, and power fail

• Auto-controlled refresh modes for LDO and DC/DC regulators to maximize efficiency

• Automatic switching between LDO and DC/DC regulator based on load to maximize efficiency

Note: Two additional external passive components are required to use the DC/DC regulator.

18.1 Regulators

The following internal power regulator alternatives are supported:

• Internal LDO regulator

• Internal DC/DC regulator

The LDO is the default regulator.

The DC/DC regulator can be used as an alternative to the LDO regulator and is enabled through the DCDCEN on page 91 register. Using the DC/DC regulator will reduce current consumption compared to when using the LDO regulator, but the DC/DC regulator requires an external LC filter to be connected, as shown in Figure 16: DC/DC regulator setup on page 82.


Figure 15: LDO regulator setup


Figure 16: DC/DC regulator setup

18.2 System OFF mode

System OFF is the deepest power saving mode the system can enter. In this mode, the system’s core functionality is powered down and all ongoing tasks are terminated.

The device can be put into System OFF mode using the POWER register interface. When in System OFF mode, the device can be woken up through one of the following signals:

  1. The DETECT signal, optionally generated by the GPIO periphera

  2. The ANADETECT signal, optionally generated by the LPCOMP module

  3. The SENSE signal, optionally generated by the NFC module to “wake-on-field”

4. A reset

When the system wakes up from System OFF mode, it gets reset. For more details, see Reset behavior on page 86.

One or more RAM sections can be retained in System OFF mode depending on the settings in the RAM[n].POWER registers.

RAM[n].POWER are retained registers, see Reset behavior. Note that these registers are usually overwritten by the startup code provided with the nRF application examples.

Before entering System OFF mode, the user must make sure that all on-going EasyDMA transactions have been completed. This is usually accomplished by making sure that the EasyDMA enabled peripheral is not active when entering System OFF.

18.2.1 Emulated System OFF mode

If the device is in debug interface mode, System OFF will be emulated to secure that all required resources needed for debugging are available during System OFF.

See Debug and trace on page 73 for more information. Required resources needed for debugging include the following key components: Debug and trace on page 73, CLOCK — Clock control on page 104, POWER — Power supply on page 81, NVMC — Non-volatile memory controller on page 30, CPU, Flash, and RAM. Since the CPU is kept on in an emulated System OFF mode, it is recommended to add an infinite loop directly after entering System OFF, to prevent the CPU from executing code that normally should not be executed.

18.3 System ON mode

System ON is the default state after power-on reset. In System ON, all functional blocks such as the CPU or peripherals, can be in IDLE or RUN mode, depending on the configuration set by the software and the state of the application executing.

Register RESETREAS on page 88 provides information about the source that caused the wakeup or reset.

The system can switch on and off the appropriate internal power sources, depending on how much power is needed at any given time. The power requirement of a peripheral is directly related to its activity level, and the activity level of a peripheral is usually raised and lowered when specific tasks are triggered or events are generated.

18.3.1 Sub power modes

In System ON mode, when both the CPU and all the peripherals are in IDLE mode, the system can reside in one of the two sub power modes.

The sub power modes are:

• Constant latency

• Low power

In constant latency mode the CPU wakeup latency and the PPI task response will be constant and kept at a minimum. This is secured by forcing a set of base resources on while in sleep. The advantage of having a constant and predictable latency will be at the cost of having increased power consumption. The constant latency mode is selected by triggering the CONSTLAT task.

In low power mode the automatic power management system, described in System ON mode on page 83, ensures the most efficient supply option is chosen to save the most power. The advantage of having the lowest power possible will be at the cost of having varying CPU wakeup latency and PPI task response. The low power mode is selected by triggering the LOWPWR task.

When the system enters System ON mode, it will, by default, reside in the low power sub-power mode.

18.4 Power supply supervisor

The power supply supervisor initializes the system at power-on and provides an early warning of impending power failure.

In addition, the power supply supervisor puts the system in a reset state if the supply voltage is too low for safe operation (brownout). The power supply supervisor is illustrated in Figure 17: Power supply supervisor on page 84.


Figure 17: Power supply supervisor

18.4.1 Power-fail comparator

The power-fail comparator (POF) can provide the CPU with an early warning of impending power failure. It will not reset the system, but give the CPU time to prepare for an orderly power-down.

The comparator features a hysteresis of $\mathsf { V } _ { \mathsf { H Y S T } }$ , as illustrated in Figure 18: Power-fail comparator (BOR = Brownout reset) on page 84. The threshold $\mathsf { V } _ { \mathsf { P O F } }$ is set in register POFCON on page 89. If the POF is enabled and the supply voltage falls below V , the POFWARN event will be generated. This event will also be generated if the supply voltage is already below $\mathsf { V } _ { \mathsf { P O F } }$ at the time the POF is enabled, or if $\mathsf { V } _ { \mathsf { P O F } }$ is reconfigured to a level above the supply voltage.

If power-fail warning is enabled and the supply voltage is below V the power-fail comparator will prevent the NVMC from performing write operations to the NVM. See NVMC — Non-volatile memory controller on page 30 for more information about the NVMC.


Figure 18: Power-fail comparator (BOR = Brownout reset)
To save power, the power-fail comparator is not active in System OFF or in System ON when HFCLK is not running.

18.5 RAM sections

RAM section power control is used for retention in System OFF mode and for powering down unused sections in System ON mode.

Each RAM section can power up and down independently in both System ON and System OFF mode. See chapter Memory on page 24 for more information on RAM sections.

18.6 Reset

There are multiple sources that may trigger a reset.

After a reset has occurred, register RESETREAS can be read to determine which source generated the reset.

18.6.1 Power-on reset

The power-on reset generator initializes the system at power-on.

The system is held in reset state until the supply has reached the minimum operating voltage and the interna voltage regulators have started.

A step increase in supply voltage of 300 mV or more, with rise time of 300 ms or less, within the valid supply range, may result in a system reset.

18.6.2 Pin reset

A pin reset is generated when the physical reset pin on the device is asserted.

Pin reset is configured via the PSELRESET[0] and PSELRESET[1] registers.

Note: Pin reset is not available on all pins.

18.6.3 Wakeup from System OFF mode reset

The device is reset when it wakes up from System OFF mode.

The DAP is not reset following a wake up from System OFF mode if the device is in debug interface mode. Refer to chapter Debug and trace on page 73 for more information.

18.6.4 Soft reset

A soft reset is generated when the SYSRESETREQ bit of the Application Interrupt and Reset Control Register (AIRCR register) in the ARM® core is set.

Refer to ARM documentation for more details.

A soft reset can also be generated via the RESET on page 76 register in the CTRL-AP.

18.6.5 Watchdog reset

A Watchdog reset is generated when the watchdog times out.

Refer to chapter WDT — Watchdog timer on page 413 for more information.

18.6.6 Brown-out reset

The brown-out reset generator puts the system in reset state if the supply voltage drops below the brownout reset (BOR) threshold.

Refer to section Power fail comparator on page 102 for more information.

18.7 Retained registers

A retained register is a register that will retain its value in System OFF mode and through a reset, depending on reset source. See individual peripheral chapters for information of which registers are retained for the various peripherals.

18.8 Reset behavior

Reset sourceReset target
CPUPeripheralsGPIODebug $^{a}$ SWJ-DPRAMWDTRetained registersRESETREAS
CPU lockup $^6$ xxx
Soft resetxxx
Wakeup from System OFF mode resetxx $x^7$ $x^8$
Watchdog reset $^9$ xxxxxxx
Pin resetxxxxxxx
Brownout resetxxxxxxxxx
Power on resetxxxxxxxxx

Note: The RAM is never reset, but depending on reset source, RAM content may be corrupted.

18.9 Registers

Table 26: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40000000POWERPOWERPower control

Table 27: Register Overview

RegisterOffsetDescription
TASKS_CONSTLAT0x078Enable constant latency mode
TASKS_LOWPWR0x07CEnable low power mode (variable latency)
EVENTS_POFWARN0x108Power failure warning
EVENTS_SLEEPENTER0x114CPU entered WFI/WFE sleep
EVENTS_SLEEPEXIT0x118CPU exited WFI/WFE sleep
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
RESETREAS0x400Reset reason
RAMSTATUS0x428RAM status registerDeprecated
SYSTEMOFF0x500System OFF register
POFCON0x510Power failure comparator configuration
GPREGRET0x51CGeneral purpose retention register
GPREGRET20x520General purpose retention register
RAMON0x524RAM on/off register (this register is retained)Deprecated
RAMONB0x554RAM on/off register (this register is retained)Deprecated
DCDCEN0x578DC/DC enable register
RAM[0].POWER0x900RAM0 power control register
RegisterOffsetDescription
RAM[0].POWERSET0x904RAM0 power control set register
RAM[0].POWERCLR0x908RAM0 power control clear register
RAM[1].POWER0x910RAM1 power control register
RAM[1].POWERSET0x914RAM1 power control set register
RAM[1].POWERCLR0x918RAM1 power control clear register
RAM[2].POWER0x920RAM2 power control register
RAM[2].POWERSET0x924RAM2 power control set register
RAM[2].POWERCLR0x928RAM2 power control clear register
RAM[3].POWER0x930RAM3 power control register
RAM[3].POWERSET0x934RAM3 power control set register
RAM[3].POWERCLR0x938RAM3 power control clear register
RAM[4].POWER0x940RAM4 power control register
RAM[4].POWERSET0x944RAM4 power control set register
RAM[4].POWERCLR0x948RAM4 power control clear register
RAM[5].POWER0x950RAM5 power control register
RAM[5].POWERSET0x954RAM5 power control set register
RAM[5].POWERCLR0x958RAM5 power control clear register
RAM[6].POWER0x960RAM6 power control register
RAM[6].POWERSET0x964RAM6 power control set register
RAM[6].POWERCLR0x968RAM6 power control clear register
RAM[7].POWER0x970RAM7 power control register
RAM[7].POWERSET0x974RAM7 power control set register
RAM[7].POWERCLR0x978RAM7 power control clear register

18.9.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPOFWARN
Set1
Disabled0
Enabled1
BRWSLEEPENTER
Set1
Disabled0
Enabled1
CRWSLEEPEXITWrite '1' to Enable interrupt for SLEEPENTER event
See EVENTS_SLEEPEXIT
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

18.9.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPOFWARN
Clear1
Disabled0
Enabled1
BRWSLEEPENTER
Clear1
Disabled0
Enabled1
CRWSLEEPEXITWrite '1' to Disable interrupt for SLEEPENTER event
See EVENTS_SLEEPENTER
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

18.9.3 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 number313029282726252423222120191817161514131211109876543210
IdH G F EDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWRESETPINReset from pin-reset detected
NotDetected0Not detected
Detected1Detected
BRWDOGReset from watchdog detected
NotDetected0Not detected
Detected1Detected
CRWSREQReset from soft reset detected
NotDetected0Not detected
Detected1Detected
DRWLOCKUPReset from CPU lock-up detected
NotDetected0Not detected
Detected1Detected
ERWOFFReset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO
NotDetected0Not detected
Detected1Detected
FRWLPCOMPReset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP
NotDetected0Not detected
Detected1Detected
GRWDIFReset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode
NotDetected0Not detected
Detected1Detected
Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
HRWNFC
NotDetected
Detected

18.9.4 RAMSTATUS ( Deprecated )

Address offset: 0x428

RAM status register

Since this register is deprecated the following substitutions have been made: RAM block 0 is equivalent to a block comprising RAM0.S0 and RAM1.S0, RAM block 1 is equivalent to a block comprising RAM2.S0 and RAM3.S0, RAM block 2 is equivalent to a block comprising RAM4.S0 and RAM5.S0 and RAM block 3 is equivalent to a block comprising RAM6.S0 and RAM7.S0. A RAM block field will indicate ON as long as any of the RAM sections associated with a block are on.

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARRAMBLOCK0
Off0
On1
BRRAMBLOCK1
Off0
On1
CRRAMBLOCK2
Off0
On1
DRRAMBLOCK3
Off0
On1

18.9.5 SYSTEMOFF

Address offset: 0x500

System OFF register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWSYSTEMOFFEnable System OFF mode
Enter1Enable System OFF mode

18.9.6 POFCON

Address offset: 0x510

Power failure comparator configuration

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWPOF
Disabled
0
Bit number313029282726252423222120191817161514131211109876543210
IdBBBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Enabled1
BRWTHRESHOLD
V174
V185
V196
V207
V218
V229
V2310
V2411
V2512
V2613
V2714
V2815

18.9.7 GPREGRET

Address offset: 0x51C

General purpose retention register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWGPREGRETGeneral purpose retention register

This register is a retained register

18.9.8 GPREGRET2

Address offset: 0x520

General purpose retention register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWGPREGRETGeneral purpose retention register

This register is a retained register

18.9.9 RAMON ( Deprecated )

Address offset: 0x524

RAM on/off register (this register is retained)

Since this register is deprecated the following substitutions have been made: RAM block 0 is equivalent to a block comprising RAM0.S0 and RAM0.S1 and RAM block 1 is equivalent to a block comprising RAM1.S0 and RAM1.S1. For new designs it is recommended to use the POWER.RAM-0.POWER and its sibling registers instead.

Bit number
Id
Reset 0x00000003
IdRWFieldValue IdValueDescription
ARWONRAM0
RAM0Off0
Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x00000003000000000000000000000000000000011
IdRWFieldValue IdValueDescription
RAM0On1On
BRWONRAM1Keep RAM block 1 on or off in system ON Mode
RAM1Off0Off
RAM1On1On
CRWOFFRAM0Keep retention on RAM block 0 when RAM block is switched off
RAM0Off0Off
RAM0On1On
DRWOFFRAM1Keep retention on RAM block 1 when RAM block is switched off
RAM1Off0Off
RAM1On1On

18.9.10 RAMONB ( Deprecated )

Address offset: 0x554

RAM on/off register (this register is retained)

Since this register is deprecated the following substitutions have been made: RAM block 2 is equivalent to a block comprising RAM2.S0 and RAM2.S1 and RAM block 3 is equivalent to a block comprising RAM3.S0 and RAM3.S1. For new designs it is recommended to use the POWER.RAM-0.POWER and its sibling registers instead.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000000300000000000000000000000000000011
IdRWFieldValue IdValueDescription
ARWONRAM2Keep RAM block 2 on or off in system ON Mode
RAM2Off0Off
RAM2On1On
BRWONRAM3Keep RAM block 3 on or off in system ON Mode
RAM3Off0Off
RAM3On1On
CRWOFFRAM2Keep retention on RAM block 2 when RAM block is switched off
RAM2Off0Off
RAM2On1On
DRWOFFRAM3Keep retention on RAM block 3 when RAM block is switched off
RAM3Off0Off
RAM3On1On

18.9.11 DCDCEN

Address offset: 0x578

DC/DC enable register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDCDCEN
Disabled0
Enabled1

18.9.12 RAM[0].POWER

Address offset: 0x900

RAM0 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.13 RAM[0].POWERSET

Address offset: 0x904

RAM0 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM0 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM0 on or off in System ON mode
On1On
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.14 RAM[0].POWERCLR

Address offset: 0x908

RAM0 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM0 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM0 on or off in System ON mode
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.15 RAM[1].POWER

Address offset: 0x910

RAM1 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.16 RAM[1].POWERSET

Address offset: 0x914

RAM1 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM1 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM1 on or off in System ON mode
On1On
CWSORETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
Bit number
Id10
Reset 0x0000FFFFBA
IdRWFieldValue IdValueDescription
DWS1RETENTION
1
On1On

18.9.17 RAM[1].POWERCLR

Address offset: 0x918

RAM1 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM1 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM1 on or off in System ON mode
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.18 RAM[2].POWER

Address offset: 0x920

RAM2 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.19 RAM[2].POWERSET

Address offset: 0x924

RAM2 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM2 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM2 on or off in System ON mode
On1On
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.20 RAM[2].POWERCLR

Address offset: 0x928

RAM2 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM2 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM2 on or off in System ON mode
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.21 RAM[3].POWER

Address offset: 0x930

RAM3 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.22 RAM[3].POWERSET

Address offset: 0x934

RAM3 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM3 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM3 on or off in System ON mode
On1On
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.23 RAM[3].POWERCLR

Address offset: 0x938

RAM3 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValue
AWS0POWER
Off1
BWS1POWER
Off1
CWS0RETENTION
Off1
DWS1RETENTION
Off1

18.9.24 RAM[4].POWER

Address offset: 0x940

RAM4 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.25 RAM[4].POWERSET

Address offset: 0x944

RAM4 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM4 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM4 on or off in System ON mode
On1On
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.26 RAM[4].POWERCLR

Address offset: 0x948

RAM4 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM4 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM4 on or off in System ON mode
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.27 RAM[5].POWER

Address offset: 0x950

RAM5 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.28 RAM[5].POWERSET

Address offset: 0x954

RAM5 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWSOPOWERKeep RAM section S0 of RAM5 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM5 on or off in System ON mode
On1On
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.29 RAM[5].POWERCLR

Address offset: 0x958

RAM5 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM5 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM5 on or off in System ON mode
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.30 RAM[6].POWER

Address offset: 0x960

RAM6 power control register

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
ARWS0POWERKeep RAM section S0 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
Bit number
Id
Reset 0x0000FFFF
IdRWFieldValue IdValueDescription
On1On

18.9.31 RAM[6].POWERSET

Address offset: 0x964

RAM6 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValue
AWS0POWER
On1
BWS1POWER
On1
CWS0RETENTION
On1
DWS1RETENTION
On1

18.9.32 RAM[6].POWERCLR

Address offset: 0x968

RAM6 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM6 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM6 on or off in System ON mode
Off1Off
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.9.33 RAM[7].POWER

Address offset: 0x970

RAM7 power control register

Bit number
Id
Reset 0x0000FFFF
IdRWFieldValue IdValueDescription
ARWSOPOWERKeep RAM section S0 ON or OFF in System ON mode.
Bit number313029282726252423222120191817161514131211109876543210
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S0RETENTION.
Off0All RAM sections will be OFF in System OFF mode.
On1Off
BRWS1POWERKeep RAM section S1 ON or OFF in System ON mode.
RAM sections are always retained when ON, but can also be retained when OFF dependent on the settings in S1RETENTION.
All RAM sections will be OFF in System OFF mode.
Off0Off
On1On
CRWS0RETENTIONKeep retention on RAM section S0 when RAM section is in OFF
Off0Off
On1On
DRWS1RETENTIONKeep retention on RAM section S1 when RAM section is in OFF
Off0Off
On1On

18.9.34 RAM[7].POWERSET

Address offset: 0x974

RAM7 power control set register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM7 on or off in System ON mode
On1On
BWS1POWERKeep RAM section S1 of RAM7 on or off in System ON mode
On1On
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
On1On
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
On1On

18.9.35 RAM[7].POWERCLR

Address offset: 0x978

RAM7 power control clear register

When read, this register will return the value of the POWER register.

Bit number313029282726252423222120191817161514131211109876543210
IdDBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
AWS0POWERKeep RAM section S0 of RAM7 on or off in System ON mode
Off1Off
BWS1POWERKeep RAM section S1 of RAM7 on or off in System ON mode
Off1Off
IdD CBA
Reset 0x0000FFFF00000000000000001111111111111111
IdRWFieldValue IdValueDescription
CWS0RETENTIONKeep retention on RAM section S0 when RAM section is switched off
Off1Off
DWS1RETENTIONKeep retention on RAM section S1 when RAM section is switched off
Off1Off

18.10 Electrical specification

18.10.1 Current consumption, sleep

SymbolDescriptionMin.Typ.Max.Units
$I_{OFF}$ System OFF current, no RAM retention0.3μA
$I_{ON}$ System ON base current, no RAM retention1.2μA
$I_{RAM}$ Additional RAM retention current per 4 KB RAM section20nA

18.10.2 Device startup times

SymbolDescriptionMin.Typ.Max.Units
$t_{POR}$ Time in Power on Reset after VDD reaches 1.7 V for all supply voltages and temperatures. Dependent on supply rise time. $^{10}$
$t_{POR,10us}$ VDD rise time 10us1ms
$t_{POR,10ms}$ VDD rise time 10ms9ms
$t_{POR,60ms}$ VDD rise time 60ms23ms
$t_{PINR}$ If a GPIO pin is configured as reset, the maximum time taken to pull up the pin and release reset after power on reset. Dependent on the pin capacitive load (C) $^{11}$ : t=5RC, R = 13kOhm
$t_{PINR,500nF}$ C = 500nF32.5ms
$t_{PINR,10uF}$ C = 10uF650ms
$t_{R2ON}$ Time from reset to ON (CPU execute)
$t_{R2ON,NOTCONF}$ If reset pin not configuredtPORms
$t_{R2ON,CONF}$ If reset pin configuredtPOR + tPINRms
$t_{OFF2ON}$ Time from OFF to CPU execute16.5μs
$t_{IDLE2CPU}$ Time from IDLE to CPU execute3.0μs
$t_{EVTSET,CL1}$ Time from HW event to PPI event in Constant Latency System ON mode0.0625μs
$t_{EVTSET,CL0}$ Time from HW event to PPI event in Low Power System ON mode0.0625μs

18.10.3 Power fail comparator

SymbolDescriptionMin.Typ.Max.Units
$I_{POF}$ Current consumption when enabled $^{12}$ <4μA
$V_{POF}$ Nominal power level warning thresholds (falling supply voltage).Levels are configurable between Min. and Max. in 100mV increments.1.72.8V
$V_{POFTOL}$ Threshold voltage tolerance±1±5%

10 A step increase in supply voltage of 300 mV or more, with rise time of 300 ms or less, within the valid supply range, may result in a system reset.

SymbolDescriptionMin.Typ.Max.Units
$V_{POFHYST}$ Threshold voltage hysteresis50mV
$V_{BOR,OFF}$ Brown out reset voltage range SYSTEM OFF mode1.21.7V
$V_{BOR,ON}$ Brown out reset voltage range SYSTEM ON mode1.51.7V

19 CLOCK — Clock control

The clock control system can source the system clocks from a range of internal or external high and low frequency oscillators and distribute them to modules based upon a module’s individual requirements. Clock distribution is automated and grouped independently by module to limit current consumption in unused branches of the clock tree.

Listed here are the main features for CLOCK:

• 64 MHz on-chip oscillator

• 64 MHz crystal oscillator, using external 32 MHz crystal

• 32.768 kHz +/-250 ppm RC oscillator

• 32.768 kHz crystal oscillator, using external 32.768 kHz crystal

• 32.768 kHz oscillator synthesized from 64 MHz oscillator

• Firmware (FW) override control of oscillator activity for low latency start up

• Automatic oscillator and clock control, and distribution for ultra-low power


Figure 19: Clock control

19.1 HFCLK clock controller

The HFCLK clock controller provides the following clocks to the system.

• HCLK64M: 64 MHz CPU clock

• PCLK1M: 1 MHz peripheral clock

• PCLK16M: 16 MHz peripheral clock

• PCLK32M: 32 MHz peripheral clock

The HFCLK controller supports the following high frequency clock (HFCLK) sources:

• 64 MHz internal oscillator (HFINT)

• 64 MHz crystal oscillator (HFXO)

For illustration, see Figure 19: Clock control on page 104.

When the system requests one or more clocks from the HFCLK controller, the HFCLK controller will automatically provide them. If the system does not request any clocks provided by the HFCLK controller, the controller will enter a power saving mode.

These clocks are only available when the system is in ON mode. When the system enters ON mode, the internal oscillator (HFINT) clock source will automatically start to be able to provide the required HFCLK clock(s) for the system.

The HFINT will be used when HFCLK is requested and HFXO has not been started. The HFXO is started by triggering the HFCLKSTART task and stopped using the HFCLKSTOP task. A HFCLKSTARTED event will be generated when the HFXO has started and its frequency is stable.

The HFXO must be running to use the RADIO, NFC module or the calibration mechanism associated with the 32.768 kHz RC oscillator.

19.1.1 64 MHz crystal oscillator (HFXO)

The 64 MHz crystal oscillator (HFXO) is controlled by a 32 MHz external crysta

The crystal oscillator is designed for use with an AT-cut quartz crystal in parallel resonant mode. To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal data sheet.

Figure 20: Circuit diagram of the 64 MHz crystal oscillator on page 105 shows how the 32 MHz crystal is connected to the 64 MHz crystal oscillator.


Figure 20: Circuit diagram of the 64 MHz crystal oscillator

The load capacitance (CL) is the total capacitance seen by the crystal across its terminals and is given by:

$$
C L = \frac {\left(C 1 ^ {\prime} \cdot C 2 ^ {\prime}\right)}{\left(C 1 ^ {\prime} + C 2 ^ {\prime}\right)}
$$

$$
C 1 ^ {\prime} = C 1 + C _ {p c b 1} + C _ {p i n}
$$

$$
C 2 ^ {\prime} = C 2 + C _ {p c b 2} + C _ {p i n}
$$

C1 and C2 are ceramic SMD capacitors connected between each crystal terminal and ground. For more information, see Reference circuitry on page 550. $\mathsf { C } _ { \mathsf { p c b 1 } }$ and $\mathsf { C } _ { \mathsf { p c b } 2 }$ are stray capacitances on the PCB. $\mathsf { C } _ { \mathsf { p i n } }$ is the pin input capacitance on the XC1 and XC2 pins. See table 64 MHz crystal oscillator (HFXO) on page 112. The load capacitors C1 and C2 should have the same value.

For reliable operation, the crystal load capacitance, shunt capacitance, equivalent series resistance, and drive level must comply with the specifications in table 64 MHz crystal oscillator (HFXO) on page 112. It is recommended to use a crystal with lower than maximum load capacitance and/or shunt capacitance. A low load capacitance will reduce both start up time and current consumption.

19.2 LFCLK clock controller

The system supports several low frequency clock sources.

As illustrated in Figure 19: Clock control on page 104, the system supports the following low frequency clock sources:

• 32.768 kHz RC oscillator (LFRC)

• 32.768 kHz crystal oscillator (LFXO)

• 32.768 kHz synthesized from HFCLK (LFSYNT)

The LFCLK clock is started by first selecting the preferred clock source in register LFCLKSRC on page 111 and then triggering the LFCLKSTART task. If the LFXO is selected as the clock source, the LFCLK will initially start running from the 32.768 kHz LFRC while the LFXO is starting up and automatically switch to using the LFXO once this oscillator is running. The LFCLKSTARTED event will be generated when the LFXO has been started.

The LFCLK clock is stopped by triggering the LFCLKSTOP task.

It is not allowed to write to register LFCLKSRC on page 111 when the LFCLK is running.

A LFCLKSTOP task will stop the LFCLK oscillator. However, the LFCLKSTOP task can only be triggered after the STATE field in register LFCLKSTAT on page 110 indicates a 'LFCLK running' state.

The LFCLK clock controller and all of the LFCLK clock sources are always switched off when in OFF mode.

19.2.1 32.768 kHz RC oscillator (LFRC)

The default source of the low frequency clock (LFCLK) is the 32.768 kHz RC oscillator (LFRC).

The LFRC frequency will be affected by variation in temperature. The LFRC oscillator can be calibrated to improve accuracy by using the HFXO as a reference oscillator during calibration. See Table 32.768 kHz RC oscillator (LFRC) on page 112 for details on the default and calibrated accuracy of the LFRC oscillator. The LFRC oscillator does not require additional external components.

19.2.2 Calibrating the 32.768 kHz RC oscillator

After the 32.768 kHz RC oscillator is started and running, it can be calibrated by triggering the CAL task. In this case, the HFCLK will be temporarily switched on and used as a reference.

A DONE event will be generated when calibration has finished. The calibration mechanism will only work as long as HFCLK is generated from the HFCLK crystal oscillator, it is therefore necessary to explicitly start this crystal oscillator before calibration can be started, see HFCLKSTART task.

19.2.3 Calibration timer

The calibration timer can be used to time the calibration interval of the 32.768 kHz RC oscillator.

The calibration timer is started by triggering the CTSTART task and stopped by triggering the CTSTOP task. The calibration timer will always start counting down from the value specified in CTIV and generate a CTTO timeout event when it reaches 0. The Calibration timer will stop by itself when it reaches 0.

Figure 21: Calibration timer

Due to limitations in the calibration timer, only one task related to calibration, that is, CAL, CTSTART and CTSTOP, can be triggered for every period of LFCLK.

19.2.4 32.768 kHz crystal oscillator (LFXO)

For higher LFCLK accuracy (when better than +/- 250 ppm accuracy is required), the low frequency crystal oscillator (LFXO) must be used.

The following external clock sources are supported:

• Low swing clock signal applied to the XL1 pin. The XL2 pin shall then be grounded.

• Rail-to-rail clock signal applied to the XL1 pin. The XL2 pin shall then be grounded or left unconnected.

The LFCLKSRC on page 111 register controls the clock source, and its allowed swing. The truth table for various situations is as follows:

Table 28: LFCLKSRC configuration depending on clock source

SRCEXTERNALBYPASSComment
000Normal operation, RC is source
001DO NOT USE
01XDO NOT USE
100Normal XTAL operation
110Apply external low swing signal to XL1, ground XL2
111Apply external full swing signal to XL1, leave XL2 grounded or unconnected
101DO NOT USE
200Normal operation, synth is source
201DO NOT USE
21XDO NOT USE

To achieve correct oscillation frequency, the load capacitance must match the specification in the crystal data sheet. Figure 22: Circuit diagram of the 32.768 kHz crystal oscillator on page 107 shows the LFXO circuitry.


Figure 22: Circuit diagram of the 32.768 kHz crystal oscillator

The load capacitance (CL) is the total capacitance seen by the crystal across its terminals and is given by:

$$
C L = \frac {\left(C 1 ^ {\prime} \cdot C 2 ^ {\prime}\right)}{\left(C 1 ^ {\prime} + C 2 ^ {\prime}\right)}
$$

$$
C 1 ^ {\prime} = C 1 + C _ {p c b 1} + C _ {p i n}
$$

$$
C 2 ^ {\prime} = C 2 + C _ {p c b 2} + C _ {p i n}
$$

C1 and C2 are ceramic SMD capacitors connected between each crystal terminal and ground. $\mathsf { C } _ { \mathsf { p c b 1 } }$ and $\mathsf { C } _ { \mathsf { p c b } 2 }$ are stray capacitances on the PCB. $\mathsf { C } _ { \mathsf { p i n } }$ is the pin input capacitance on the XC1 and XC2 pins (see 32.768 kHz crystal oscillator (LFXO) on page 112). The load capacitors C1 and C2 should have the same value.

For more information, see Reference circuitry on page 550.

19.2.5 32.768 kHz synthesized from HFCLK (LFSYNT)

LFCLK can also be synthesized from the HFCLK clock source. The accuracy of LFCLK will then be the accuracy of the HFCLK.

Using the LFSYNT clock avoids the requirement for a 32.768 kHz crystal, but increases average power consumption as the HFCLK will need to be requested in the system.

19.3 Registers

Table 29: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40000000CLOCKCLOCKClock control

Table 30: Register Overview

RegisterOffsetDescription
TASKS_HFCLKSTART0x000Start HFCLK crystal oscillator
TASKS_HFCLKSTOP0x004Stop HFCLK crystal oscillator
TASKS_LFCLKSTART0x008Start LFCLK source
TASKS_LFCLKSTOP0x00CStop LFCLK source
TASKS_CAL0x010Start calibration of LFRC oscillator
TASKS_CTSTART0x014Start calibration timer
TASKS_CTSTOP0x018Stop calibration timer
EVENTS_HFCLKSTARTED0x100HFCLK oscillator started
EVENTS_LFCLKSTARTED0x104LFCLK started
EVENTS_DONE0x10CCalibration of LFCLK RC oscillator complete event
EVENTS_CTTO0x110Calibration timer timeout
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
HFCLKRUN0x408Status indicating that HFCLKSTART task has been triggered
HFCLKSTAT0x40CHFCLK status
LFCLKRUN0x414Status indicating that LFCLKSTART task has been triggered
LFCLKSTAT0x418LFCLK status
LFCLKSRCCOPY0x41CCopy of LFCLKSRC register, set when LFCLKSTART task was triggered
LFCLKSRC0x518Clock source for the LFCLK
CTIV0x538Calibration timer interval Retained
TRACECONFIG0x55CClocking options for the Trace Port debug interface

19.3.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWHFCLKSTARTED
Set1
Disabled0
Enabled1
BRWLFCLKSTARTED
Set1
Disabled0
Enabled1
Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
CRWDONE
Set1
Disabled0
Enabled1
DRWCTTO
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

19.3.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWHFCLKSTARTED
Clear1
Disabled0
Enabled1
BRWLFCLKSTARTED
Clear1
Disabled0
Enabled1
CRWDONE
See EVENTS_DONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCTTOWrite '1' to Disable interrupt for CTTO event
See EVENTS_CTTO
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

19.3.3 HFCLKRUN

Address offset: 0x408

Status indicating that HFCLKSTART task has been triggered

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARSTATUS
NotTriggered0
Triggered1

19.3.4 HFCLKSTAT

Address offset: 0x40C

HFCLK status

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARSRCSource of HFCLK
RC064 MHz internal oscillator (HFINT)
Xtal164 MHz crystal oscillator (HFXO)
BRSTATEHFCLK state
NotRunning0HFCLK not running
Running1HFCLK running

19.3.5 LFCLKRUN

Address offset: 0x414

Status indicating that LFCLKSTART task has been triggered

Bit number
Id0
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSTATUS
NotTriggered0Task not triggered
Triggered1Task triggered

19.3.6 LFCLKSTAT

Address offset: 0x418

LFCLK status

Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARSRCSource of LFCLK
RC032.768 kHz RC oscillator
Xtal132.768 kHz crystal oscillator
Synth232.768 kHz synthesized from HFCLK
BRSTATELFCLK state
NotRunning0LFCLK not running
Running1LFCLK running

19.3.7 LFCLKSRCCOPY

Address offset: 0x41C

Copy of LFCLKSRC register, set when LFCLKSTART task was triggered

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARSRC
RC0
Xtal1
Synth2

19.3.8 LFCLKSRC

Address offset: 0x518

Clock source for the LFCLK

Bit number313029282726252423222120191817161514131211109876543210
IdC BAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSRCClock source
RC032.768 kHz RC oscillator
Xtal132.768 kHz crystal oscillator
Synth232.768 kHz synthesized from HFCLK
BRWBYPASSEnable or disable bypass of LFCLK crystal oscillator with external clock source
Disabled0Disable (use with Xtal or low-swing external source)
Enabled1Enable (use with rail-to-rail external source)
CRWEXTERNALEnable or disable external source for LFCLK
Disabled0Disable external source (use with Xtal)
Enabled1Enable use of external source instead of Xtal (SRC needs to be set to Xtal)

19.3.9 CTIV ( Retained )

Address offset: 0x538

This register is a retained register

Calibration timer interval

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCTIVCalibration timer interval in multiple of 0.25 seconds. Range:

19.3.10 TRACECONFIG

Address offset: 0x55C

Clocking options for the Trace Port debug interface

This register is a retained register. Reset behavior is the same as debug components.

Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWTRACEPORTSPEEDSpeed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two.
32MHz32 MHz Trace Port clock (TRACECLK = 16 MHz)
16MHz16 MHz Trace Port clock (TRACECLK = 8 MHz)
8MHz8 MHz Trace Port clock (TRACECLK = 4 MHz)
4MHz4 MHz Trace Port clock (TRACECLK = 2 MHz)
BRWTRACEMUXPin multiplexing of trace signals.
GPIOGPIOs multiplexed onto all trace-pins
SerialSWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins
ParallelTRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14.

19.4 Electrical specification

19.4.1 64 MHz internal oscillator (HFINT)

SymbolDescriptionMin.Typ.Max.Units
$f_{NOM\_HFINT}$ Nominal output frequency64MHz
$f_{TOL\_HFINT}$ Frequency tolerance<±1.5<±6%
$I_{HFINT}$ Run current60μA
$I_{START\_HFINT}$ Average startup currentI_HFINTμA
$t_{START\_HFINT}$ Startup time3us

19.4.2 64 MHz crystal oscillator (HFXO)

SymbolDescriptionMin.Typ.Max.Units
$f_{NOM\_HFXO}$ Nominal output frequency64MHz
$f_{XTAL\_HFXO}$ External crystal frequency32MHz
$f_{TOL\_HFXO}$ Frequency tolerance requirement for 2.4 GHz proprietary radio applications±60ppm
$f_{TOL\_HFXO\_BLE}$ Frequency tolerance requirement, Bluetooth low energy applications±40ppm
$C_{L\_HFXO}$ Load capacitance12pF
$C_{O\_HFXO}$ Shunt capacitance7pF
$R_{S\_HFXO\_7PF}$ Equivalent series resistance C0 = 7 pF60ohm
$R_{S\_HFXO\_5PF}$ Equivalent series resistance C0 = 5 pF80ohm
$R_{S\_HFXO\_3PF}$ Equivalent series resistance C0 = 3 pF100ohm
$P_{D\_HFXO}$ Drive level100uW
$C_{PIN\_HFXO}$ Input capacitance XC1 and XC24pF
$I_{STBY\_X32M}$ Core standby current $^{13}$ 50μA
$I_{HFXO}$ Run current250μA
$I_{START\_HFXO}$ Average startup current, first 1 ms0.4mA
$t_{START\_HFXO}$ Startup time0.36ms

19.4.3 32.768 kHz RC oscillator (LFRC)

SymbolDescriptionMin.Typ.Max.Units
$f_{NOM\_LFRC}$ Nominal frequency32.768kHz
$f_{TOL\_LFRC}$ Frequency tolerance±2%
$f_{TOL\_CAL\_LFRC}$ Frequency tolerance for LFRC after $calibration^{14}$ ±250ppm
$I_{LFRC}$ Run current for 32.768 kHz RC oscillator0.61μA
$t_{START\_LFRC}$ Startup time for 32.768 kHz RC oscillator600us

19.4.4 32.768 kHz crystal oscillator (LFXO)

SymbolDescriptionMin.Typ.Max.Units
$f_{NOM\_LFXO}$ Crystal frequency32.768kHz
$f_{TOL\_LFXO\_BLE}$ Frequency tolerance requirement for BLE stack±250ppm
$f_{TOL\_LFXO\_ANT}$ Frequency tolerance requirement for ANT stack±50ppm
$C_{L\_LFXO}$ Load capacitance12.5pF
$C_{0\_LFXO}$ Shunt capacitance2pF
$R_{S\_LFXO}$ Equivalent series resistance100kohm
$P_{D\_LFXO}$ Drive level1uW
$C_{pin}$ Input capacitance on XL1 and XL2 pads4pF
$I_{LFXO}$ Run current for 32.768 kHz crystal oscillator0.25μA

13 Current drawn if HFXO is forced on through for instance using the low latency power mode.
14 Constant temperature within ±0.5 °C and calibration performed at least every 8 seconds

SymbolDescriptionMin.Typ.Max.Units
$t_{START\_LFXO}$ Startup time for 32.768 kHz crystal oscillator0.25s
$V_{AMP\_IN\_XO\_LOW}$ Peak to peak amplitude for external low swing clock. Input2001000mV

19.4.5 32.768 kHz synthesized from HFCLK (LFSYNT)

SymbolDescriptionMin.Typ.Max.Units
$f_{NOM\_LFSYNT}$ Nominal frequency32.768kHz
$f_{TOL\_LFSYNT}$ Frequency tolerance in addition to HFLCK tolerance $^{15}$ 8ppm
$I_{LFSYNT}$ Run current for synthesized 32.768 kHz100μA
$t_{START\_LFSYNT}$ Startup time for synthesized 32.768 kHz100us

20 GPIO — General purpose input/output

The general purpose input/output (GPIO) is organized as one port with up to 32 I/Os (dependent on package) enabling access and control of up to 32 pins through one port. Each GPIO can be accessed individually.

GPIO has the following user-configurable features:

• Up to 32 GPIO

• 8 GPIO with Analog channels for SAADC, COMP or LPCOMP inputs

• Configurable output drive strength

• Internal pull-up and pull-down resistors

• Wake-up from high or low level triggers on all pins

• Trigger interrupt on state changes on any pin

• All pins can be used by the PPI task/event system

• One or more GPIO outputs can be controlled through PPI and GPIOTE channels

• All pins can be individually mapped to interface blocks for layout flexibility

• GPIO state changes captured on SENSE signal can be stored by LATCH register

The GPIO Port peripheral implements up to 32 pins, PIN0 through PIN31. Each of these pins can be individually configured in the PIN_CNF[n] registers (n=0..31).

The following parameters can be configured through these registers:

• Direction

• Drive strength

• Enabling of pull-up and pull-down resistors

• Pin sensing

• Input buffer disconnect

• Analog input (for selected pins)

The PIN_CNF registers are retained registers. See POWER — Power supply on page 81 chapter for more information about retained registers.

20.1 Pin configuration

Pins can be individually configured, through the SENSE field in the PIN_CNF[n] register, to detect either a high level or a low level on their input.

When the correct level is detected on any such configured pin, the sense mechanism will set the DETECT signal high. Each pin has a separate DETECT signal, and the default behaviour, as defined by the DETECTMODE register, is that the DETECT signal from all pins in the GPIO Port are combined into a common DETECT signal that is routed throughout the system, which then can be utilized by other peripherals, see Figure 23: GPIO Port and the GPIO pin details on page 115. This mechanism is functional in both ON and OFF mode.


Figure 23: GPIO Port and the GPIO pin details

Figure 23: GPIO Port and the GPIO pin details on page 115 illustrates the GPIO port containing 32 individual pins, where is illustrated in more detail as a reference. All the signals on the left side of the illustration are used by other peripherals in the system, and therefore, are not directly available to the CPU.

Make sure that a pin is in a level that cannot trigger the sense mechanism before enabling it. Detect will go high immediately if the sense condition configured in the PIN_CNF registers is met when the sense mechanism is enabled. This will trigger a PORT event if the DETECT signal was low before enabling the sense mechanism. See GPIOTE — GPIO tasks and events on page 161.

See the following peripherals for more information about how the DETECT signal is used:

• POWER: uses the DETECT signal to exit from System OFF.

• GPIOTE: uses the DETECT signal to generate the PORT event.

When a pin's PINx.DETECT signal goes high, a flag will be set in the LATCH register, e.g. when the PIN0.DETECT signal goes high, bit 0 in the LATCH register will be set to '1'.

The LATCH register will only be cleared if the CPU explicitly clears it by writing a '1' to the bit that shall be cleared, i.e. the LATCH register will not be affected by a PINx.DETECT signal being set low.

If the CPU performs a clear operation on a bit in the LATCH register when the associated PINx.DETECT signal is high, the bit in the LATCH register will not be cleared.

The LDETECT signal will be set high when one or more bits in the LATCH register are '1'. The LDETECT signal will be set low when all bits in the LATCH register are successfully cleared to '0'.

If one or more bits in the LATCH register are '1' after the CPU has performed a clear operation on the LATCH registers, a rising edge will be generated on the LDETECT signal, this is illustrated in Figure 24: DETECT signal behavior on page 116.

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 the behaviour of the GPIO port's DETECT signal from the default behaviour described above to instead be derived directly from the LDETECT signal, see Figure 23: GPIO Port and the GPIO pin details on page 115. Figure 24: DETECT signal behavior on page 116 illustrates the DETECT signals behaviour for these two alternatives.


Figure 24: DETECT signal behavior

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 Figure 23: GPIO Port and the GPIO pin details on page 115. Inputs must be connected in order 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 attach themselves to GPIO pins and override their output value and configuration, or read their analog or digital input value, see Figure 23: GPIO Port and the GPIO pin details on page 115.

Selected pins also support analog input signals, see ANAIN in Figure 23: GPIO Port and the GPIO pin details on page 115. The assignment of the analog pins can be found in Pin assignments on page 14.

Important: When a pin is configured as digital input, care has been taken in the nRF52832 design to minimize increased current consumption when the input voltage is between $\mathsf { V } _ { \sf I L }$ and $\mathsf { V } _ { \mathsf { H } }$ . However, it is a good practice to ensure that the external circuitry does not drive that pin to levels between $\mathsf { V } _ { \parallel }$ and $\mathsf { V } _ { \mathsf { H } }$ for a long period of time.

20.2 GPIO located near the RADIO

Radio performance parameters, such as sensitivity, may be affected by high frequency digital I/O with large sink/source current close to the radio power supply and antenna pins.

Refer to Pin assignments on page 14 for recommended usage guidelines to maximize radio performance in an application.

20.3 Registers

Table 31: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x50000000GPIOGPIOGeneral purpose input and outputDeprecated
0x50000000GPIOP0General purpose input and output

Table 32: Register Overview

RegisterOffsetDescription
OUT0x504Write GPIO port
OUTSET0x508Set individual bits in GPIO port
OUTCLR0x50CClear individual bits in GPIO port
IN0x510Read GPIO port
DIR0x514Direction of GPIO pins
DIRSET0x518DIR set register
DIRCLR0x51CDIR clear register
LATCH0x520Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers
DETECTMODE0x524Select between default DETECT signal behaviour and LDETECT mode
PIN_CNF[0]0x700Configuration of GPIO pins
PIN_CNF[1]0x704Configuration of GPIO pins
PIN_CNF[2]0x708Configuration of GPIO pins
PIN_CNF[3]0x70CConfiguration of GPIO pins
PIN_CNF[4]0x710Configuration of GPIO pins
PIN_CNF[5]0x714Configuration of GPIO pins
PIN_CNF[6]0x718Configuration of GPIO pins
PIN_CNF[7]0x71CConfiguration of GPIO pins
PIN_CNF[8]0x720Configuration of GPIO pins
PIN_CNF[9]0x724Configuration of GPIO pins
PIN_CNF[10]0x728Configuration of GPIO pins
PIN_CNF[11]0x72CConfiguration of GPIO pins
PIN_CNF[12]0x730Configuration of GPIO pins
PIN_CNF[13]0x734Configuration of GPIO pins
PIN_CNF[14]0x738Configuration of GPIO pins
PIN_CNF[15]0x73CConfiguration of GPIO pins
PIN_CNF[16]0x740Configuration of GPIO pins
PIN_CNF[17]0x744Configuration of GPIO pins
PIN_CNF[18]0x748Configuration of GPIO pins
PIN_CNF[19]0x74CConfiguration of GPIO pins
PIN_CNF[20]0x750Configuration of GPIO pins
PIN_CNF[21]0x754Configuration of GPIO pins
PIN_CNF[22]0x758Configuration of GPIO pins
PIN_CNF[23]0x75CConfiguration of GPIO pins
PIN_CNF[24]0x760Configuration of GPIO pins
PIN_CNF[25]0x764Configuration of GPIO pins
PIN_CNF[26]0x768Configuration of GPIO pins
PIN_CNF[27]0x76CConfiguration of GPIO pins
PIN_CNF[28]0x770Configuration of GPIO pins
PIN_CNF[29]0x774Configuration of GPIO pins
PIN_CNF[30]0x778Configuration of GPIO pins
PIN_CNF[31]0x77CConfiguration of GPIO pins

20.3.1 OUT

Address offset: 0x504

Write GPIO port

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPIN0Pin 0
Low0Pin driver is low
High1Pin driver is high
BRWPIN1Pin 1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Low0Pin driver is low
High1Pin driver is high
CRWPIN2Pin 2
Low0Pin driver is low
High1Pin driver is high
DRWPIN3Pin 3
Low0Pin driver is low
High1Pin driver is high
ERWPIN4Pin 4
Low0Pin driver is low
High1Pin driver is high
FRWPIN5Pin 5
Low0Pin driver is low
High1Pin driver is high
GRWPIN6Pin 6
Low0Pin driver is low
High1Pin driver is high
HRWPIN7Pin 7
Low0Pin driver is low
High1Pin driver is high
IRWPIN8Pin 8
Low0Pin driver is low
High1Pin driver is high
JRWPIN9Pin 9
Low0Pin driver is low
High1Pin driver is high
KRWPIN10Pin 10
Low0Pin driver is low
High1Pin driver is high
LRWPIN11Pin 11
Low0Pin driver is low
High1Pin driver is high
MRWPIN12Pin 12
Low0Pin driver is low
High1Pin driver is high
NRWPIN13Pin 13
Low0Pin driver is low
High1Pin driver is high
ORWPIN14Pin 14
Low0Pin driver is low
High1Pin driver is high
PRWPIN15Pin 15
Low0Pin driver is low
High1Pin driver is high
QRWPIN16Pin 16
Low0Pin driver is low
High1Pin driver is high
RRWPIN17Pin 17
Low0Pin driver is low
High1Pin driver is high
SRWPIN18Pin 18
Low0Pin driver is low
High1Pin driver is high
TRWPIN19Pin 19
Low0Pin driver is low
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
High1
URWPIN20
Low0
High1
VRWPIN21
Low0
High1
WRWPIN22
Low0
High1Pin driver is low
XRWPIN23
Low0Pin driver is low
High1Pin driver is high
YRWPIN24Pin driver is low
Low0Pin driver is high
High1Pin driver is low
ZRWPIN25Pin driver is high
Low0Pin driver is low
High1Pin driver is high
aRWPIN26Pin driver is low
Low0Pin driver is high
High1Pin driver is low
bRWPIN27Pin driver is high
Low0Pin driver is low
High1Pin driver is high
cRWPIN28Pin driver is low
Low0Pin driver is high
High1Pin driver is low
dRWPIN29Pin driver is high
Low0Pin driver is low
High1Pin driver is high
eRWPIN30Pin driver is low
Low0Pin driver is high
High1Pin driver is low
fRWPIN31Pin driver is high
Low0Pin driver is low
High1Pin driver is high

20.3.2 OUTSET

Address offset: 0x508

Set individual bits in GPIO port

Read: reads value of OUT register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPINOPin 0
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
BRWPIN1Pin 1
Low0Read: pin driver is low
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ldRWFieldValue IdValueDescription
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
CRWPIN2Pin 2
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
DRWPIN3Pin 3
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
ERWPIN4Pin 4
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
FRWPIN5Pin 5
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
GRWPIN6Pin 6
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
HRWPIN7Pin 7
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
IRWPIN8Pin 8
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
JRWPIN9Pin 9
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
KRWPIN10Pin 10
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
LRWPIN11Pin 11
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
MRWPIN12Pin 12
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
NRWPIN13Pin 13
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
ORWPIN14Pin 14
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
PRWPIN15Pin 15
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
QRWPIN16Pin 16
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
RRWPIN17Pin 17
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
SRWPIN18Pin 18
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
TRWPIN19Pin 19
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
URWPIN20Pin 20
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
VRWPIN21Pin 21
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
WRWPIN22Pin 22
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
XRWPIN23Pin 23
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
YRWPIN24Pin 24
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
ZRWPIN25Pin 25
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
aRWPIN26Pin 26
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
bRWPIN27Pin 27
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
cRWPIN28Pin 28
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
dRWPIN29Pin 29
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
eRWPIN30Pin 30
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect
fRWPIN31Pin 31
Low0Read: pin driver is low
High1Read: pin driver is high
Set1Write: writing a '1' sets the pin high; writing a '0' has no effect

20.3.3 OUTCLR

Address offset: 0x50C

Clear individual bits in GPIO port

Read: reads value of OUT register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPIN0
Low0
High1
Clear1
BRWPIN1
Low0
High1
Clear1
CRWPIN2
Low0
High1Write: writing a '1' sets the pin low; writing a '0' has no effect
Clear1
DRWPIN3Pin 2
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
ERWPIN4Pin 3
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
FRWPIN5Pin 5
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
GRWPIN6Pin 6
Low0Read: pin driver is low
High1Read: pin driver is high
ClearWrite: writing a '1' sets the pin low; writing a '0' has no effect
HRWPIN7Pin 7
Low0Read: pin driver is low
High1Read: pin driver is high
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
IRWPIN8Pin 8
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
JRWPIN9Pin 9
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
KRWPIN10Pin 10
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
LRWPIN11Pin 11
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
MRWPIN12Pin 12
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
NRWPIN13Pin 13
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
ORWPIN14Pin 14
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
PRWPIN15Pin 15
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
QRWPIN16Pin 16
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
RRWPIN17Pin 17
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
SRWPIN18Pin 18
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
TRWPIN19Pin 19
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
URWPIN20Pin 20
Low0Read: pin driver is low
High1Read: pin driver is high
Clear1Write: writing a '1' sets the pin low; writing a '0' has no effect
VRWPIN21Pin 21
Low0Read: pin driver is low
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
High1
Clear1
WRWPIN22
Low0
High1
Clear1
XRWPIN23
Low0
High1
Clear1
YRWPIN24
Low0
High1
Clear1
ZRWPIN25
Low0
High11
Clear11
aRWPIN26
Low01
High11
Clear11
bRWPIN27
Low01
High1
Clear11
cRWPIN28
Low01
High11
Clear11
dRWPIN29
Low01
High1
Clear1
eRWPIN30
Low0
High1
Clear1
fRWPIN31
Low0
High11
Clear11

20.3.4 IN

Address offset: 0x510

Read GPIO port

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARPINO
Low0
High1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
BRPIN1Pin 1
Low0Pin input is low
High1Pin input is high
CRPIN2Pin 2
Low0Pin input is low
High1Pin input is high
DRPIN3Pin 3
Low0Pin input is low
High1Pin input is high
ERPIN4Pin 4
Low0Pin input is low
High1Pin input is high
FRPIN5Pin 5
Low0Pin input is low
High1Pin input is high
GRPIN6Pin 6
Low0Pin input is low
High1Pin input is high
HRPIN7Pin 7
Low0Pin input is low
High1Pin input is high
IRPIN8Pin 8
Low0Pin input is low
High1Pin input is high
JRPIN9Pin 9
Low0Pin input is low
High1Pin input is high
KRPIN10Pin 10
Low0Pin input is low
High1Pin input is high
LRPIN11Pin 11
Low0Pin input is low
High1Pin input is high
MRPIN12Pin 12
Low0Pin input is low
High1Pin input is high
NRPIN13Pin 13
Low0Pin input is low
High1Pin input is high
ORPIN14Pin 14
Low0Pin input is low
High1Pin input is high
PRPIN15Pin 15
Low0Pin input is low
High1Pin input is high
QRPIN16Pin 16
Low0Pin input is low
High1Pin input is high
RRPIN17Pin 17
Low0Pin input is low
High1Pin input is high
SRPIN18Pin 18
Low0Pin input is low
High1Pin input is high
TRPIN19Pin 19
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Low0
High1
URPIN20
Low0
High1
VRPIN21
Low0
High1
WRPIN22
Low0
High1
XRPIN23
Low0
High1
YRPIN24
Low0
High1Pin input is low
ZRPIN25
Low0Pin input is low
High1Pin input is high
aRPIN26
Low0Pin input is low
High1
bRPIN27
Low0Pin input is low
High1Pin input is high
cRPIN28
Low0Pin input is low
High1Pin input is high
dRPIN29
Low0Pin input is low
High1Pin input is highPin input is high
eRPIN30
Low0Pin input is low
High1Pin input is high
fRPIN31
Low0Pin input is low
High1

20.3.5 DIR

Address offset: 0x514

Direction of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPIN0Pin 0
Input0Pin set as input
Output1Pin set as output
BRWPIN1Pin 1
Input0Pin set as input
Output1Pin set as output
CRWPIN2Pin 2
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Input0
Output1
DRWPIN3
Input0
Output1
ERWPIN4
Input0
Output1
FRWPIN5
Input0
Output1
GRWPIN6
Input0
Output1Pin set as input
HRWPIN7
Input0Pin set as input
Output1Pin set as output
IRWPIN8Pin 8
Input0Pin set as input
Output1Pin set as output
JRWPIN9Pin 9
Input0Pin set as input
Output1Pin set as output
KRWPIN10Pin 10
Input0Pin set as input
Output1Pin set as outputPin 11
LRWPIN11Pin 11
Input0Pin set as inputPin set as output
Output1Pin set as outputPin 12
MRWPIN12Pin set as inputPin set as output
Input0Pin set as outputPin 13
Output1Pin set as outputPin set as output
NRWPIN13Pin 13Pin 14
Input0Pin set as inputPin set as output
Output1Pin set as outputPin 15
ORWPIN14Pin set as inputPin set as output
Input0Pin set as outputPin 16
Output1Pin set as outputPin set as output
PRWPIN15Pin 17Pin 18
Input0Pin set as inputPin set as output
Output1Pin set as outputPin 19
QRWPIN16Pin set as inputPin set as output
Input0Pin set as outputPin set as output
Output1Pin set as outputPin 19
RRWPIN17Pin set as inputPin 17
Input0Pin set as outputPin set as output
Output1Pin set as outputPin 18
SRWPIN18Pin set as inputPin set as output
Input0Pin set as outputPin 19
Output1Pin set as outputPin 20
TRWPIN19Pin set as inputPin 20
Input0Pin set as outputPin 20
Output1Pin set as outputPin 20
URWPIN20Pin set as inputPin 20
IdRWFieldValue IdValue
Output1
VRWPIN21
Input0
Output1
WRWPIN22
Input0
Output1
XRWPIN23
Input0
Output1Pin set as output
YRWPIN24
Input0Pin set as input
Output1Pin set as output
ZRWPIN25Pin 25
Input0Pin set as input
Output1Pin set as output
aRWPIN26Pin 26
Input0Pin set as input
Output1Pin set as output
bRWPIN27Pin 27
Input0Pin set as input
Output1Pin set as output
cRWPIN28Pin 28
Input0Pin set as input
Output1Pin set as output
dRWPIN29Pin 29
Input0Pin set as input
Output1Pin set as output
eRWPIN30Pin 30
Input0Pin set as input
Output1Pin set as outputfRWPIN31
fRWPIN31Pin 31
Input0Pin set as input
Output1Pin set as output

20.3.6 DIRSET

Address offset: 0x518

DIR set register

Read: reads value of DIR register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPIN0Set as output pin 0
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
BRWPIN1Set as output pin 1
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
CRWPIN2Set as output pin 2
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ldRWFieldValue IdValueDescription
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
DRWPIN3Set as output pin 3
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
ERWPIN4Set as output pin 4
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
FRWPIN5Set as output pin 5
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
GRWPIN6Set as output pin 6
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
HRWPIN7Set as output pin 7
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
IRWPIN8Set as output pin 8
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
JRWPIN9Set as output pin 9
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
KRWPIN10Set as output pin 10
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
LRWPIN11Set as output pin 11
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
MRWPIN12Set as output pin 12
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
NRWPIN13Set as output pin 13
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
ORWPIN14Set as output pin 14
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
PRWPIN15Set as output pin 15
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
QRWPIN16Set as output pin 16
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
RRWPIN17Set as output pin 17
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
SRWPIN18Set as output pin 18
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
TRWPIN19Set as output pin 19
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
URWPIN20Set as output pin 20
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
VRWPIN21Set as output pin 21
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
WRWPIN22Set as output pin 22
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
XRWPIN23Set as output pin 23
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
YRWPIN24Set as output pin 24
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
ZRWPIN25Set as output pin 25
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
aRWPIN26Set as output pin 26
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
bRWPIN27Set as output pin 27
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
cRWPIN28Set as output pin 28
Input0Read: pin set as input
Output1Read: pin set as output
Set1Write: writing a '1' sets pin to output; writing a '0' has no effect
dRWPIN29Set as output pin 29
Input0Read: pin set as input
Output1Read: pin set as output
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
eRWPIN30
Input0
Output1
Set1
fRWPIN31
Input0
Output1
Set1

20.3.7 DIRCLR

Address offset: 0x51C

DIR clear register

Read: reads value of DIR register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPIN0
Input0
Output1
Clear1
BRWPIN1
Input0
Output1
Clear1
CRWPIN2
Input0
Output1Write: writing a '1' sets pin to input; writing a '0' has no effect
Clear1
DRWPIN3
Input0Set as input pin 2
Output1Read: pin set as input
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
ERWPIN4Set as input pin 3
Input0Read: pin set as input
Output1Write: writing a '1' sets pin to input; writing a '0' has no effect
Clear1Set as input pin 4
FRWPIN5Read: pin set as input
Input0Write: writing a '1' sets pin to input; writing a '0' has no effect
Output1Set as input pin 5
Clear1Read: pin set as input
GRWPIN6Write: writing a '1' sets pin to input; writing a '0' has no effect
Input0Set as input pin 6
Output1Read: pin set as input
Clear1Write: writing a '1' sets pin to input; writing at '0' has no effect
HRWPIN7Set as input pin 7
Input0Read: pin set as input
Output1Write: writing a '1' sets pin to input; writing at '0' has no effect
Clear1Set as input pin 8
IRWPIN8Read: pin set as input
Input0Set as input pin 8
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
JRWPIN9Set as input pin 9
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
KRWPIN10Set as input pin 10
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
LRWPIN11Set as input pin 11
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
MRWPIN12Set as input pin 12
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
NRWPIN13Set as input pin 13
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
ORWPIN14Set as input pin 14
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
PRWPIN15Set as input pin 15
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
QRWPIN16Set as input pin 16
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
RRWPIN17Set as input pin 17
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
SRWPIN18Set as input pin 18
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
TRWPIN19Set as input pin 19
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
URWPIN20Set as input pin 20
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
VRWPIN21Set as input pin 21
Input0Read: pin set as input
Output1Read: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
WRWPIN22Set as input pin 22
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Input0
Output1
Clear1
XRWPIN23
Input0
Output1
Clear1
YRWPIN24
Input0
Output1
Clear1
ZRWPIN25
Input0
Output1
Clear1
aRWPIN26
Input0
Output1Write: writing a '1' sets pin to input; writing a '0' has no effect
Clear1
bRWPIN27
Input0Set as input pin 26
Output1Read: pin set as input
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effect
cRWPIN28
Input0Set as input pin 28
Output1Read: pin set as input
Clear1Write: writing a '1' sets pin to input; writing at '0' has no effect
dRWPIN29
Input0Read: pin set as input
Output1Write: writing a '1' sets pin to input; writing a '0' has no effect
Clear1Set as input pin 30
eRWPIN30
Input0Read: pin set as input
Output1Write: writing a '1' sets pin to input; writing a '0' has no effectRead: pin set as output
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effectSet as input pin 31
fRWPIN31
Input0Read: pin set as inputWrite: writing a '1' sets pin to input; writing a '0' has no effect
Output1Write: writing a '1' sets pin to input; writing a '0' has no effectWrite: writing a '1' sets pin to input; writing a '0' has no effect
Clear1Write: writing a '1' sets pin to input; writing a '0' has no effectWrite: writing a '1' sets pin to input; writing a '0' has no effect

20.3.8 LATCH

Address offset: 0x520

Latch register indicating what GPIO pins that have met the criteria set in the PIN_CNF[n].SENSE registers

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPIN0Status on whether PIN0 has met criteria set in PIN_CNF0.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
BRWPIN1Status on whether PIN1 has met criteria set in PIN_CNF1.SENSE register. Write '1' to clear.
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
idRWFieldValue IdValueDescription
NotLatched0Criteria has not been met
Latched1Criteria has been met
CRWPIN2Status on whether PIN2 has met criteria set in PIN_CNF2.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
DRWPIN3Status on whether PIN3 has met criteria set in PIN_CNF3.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
ERWPIN4Status on whether PIN4 has met criteria set in PIN_CNF4.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
FRWPIN5Status on whether PIN5 has met criteria set in PIN_CNF5.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
GRWPIN6Status on whether PIN6 has met criteria set in PIN_CNF6.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
HRWPIN7Status on whether PIN7 has met criteria set in PIN_CNF7.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
IRWPIN8Status on whether PIN8 has met criteria set in PIN_CNF8.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
JRWPIN9Status on whether PIN9 has met criteria set in PIN_CNF9.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
KRWPIN10Status on whether PIN10 has met criteria set in PIN_CNF10.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
LRWPIN11Status on whether PIN11 has met criteria set in PIN_CNF11.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
MRWPIN12Status on whether PIN12 has met criteria set in PIN_CNF12.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
NRWPIN13Status on whether PIN13 has met criteria set in PIN_CNF13.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
ORWPIN14Status on whether PIN14 has met criteria set in PIN_CNF14.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
PRWPIN15Status on whether PIN15 has met criteria set in PIN_CNF15.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
QRWPIN16Status on whether PIN16 has met criteria set in PIN_CNF16.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria has been met
RRWPIN17Status on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear.
NotLatchedCriteria has not been met
Latched1Criteria has been metStatus on whether PIN17 has met criteria set in PIN_CNF17.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been met
Latched1Criteria have been met
SRWPIN18Status on whether PIN18 has met criteria set in PIN_CNF18.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been metCriteria has been met
Latched1Criteria has been metStatus on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear.
TRWPIN19Status on whether PIN19 has met criteria set in PIN_CNF19.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear.
URWPIN20Status on whether PIN20 has met criteria set in PIN_CNF20.SENSE register. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN20 has met criteria set in PIN_CNF20.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN21 has met criteria set in PIN_CNF21.SENSE registered. Write '1' to clear.
VRWPIN21Status on whether PIN21 has met criteria set in PIN_CNF21.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN22 has met criteria set in PIN_CNF22.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN22 has met criteria set in PIN_CNF22.SENSE registered. Write '1' to clear.
WRWPIN22Status on whether PIN22 has met criteria set in PIN_CNF22.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN23 has met criteria set in PIN_CNF23.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN23 has met criteria set in PIN_CNF23.SENSE registered. Write '1' to clear.
XRWPIN23Status on whether PIN23 has met criteria set in PIN_CNF23.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN24 has met criteria set in PIN_CNF24.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN24 has met criteria set in PIN_CNF24.SENSE registered. Write '1' to clear.
YRWPIN24Status on whether PIN24 has met criteria set in PIN_CNF24.SENSE registered. Write '1' to clear.Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
ZRWPIN25Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.Status on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN25 has met criteria set in PIN_CNF25.SENSE registered. Write '1' to clear.
aRWPIN26Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE registered. Write '1' to clear.Status on whether PIN26 has met criteria set in PIN_CNF26.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN26 has met criteria set in PIN_CNF26.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN26 has met criteria set in PIN_CNF26.SENSE registered. Write '1' to clear.
bRWPIN27Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE registered. Write '1' to clear.Status on whether PIN27 has met criteria set in PIN_CNF27.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN27 has met criteria set in PIN_CNF27.SENSE registered. Write '1' to clear.
Latched1Criteria has been metStatus on whether PIN27 has met criteria set in PIN_CNF27.SENSE registered. Write '1' to clear.
cRWPIN28Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE registered. Write '1' to clear.Status on whether PIN28 has met criteria set in PIN_CNF28.SENSE registered. Write '1' to clear.
NotLatched0Criteria has not been metStatus on whether PIN28 has met criteria set in PIN_CNF28.SENSE registered. Write '1' to clear.
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Latched1
dRWPIN29
NotLatched0
Latched1
eRWPIN30
NotLatched0Criteria has not been met
Latched1Criteria has been met
fRWPIN31Status on whether PIN30 has met criteria set in PIN_CNF30.SENSE register. Write '1' to clear.
Criteria has not been met
NotLatched0Criteria has been met
Latched1Criteria has not been met

20.3.9 DETECTMODE

Address offset: 0x524

Select between default DETECT signal behaviour and LDETECT mode

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDETECTMODE
Default0
LDETECT1

20.3.10 PIN_CNF[0]

Address offset: 0x700

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.11 PIN_CNF[1]

Address offset: 0x704

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.12 PIN_CNF[2]

Address offset: 0x708

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.13 PIN_CNF[3]

Address offset: 0x70C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.14 PIN_CNF[4]

Address offset: 0x710

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.15 PIN_CNF[5]

Address offset: 0x714

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.16 PIN_CNF[6]

Address offset: 0x718

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.17 PIN_CNF[7]

Address offset: 0x71C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.18 PIN_CNF[8]

Address offset: 0x720

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.19 PIN_CNF[9]

Address offset: 0x724

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.20 PIN_CNF[10]

Address offset: 0x728

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.21 PIN_CNF[11]

Address offset: 0x72C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.22 PIN_CNF[12]

Address offset: 0x730

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.23 PIN_CNF[13]

Address offset: 0x734

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.24 PIN_CNF[14]

Address offset: 0x738

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.25 PIN_CNF[15]

Address offset: 0x73C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.26 PIN_CNF[16]

Address offset: 0x740

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.27 PIN_CNF[17]

Address offset: 0x744

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.28 PIN_CNF[18]

Address offset: 0x748

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.29 PIN_CNF[19]

Address offset: 0x74C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.30 PIN_CNF[20]

Address offset: 0x750

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.31 PIN_CNF[21]

Address offset: 0x754

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
ARWDIRPin direction. Same physical register as DIR register
Input0Configure pin as an input pin
Output1Configure pin as an output pin
BRWINPUTConnect or disconnect input buffer
Connect0Connect input buffer
Disconnect1Disconnect input buffer
CRWPULLPull configuration
Disabled0No pull
Pulldown1Pull down on pin
Pullup3Pull up on pin
DRWDRIVEDrive configuration
SOS10Standard '0', standard '1'
HOS11High drive '0', standard '1'
SOH12Standard '0', high drive '1'
HOH13High drive '0', high 'drive '1''
DOS14Disconnect '0' standard '1' (normally used for wired-or connections)
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.32 PIN_CNF[22]

Address offset: 0x758

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.33 PIN_CNF[23]

Address offset: 0x75C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.34 PIN_CNF[24]

Address offset: 0x760

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.35 PIN_CNF[25]

Address offset: 0x764

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.36 PIN_CNF[26]

Address offset: 0x768

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.37 PIN_CNF[27]

Address offset: 0x76C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.38 PIN_CNF[28]

Address offset: 0x770

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.39 PIN_CNF[29]

Address offset: 0x774

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.3.40 PIN_CNF[30]

Address offset: 0x778

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdEEDDDCCBA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
ARWDIRPin direction. Same physical register as DIR register
Input0Configure pin as an input pin
Output1Configure pin as an output pin
BRWINPUTConnect or disconnect input buffer
Connect0Connect input buffer
Disconnect1Disconnect input buffer
CRWPULLPull configuration
Disabled0No pull
Pulldown1Pull down on pin
Pullup3Pull up on pin
DRWDRIVEDrive configuration
SOS10Standard '0', standard '1'
HOS11High drive '0', standard '1'
SOH12Standard '0', high drive '1'
HOH13High drive '0', high 'drive '1''
DOS14Disconnect '0' standard '1' (normally used for wired-or connections)
IdRWFieldValue IdValueDescription
D0H15Disconnect '0', high drive '1' (normally used for wired-or connections)
S0D16Standard '0'. disconnect '1' (normally used for wired-and connections)
H0D17High drive '0', disconnect '1' (normally used for wired-and connections)
ERWSENSEPin sensing mechanism
Disabled0Disabled
High2Sense for high level
Low3Sense for low level

20.3.41 PIN_CNF[31]

Address offset: 0x77C

Configuration of GPIO pins

Bit number313029282726252423222120191817161514131211109876543210
IdE
Reset 0x000000020
IdRWFieldValue IdValue
ARWDIR
Input0
Output1
BRWINPUT
Connect0
Disconnect1
CRWPULL
Disabled0
Pulldown1
Pullup3
DRWDRIVE
SOS10
HOS11
SOH12
HOH13
DOS14
DOH15
SOD16
HOD17
ERWSENSE
Disabled0
High2
Low3

20.4 Electrical specification

20.4.1 GPIO Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$V_{IH}$ Input high voltage0.7 x VDDVDDV
$V_{IL}$ Input low voltageVSS0.3 x VDDV
$V_{OH,SD}$ Output high voltage, standard drive, 0.5 mA, VDD ≥1.7VDD-0.4VDDV
$V_{OH,HDH}$ Output high voltage, high drive, 5 mA, VDD >= 2.7 VVDD-0.4VDDV
$V_{OH,HDL}$ Output high voltage, high drive, 3 mA, VDD >= 1.7 VVDD-0.4VDDV
$V_{OL,SD}$ Output low voltage, standard drive, 0.5 mA, VDD ≥1.7VSSVSS+0.4V
$V_{OL,HDH}$ Output low voltage, high drive, 5 mA, VDD >= 2.7 VVSSVSS+0.4V
$V_{OL,HDL}$ Output low voltage, high drive, 3 mA, VDD >= 1.7 VVSSVSS+0.4V
$I_{OL,SD}$ Current at VSS+0.4 V, output set low, standard drive, VDD ≥1.7124mA
$I_{OL,HDH}$ Current at VSS+0.4 V, output set low, high drive, VDD >= 2.7 V61015mA
$I_{OL,HDL}$ Current at VSS+0.4 V, output set low, high drive, VDD >= 1.7 V3mA
$I_{OH,SD}$ Current at VDD-0.4 V, output set high, standard drive, VDD ≥1.7124mA
$I_{OH,HDH}$ Current at VDD-0.4 V, output set high, high drive, VDD >= 2.7 V6914mA
$I_{OH,HDL}$ Current at VDD-0.4 V, output set high, high drive, VDD >= 1.7 V3mA
$t_{RF,15pF}$ Rise/fall time, low drive mode, 10-90%, 15 pF load $^{1}$ 9ns
$t_{RF,25pF}$ Rise/fall time, low drive mode, 10-90%, 25 pF load $^{1}$ 13ns
$t_{RF,50pF}$ Rise/fall time, low drive mode, 10-90%, 50 pF load $^{1}$ 25ns
$t_{HRF,15pF}$ Rise/Fall time, high drive mode, 10-90%, 15 pF load $^{1}$ 4ns
$t_{HRF,25pF}$ Rise/Fall time, high drive mode, 10-90%, 25 pF load $^{1}$ 5ns
$t_{HRF,50pF}$ Rise/Fall time, high drive mode, 10-90%, 50 pF load $^{1}$ 8ns
$R_{PU}$ Pull-up resistance111316kΩ
$R_{PD}$ Pull-down resistance111316kΩ
$C_{PAD}$ Pad capacitance3pF
$C_{PAD\_NFC}$ Pad capacitance on NFC pads4pF
$I_{NFC\_LEAK}$ Leakage current between NFC pads when driven to different states210μA

The current drawn from the battery when GPIO is active as an output is calculated as follows:

$$
I _ {G P I O} = V _ {D D} C _ {l o a d} f
$$

$\mathsf { C } _ { \mathsf { l o a d } }$ being the load capacitance and “f” is the switching frequency.


Figure 25: GPIO drive strength vs Voltage, standard drive, VDD = 3.0 V


Figure 26: GPIO drive strength vs Voltage, high drive, VDD = 3.0 V


Figure 27: Max sink current vs Voltage, standard drive

To ensure optimal performance, it is not recommended to sink/source more than 15 mA combined from the GPIO pins.

Figure 28: Max sink current vs Voltage, high drive


Figure 29: Rise and fall time vs Temperature, 10%-90%, 25pF load capacitance, VDD = 3.0 V

21 GPIOTE — GPIO tasks and events

The GPIO tasks and events (GPIOTE) module provides functionality for accessing GPIO pins using tasks and events. Each GPIOTE channel can be assigned to one pin.

A GPIOTE block enables GPIOs to generate events on pin state change which can be used to carry out tasks through the PPI system. A GPIO can also be driven to change state on system events using the PPI system. Low power detection of pin state changes is possible when in System ON or System OFF.

Table 33: GPIOTE properties

InstanceNumber of GPIOTE channels
GPIOTE8

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

21.1 Pin events and tasks

The GPIOTE module has a number of tasks and events that can be configured to operate on individual GPIO pins.

The tasks (SET[n], CLR[n] and OUT[n]) can be used for writing to individual pins, and the events (IN[n]) can be generated from changes occurring at the inputs of individual pins.

The SET task will set the pin selected in CONFIG[n].PSEL to high.

The CLR task will set the pin low.

The effect of the OUT task on the pin is configurable in CONFIG[n].POLARITY , and can either set the pin high, set it low, or toggle it.

The tasks and events are configured using the CONFIG[n] registers. Every set of SET, CLR and OUT[n] tasks and IN[n] events has one CONFIG[n] register associated with it.

As long as a SET[n], CLR[n] and OUT[n] task or an IN[n] event is configured to control a pin n, the pin's output value will only be updated by the GPIOTE module. The pin's output value as specified in the GPIO will therefore be ignored as long as the pin is controlled by GPIOTE. Attempting to write a pin as a normal GPIO pin will have no effect. When the GPIOTE is disconnected from a pin, see MODE field in CONFIG[n] register, the associated pin will get the output and configuration values specified in the GPIO module.

When conflicting tasks are triggered simultaneously (i.e. during the same clock cycle) in one channel, the precedence of the tasks will be as described in Table 34: Task priorities on page 161.

Table 34: Task priorities

PriorityTask
1OUT
2CLR
3SET

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].

21.2 Port event

PORT is an event that can be generated from multiple input pins using the GPIO DETECT signal.

The event will be generated on the rising edge of the DETECT signal. See GPIO — General purpose input/ output on page 114 for more information about the DETECT signal.

Putting the system into System ON IDLE while DETECT is high will not cause DETECT to wake the system up again. Make sure to clear all DETECT sources before entering sleep. If the LATCH register is used as a source, if any bit in LATCH is still high after clearing all or part of the register (for instance due to one of the PINx.DETECT signal still high), a new rising edge will be generated on DETECT, see Pin configuration on page 114.

Trying to put the system to System OFF while DETECT is high will cause a wakeup from System OFF reset.

This feature is always enabled although the peripheral itself appears to be IDLE, that is, no clocks or other power intensive infrastructure have to be requested to keep this feature enabled. This feature can therefore be used to wake up the CPU from a WFI or WFE type sleep in System ON with all peripherals and the CPU idle, that is, lowest power consumption in System ON mode.

In order to prevent spurious interrupts from the PORT event while configuring the sources, the user shall first disable interrupts on the PORT event (through INTENCLR.PORT), then configure the sources (PIN_CNF[n].SENSE), clear any potential event that could have occurred during configuration (write '1' to EVENTS_PORT), and finally enable interrupts (through INTENSET.PORT).

21.3 Tasks and events pin configuration

Each GPIOTE channel is associated with one physical GPIO pin through the CONFIG.PSEL field.

When Event mode is selected in CONFIG.MODE, the pin specified by CONFIG.PSEL will be configured as an input, overriding the DIR setting in GPIO. Similarly, when Task mode is selected in CONFIG.MODE, the pin specified by CONFIG.PSEL will be configured as an output overriding the DIR setting and OUT value in GPIO. When Disabled is selected in CONFIG.MODE, the pin specified by CONFIG.PSEL will use its configuration from the PIN[n].CNF registers in GPIO.

Only one GPIOTE channel can be assigned to one physical pin. Failing to do so may result in unpredictable behavior.

21.4 Registers

Table 35: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40006000GPIOTEGPIOTEGPIO Tasks and Events

Table 36: Register Overview

RegisterOffsetDescription
TASKS_OUT[0]0x000Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is configured in CONFIG[0].POLARITY.
TASKS_OUT[1]0x004Task for writing to pin specified in CONFIG[1].PSEL. Action on pin is configured in CONFIG[1].POLARITY.
TASKS_OUT[2]0x008Task for writing to pin specified in CONFIG[2].PSEL. Action on pin is configured in CONFIG[2].POLARITY.
TASKS_OUT[3]0x00CTask for writing to pin specified in CONFIG[3].PSEL. Action on pin is configured in CONFIG[3].POLARITY.
TASKS_OUT[4]0x010Task for writing to pin specified in CONFIG[4].PSEL. Action on pin is configured in CONFIG[4].POLARITY.
TASKS_OUT[5]0x014Task for writing to pin specified in CONFIG[5].PSEL. Action on pin is configured in CONFIG[5].POLARITY.
TASKS_OUT[6]0x018Task for writing to pin specified in CONFIG[6].PSEL. Action on pin is configured in CONFIG[6].POLARITY.
TASKS_OUT[7]0x01CTask for writing to pin specified in CONFIG[7].PSEL. Action on pin is configured in CONFIG[7].POLARITY.
TASKS_SET[0]0x030Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it high.
TASKS_SET[1]0x034Task for writing to pin specified in CONFIG[1].PSEL. Action on pin is to set it high.
TASKS_SET[2]0x038Task for writing to pin specified in CONFIG[2].PSEL. Action on pin is to set it high.
TASKS_SET[3]0x03CTask for writing to pin specified in CONFIG[3].PSEL. Action on pin is to set it high.
TASKS_SET[4]0x040Task for writing to pin specified in CONFIG[4].PSEL. Action on pin is to set it high.
TASKS_SET[5]0x044Task for writing to pin specified in CONFIG[5].PSEL. Action on pin is to set it high.
TASKS_SET[6]0x048Task for writing to pin specified in CONFIG[6].PSEL. Action on pin is to set it high.
TASKS_SET[7]0x04CTask for writing to pin specified in CONFIG[7].PSEL. Action on pin is to set it high.
TASKS_CLR[0]0x060Task for writing to pin specified in CONFIG[0].PSEL. Action on pin is to set it low.
TASKS_CLR[1]0x064Task for writing to pin specified in CONFIG[1].PSEL. Action on pin is to set it low.
TASKS_CLR[2]0x068Task for writing to pin specified in CONFIG[2].PSEL. Action on pin is to set it low.
TASKS_CLR[3]0x06CTask for writing to pin specified in CONFIG[3].PSEL. Action on pin is to set it low.
TASKS_CLR[4]0x070Task for writing to pin specified in CONFIG[4].PSEL. Action on pin is to set it low.
TASKS_CLR[5]0x074Task for writing to pin specified in CONFIG[5].PSEL. Action on pin is to set it low.
TASKS_CLR[6]0x078Task for writing to pin specified in CONFIG[6].PSEL. Action on pin is to set it low.
TASKS_CLR[7]0x07CTask for writing to pin specified in CONFIG[7].PSEL. Action on pin is to set it low.
EVENTS_IN[0]0x100Event generated from pin specified in CONFIG[0].PSEL
EVENTS_IN[1]0x104Event generated from pin specified in CONFIG[1].PSEL
EVENTS_IN[2]0x108Event generated from pin specified in CONFIG[2].PSEL
EVENTS_IN[3]0x10CEvent generated from pin specified in CONFIG[3].PSEL
EVENTS_IN[4]0x110Event generated from pin specified in CONFIG[4].PSEL
EVENTS_IN[5]0x114Event generated from pin specified in CONFIG[5].PSEL
EVENTS_IN[6]0x118Event generated from pin specified in CONFIG[6].PSEL
EVENTS_IN[7]0x11CEvent generated from pin specified in CONFIG[7].PSEL
EVENTS_PORT0x17CEvent generated from multiple input GPIO pins with SENSE mechanism enabled
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
CONFIG[0]0x510Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[1]0x514Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[2]0x518Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[3]0x51CConfiguration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[4]0x520Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[5]0x524Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[6]0x528Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event
CONFIG[7]0x52CConfiguration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

21.4.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWINOWrite '1' to Enable interrupt for IN[0] event
Bit number313029282726252423222120191817161514131211109876543210
IdIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_IN[0]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWIN1Write '1' to Enable interrupt for IN[1] event
See EVENTS_IN[1]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWIN2Write '1' to Enable interrupt for IN[2] event
See EVENTS_IN[2]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWIN3Write '1' to Enable interrupt for IN[3] event
See EVENTS_IN[3]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWIN4Write '1' to Enable interrupt for IN[4] event
See EVENTS_IN[4]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWIN5Write '1' to Enable interrupt for IN[5] event
See EVENTS_IN[5]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWIN6Write '1' to Enable interrupt for IN[6] event
See EVENTS_IN[6]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWIN7Write '1' to Enable interrupt for IN[7] event
See EVENTS_IN[7]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRWPORTWrite '1' to Enable interrupt for PORT event
See EVENTS_PORT
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

21.4.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWIN0
Clear1
Disabled0
Enabled1
BRWIN1
Clear1
Disabled0
Enabled1
CRWIN2
Clear1
Disabled0
Enabled1
DRWIN3
Clear1Disable
Disabled0
Enabled1Read: Disabled
ERWIN4Write '1' to Disable interrupt for IN[3] event
Clear1See EVENTS_IN[3]
Disabled0
Enabled1Read: Enabled
FRWIN5Write '1' to Disable interrupt for IN[4] event
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWIN6Write '1' to Disable interrupt for IN[5] event
See EVENTS_IN[5]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWIN7Write '1' to Disable interrupt for IN[6] event
See EVENTS_IN[6]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRWPORTWrite '1' to Disable interrupt for PORT event
See EVENTS_PORT
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

21.4.3 CONFIG[0]

Address offset: 0x510

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
DRWOUTINIT
Low0
High1

21.4.4 CONFIG[1]

Address offset: 0x514

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWPSEL[0..31]
CRWPOLARITY
Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity.
Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin.
Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin.
Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin.
When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect.
Task mode: Initial value of pin before task triggering is low
Task mode: Initial value of pin before task triggering is high

21.4.5 CONFIG[2]

Address offset: 0x518

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
DRWOUTINIT
Low0
High1

21.4.6 CONFIG[3]

Address offset: 0x51C

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
DRWOUTINIT
Low0
High1

21.4.7 CONFIG[4]

Address offset: 0x520

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
DRWOUTINIT
Low0
High1

21.4.8 CONFIG[5]

Address offset: 0x524

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWPSEL[0..31]
CRWPOLARITY
Task mode: No effect on pin from OUT[n] task. Event mode: no IN[n] event generated on pin activity.
Task mode: Set pin from OUT[n] task. Event mode: Generate IN[n] event when rising edge on pin.
Task mode: Clear pin from OUT[n] task. Event mode: Generate IN[n] event when falling edge on pin.
Task mode: Toggle pin from OUT[n]. Event mode: Generate IN[n] when any change on pin.
When in task mode: Initial value of the output when the GPIOTE channel is configured. When in event mode: No effect.
Task mode: Initial value of pin before task triggering is low
Task mode: Initial value of pin before task triggering is high

21.4.9 CONFIG[6]

Address offset: 0x528

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
DRWOUTINIT
Low0
High1

21.4.10 CONFIG[7]

Address offset: 0x52C

Configuration for OUT[n], SET[n] and CLR[n] tasks and IN[n] event

Bit number313029282726252423222120191817161514131211109876543210
IdD
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Disabled0
Event1
Task3
BRWPSEL[0..31]
CRWPOLARITY
None0
LoToHi1
HiToLo2
Toggle3
DRWOUTINIT
Low0
High1

21.5 Electrical specification

21.5.1 GPIOTE Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{\text{GPIOTE,IN}}$ Run current with 1 or more GPIOTE active channels in Input mode0.10.5μA

22 PPI — Programmable peripheral interconnect

The Programmable peripheral interconnect (PPI) enables peripherals to interact autonomously with each other using tasks and events independent of the CPU. The PPI allows precise synchronization between peripherals when real-time application constraints exist and eliminates the need for CPU activity to implement behavior which can be predefined using PPI.


Figure 30: PPI block diagram

The PPI system has, in addition to the fully programmable peripheral interconnections, a set of channels where the event end point (EEP) and task end points (TEP) are fixed in hardware. These fixed channels can be individually enabled, disabled, or added to PPI channel groups in the same way as ordinary PPI channels.

Table 37: Configurable and fixed PPI channels

InstanceChannelNumber of channelsNumber of groups
PPI0-19206
PPI (fixed)20-3112

The PPI provides a mechanism to automatically trigger a task in one peripheral as a result of an event occurring in another peripheral. A task is connected to an event through a PPI channel. The PPI channel is composed of three end point registers, one EEP and two TEPs. A peripheral task is connected to a TEP using the address of the task register associated with the task. Similarly, a peripheral event is connected to an EEP using the address of the event register associated with the event.

On each PPI channel, the signals are synchronized to the 16 MHz clock, to avoid any internal violation of setup and hold timings. As a consequence, events that are synchronous to the 16 MHz clock will be delayed by one clock period, while other asynchronous events will be delayed by up to one 16 MHz clock period.

Note that shortcuts (as defined in the SHORTS register in each peripheral) are not affected by this 16 MHz synchronization, and are therefore not delayed.

Each TEP implements a fork mechanism that enables a second task to be triggered at the same time as the task specified in the TEP is triggered. This second task is configured in the task end point register in the FORK registers groups, e.g. FORK.TEP[0] is associated with PPI channel CH[0].

There are two ways of enabling and disabling PPI channels:

• Enable or disable PPI channels individually using the CHEN, CHENSET, and CHENCLR registers.

• Enable or disable PPI channels in PPI channel groups through the groups’ ENABLE and DISABLE tasks. Prior to these tasks being triggered, the PPI channel group must be configured to define which PPI channels belongs to which groups.

Note that when a channel belongs to two groups m and n, and CHG[m].EN and CHG[n].DIS occur simultaneously (m and n can be equal or different), EN on that channel has priority.

PPI tasks (for example, CHG[0].EN) can be triggered through the PPI like any other task, which means they can be hooked up to a PPI channel as a TEP. One event can trigger multiple tasks by using multiple channels and one task can be triggered by multiple events in the same way.

22.1 Pre-programmed channels

Some of the PPI channels are pre-programmed. These channels cannot be configured by the CPU, but can be added to groups and enabled and disabled like the general purpose PPI channels. The FORK TEP for these channels are still programmable and can be used by the application.

For a list of pre-programmed PPI channels, see the table below.

Table 38: Pre-programmed channels

ChannelEEPTEP
20TIMER0->EVENTS_COMPARE[0]RADIO->TASKS_TXEN
21TIMER0->EVENTS_COMPARE[0]RADIO->TASKS_RXEN
22TIMER0->EVENTS_COMPARE[1]RADIO->TASKS_DISABLE
23RADIO->EVENTS_BCMATCHAAR->TASKS_START
24RADIO->EVENTS_READYCCM->TASKS_KSGEN
25RADIO->EVENTS_ADDRESSCCM->TASKS_CRYPTO
26RADIO->EVENTS_ADDRESSTIMER0->TASKS_CAPTURE[1]
27RADIO->EVENTS_ENDTIMER0->TASKS_CAPTURE[2]
28RTC0->EVENTS_COMPARE[0]RADIO->TASKS_TXEN
29RTC0->EVENTS_COMPARE[0]RADIO->TASKS_RXEN
30RTC0->EVENTS_COMPARE[0]TIMER0->TASKS_CLEAR
31RTC0->EVENTS_COMPARE[0]TIMER0->TASKS_START

22.2 Registers

Table 39: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4001F000PPIPPIProgrammable Peripheral Interconnect

Table 40: Register Overview

RegisterOffsetDescription
TASKS_CHG[0].EN0x000Enable channel group 0
TASKS_CHG[0].DIS0x004Disable channel group 0
TASKS_CHG[1].EN0x008Enable channel group 1
TASKS_CHG[1].DIS0x00CDisable channel group 1
TASKS_CHG[2].EN0x010Enable channel group 2
TASKS_CHG[2].DIS0x014Disable channel group 2
TASKS_CHG[3].EN0x018Enable channel group 3
TASKS_CHG[3].DIS0x01CDisable channel group 3
TASKS_CHG[4].EN0x020Enable channel group 4
TASKS_CHG[4].DIS0x024Disable channel group 4
TASKS_CHG[5].EN0x028Enable channel group 5
TASKS_CHG[5].DIS0x02CDisable channel group 5
CHEN0x500Channel enable register
CHENSET0x504Channel enable set register
CHENCLR0x508Channel enable clear register
CH[0].EEP0x510Channel 0 event end-point
CH[0].TEP0x514Channel 0 task end-point
CH[1].EEP0x518Channel 1 event end-point
CH[1].TEP0x51CChannel 1 task end-point
CH[2].EEP0x520Channel 2 event end-point
CH[2].TEP0x524Channel 2 task end-point
CH[3].EEP0x528Channel 3 event end-point
CH[3].TEP0x52CChannel 3 task end-point
CH[4].EEP0x530Channel 4 event end-point
CH[4].TEP0x534Channel 4 task end-point
CH[5].EEP0x538Channel 5 event end-point
CH[5].TEP0x53CChannel 5 task end-point
CH[6].EEP0x540Channel 6 event end-point
CH[6].TEP0x544Channel 6 task end-point
CH[7].EEP0x548Channel 7 event end-point
CH[7].TEP0x54CChannel 7 task end-point
CH[8].EEP0x550Channel 8 event end-point
CH[8].TEP0x554Channel 8 task end-point
CH[9].EEP0x558Channel 9 event end-point
CH[9].TEP0x55CChannel 9 task end-point
CH[10].EEP0x560Channel 10 event end-point
CH[10].TEP0x564Channel 10 task end-point
CH[11].EEP0x568Channel 11 event end-point
CH[11].TEP0x56CChannel 11 task end-point
CH[12].EEP0x570Channel 12 event end-point
CH[12].TEP0x574Channel 12 task end-point
CH[13].EEP0x578Channel 13 event end-point
CH[13].TEP0x57CChannel 13 task end-point
CH[14].EEP0x580Channel 14 event end-point
CH[14].TEP0x584Channel 14 task end-point
CH[15].EEP0x588Channel 15 event end-point
CH[15].TEP0x58CChannel 15 task end-point
CH[16].EEP0x590Channel 16 event end-point
CH[16].TEP0x594Channel 16 task end-point
CH[17].EEP0x598Channel 17 event end-point
CH[17].TEP0x59CChannel 17 task end-point
CH[18].EEP0x5A0Channel 18 event end-point
CH[18].TEP0x5A4Channel 18 task end-point
CH[19].EEP0x5A8Channel 19 event end-point
CH[19].TEP0x5ACChannel 19 task end-point
CHG[0]0x800Channel group 0
CHG[1]0x804Channel group 1
CHG[2]0x808Channel group 2
CHG[3]0x80CChannel group 3
CHG[4]0x810Channel group 4
CHG[5]0x814Channel group 5
FORK[0].TEP0x910Channel 0 task end-point
FORK[1].TEP0x914Channel 1 task end-point
FORK[2].TEP0x918Channel 2 task end-point
FORK[3].TEP0x91CChannel 3 task end-point
FORK[4].TEP0x920Channel 4 task end-point
FORK[5].TEP0x924Channel 5 task end-point
FORK[6].TEP0x928Channel 6 task end-point
FORK[7].TEP0x92CChannel 7 task end-point
FORK[8].TEP0x930Channel 8 task end-point
FORK[9].TEP0x934Channel 9 task end-point
FORK[10].TEP0x938Channel 10 task end-point
FORK[11].TEP0x93CChannel 11 task end-point
FORK[12].TEP0x940Channel 12 task end-point
FORK[13].TEP0x944Channel 13 task end-point
FORK[14].TEP0x948Channel 14 task end-point
FORK[15].TEP0x94CChannel 15 task end-point
FORK[16].TEP0x950Channel 16 task end-point
FORK[17].TEP0x954Channel 17 task end-point
FORK[18].TEP0x958Channel 18 task end-point
FORK[19].TEP0x95CChannel 19 task end-point
FORK[20].TEP0x960Channel 20 task end-point
FORK[21].TEP0x964Channel 21 task end-point
FORK[22].TEP0x968Channel 22 task end-point
FORK[23].TEP0x96CChannel 23 task end-point
FORK[24].TEP0x970Channel 24 task end-point
FORK[25].TEP0x974Channel 25 task end-point
FORK[26].TEP0x978Channel 26 task end-point
FORK[27].TEP0x97CChannel 27 task end-point
FORK[28].TEP0x980Channel 28 task end-point
FORK[29].TEP0x984Channel 29 task end-point
FORK[30].TEP0x988Channel 30 task end-point
FORK[31].TEP0x98CChannel 31 task end-point

22.2.1 CHEN

Address offset: 0x500

Channel enable register

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Disabled0
Enabled1
BRWCH1
Disabled0
Enabled1Enable channel
CRWCH2
Disabled0
Enabled1
DRWCH3
Disabled0
Enabled1
ERWCH4
Disabled0
Enabled1
FRWCH5
Disabled0
Enabled1
GRWCH6
Disabled0
Enabled1Enable channel
HRWCH7
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Disabled0Disable channel
Enabled1Enable channel
IRWCH8Enable or disable channel 8
Disabled0Disable channel
Enabled1Enable channel
JRWCH9Enable or disable channel 9
Disabled0Disable channel
Enabled1Enable channel
KRWCH10Enable or disable channel 10
Disabled0Disable channel
Enabled1Enable channel
LRWCH11Enable or disable channel 11
Disabled0Disable channel
Enabled1Enable channel
MRWCH12Enable or disable channel 12
Disabled0Disable channel
Enabled1Enable channel
NRWCH13Enable or disable channel 13
Disabled0Disable channel
Enabled1Enable channel
ORWCH14Enable or disable channel 14
Disabled0Disable channel
Enabled1Enable channel
PRWCH15Enable or disable channel 15
Disabled0Disable channel
Enabled1Enable channel
QRWCH16Enable or disable channel 16
Disabled0Disable channel
Enabled1Enable channel
RRWCH17Enable or disable channel 17
Disabled0Disable channel
Enabled1Enable channel
SRWCH18Enable or disable channel 18
Disabled0Disable channel
Enabled1Enable channel
TRWCH19Enable or disable channel 19
Disabled0Disable channel
Enabled1Enable channel
URWCH20Enable or disable channel 20
Disabled0Disable channel
Enabled1Enable channel
VRWCH21Enable or disable channel 21
Disabled0Disable channel
Enabled1Enable channel
WRWCH22Enable or disable channel 22
Disabled0Disable channel
Enabled1Enable channel
XRWCH23Enable or disable channel 23
Disabled0Disable channel
Enabled1Enable channel
YRWCH24Enable or disable channel 24
Disabled0Disable channel
Enabled1Enable channel
ZRWCH25Enable or disable channel 25
Disabled0Disable channel
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Enabled1
aRWCH26
Disabled0
Enabled1
bRWCH27
Disabled0
Enabled1
cRWCH28
Disabled0
Enabled1Enable channel
dRWCH29
Disabled0Disable channel
Enabled1Enable channel
eRWCH30
Disabled0Disable channel
Enabled1
fRWCH31
Disabled0Disable channel
Enabled1Enable channel

22.2.2 CHENSET

Address offset: 0x504

Channel enable set register

Read: reads value of CH{i} field in CHEN register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Disabled0
Enabled1
Set1
BRWCH1
Disabled0
Enabled1
Set1
CRWCH2
Disabled0
Enabled1Write: Enable channel
Set1
DRWCH3Channel 3 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Write: Enable channel
Set1
ERWCH4Channel 4 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Write: Enable channel Channel 5 enable set register. Writing '0' has no effect
Set1
FRWCH5Read: channel enabled
Disabled0Write: Enable channel Channel 5 enable set register. Writing '0' has no effect
Enabled1
Set1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000000000000000000000WCH6Value Id
Set1
GRWCH6
DisabledRead: channel disabled
EnabledWrite: Enable channelChannel 7 enable set register. Writing '0' has no effectChannel 8 enable set register. Writing '0' has no effectChannel 9 enable set register. Writing '0' has no effectChannel 10 enable set register. Writing '0' has no effectChannel 11 enable set register. Writing '0' has no effectChannel 12 enable set register. Writing '0' has no effectChannel 13 enable set register. Writing '0' has no effectChannel 14 enable set register. Writing '0' has no effectChannel 15 enable set register. Writing '0' has no effectChannel 16 enable set register. Writing '0' has no effectChannel 17 enable set register. Writing '0' has no effectChannel 18 enable set register. Writing '0' has no effectChannel 19 enable set register. Writing '0' has no effectChannel 20 enable set register. Writing '0' has no effectChannel 21 enable set register. Writing '0' has no effectChannel 22 enable set register. Writing '0' has no effectChannel 23 enable set register. Writing '0' has no effectChannel 24 enable set register. Writing '0' has no effectChannel 25 enable set register. Writing '0' has no effectChannel 26 enable set register. Writing '0' has no effectChannel 27 enable set register. Writing '0' has no effectChannel 28 enable set register. Writing '0' has no effectChannel 29 enable set register. Writing '0' has no effectChannel 30 enable set register. Writing '0' has no effectChannel 32 enable set register. Writing '0' has no effectChannel 34 enable set register. Writing '0' has no effectChannel 36 enable set register. Writing '0' has no effectChannel 38 enable set register. Writing '0' has no effectChannel 40 enable set register. Writing '0' has no effectChannel 42 enable set register. Writing '0' has no effectChannel 44 enable set register. Writing '0' has no effectChannel 46 enable set register. Writing '0' has no effectChannel 48 enable set register. Writing '0' has no effectChannel 50 enable set register. Writing '0' has no effectChannel 52 enable set register. Writing '0' has no effectChannel 54 enable set register. Writing '0' has no effectChannel 56 enable set register. Writing '0' has no effectChannel 58 enable set register. Writing '0' has no effectChannel 60 enable set register. Writing '0' has no effectChannel 62 enable set register. Writing '0' has no effectChannel 64 enable set register. Writing '0' has no effectChannel 66 enable set register. Writing '0' has no effectChannel 68 enable set register. Writing '0' has no effectChannel 70 enable set register. Writing '0' has no effectChannel 72 enable set register. Writing '0' has no effectChannel 74 enable set register. Writing '0' has no effectChannel 76 enable set register. Writing '0' has no effectChannel 78 enable set register. Writing '0' has no effectChannel 80 enable set register. Writing '0' has no effectChannel 82 enable set register. Writing '0' has no effectChannel 84 enable set register. Writing '0' has no effectChannel 86 enable set register. Writing '0' has no effectChannel 88 enable set register. Writing '0' has no effectChannel 90 enable set register. Writing '0' has no effectChannel 92 enable set register. Writing '0' has no effectChannel 94 enable set register. Writing '0' has no effectChannel 96 enable set register. Writing '0' has no effectChannel 98 enable set register. Writing '0' has no effectChannel 100 enable set register. Writing '0' has no effectChannel 102 enable set register. Writing '0' has no effectChannel 104 enable set register. Writing '0' has no effectChannel 108 enable set register. Writing '0' has no effectChannel 110 enable set register. Writing '0' has no effectChannel 112 enable set register. Writing '0' has no effectChannel 114 enable set register. Writing '0' has no effectChannel 116 enable set register. Writing '0' has no effectChannel 118 enable set register. Writing '0' has no effectChannel 120 enable set register. Writing '0' has no effectChannel 122 enable set register. Writing '0' has no effectChannel 124 enable set register. Writing '0' has no effectChannel 126 enable set register. Writing '0' has no effectChannel 128 enable set register. Writing '0' has no effectChannel 130 enable set register. Writing '0' has no effectChannel 132 enable set register. Writing '0' has no effectChannel 134 enable set register. Writing '0' has no effectChannel 136 enable set register. Writing '0' has no effectChannel 138 enable set register. Writing '0' has no effectChannel 140 enable set register. Writing '0' has no effectChannel 142 enable set register. Writing '0' has no effectChannel 144 enable set register. Writing '0' has no effectChannel 146 enable set register. Writing '0' has no effectChannel 148 enable set register. Writing '0' has no effectChannel 150 enable set register. Writing '0' has no effectChannel 152 enable set register. Writing '0' has no effectChannel 154 enable set register. Writing '0' has no effectChannel 156 enable set register. Writing '0' has no effectChannel 158 enable set register. Writing '0' has no effectChannel 160 enable set register. Writing '0' has no effectChannel 162 enable set register. Writing '0' has no effectChannel 164 enable set register. Writing '0' has no effectChannel 166 enable set register. Writing '0' has no effectChannel 168 enable set register. Writing '0' has no effectChannel 170 enable set register. Writing '0' has no effectChannel 172 enable set register. Writing '0' has no effectChannel 174 enable set register. Writing '0' has no effectChannel 176 enable set register. Writing '0' has no effectChannel 178 enable set register. Writing '0' has no effectChannel 180 enable set register. Writing '0' has no effectChannel 182 enable set register. Writing '0' has no effectChannel 184 enable set register. Writing '0' has no effectChannel 186 enable set register. Writing '0' has no effectChannel 188 enable set register. Writing '0' has no effectChannel 190 enable set register. Writing '0' has no effectChannel 192 enable set register. Writing '0' has no effectChannel 194 enable set register. Writing '0' has no effectChannel 196 enable set register. Writing '0' has no effectChannel 198 enable set register. Writing '0' has no effectChannel 200 enable set register. Writing '0' has no effectChannel 202 enable set register. Writing '0' has no effectChannel 204 enable set register. Writing '0' has no effectChannel 206 enable set register. Writing '0' has no effectChannel 208 enable set register. Writing '0' has no effectChannel 210 enable set register. Writing '0' has no effectChannel 212 enable set register. Writing '0' has no effectChannel 214 enable set register. Writing '0' has no effectChannel 216 enable set register. Writing '0' has no effectChannel 218 enable set register. Writing '0' has no effectChannel 220 enable set register. Writing '0' has no effectChannel 222 enable set register. Writing '0' has no effectChannel 224 enable set register. Writing '0' has no effectChannel 226 enable set register. Writing '0' has no effectChannel 228 enable set register. Writing '0' has no effectChannel 230 enable set register. Writing '0' has no effectChannel 232 enable set register. Writing '0' has no effectChannel 234 enable set register. Writing '0' has no effectChannel 236 enable set register. Writing '0' has no effectChannel 238 enable set register. Writing '0' has no effectChannel 240 enable set register. Writing '0' has no effectChannel 242 enable set register. Writing '0' has no effectChannel 244 enable set register. Writing '0' has no effectChannel 246 enable set register. Writing '0' has no effectChannel 248 enable set register. Writing '0' has no effectChannel 250 enable set register. Writing '0' has no effectChannel 252 enable set register. Writing '0' has no effectChannel 254 enable set register. Writing '0' has no effectChannel 256 enable set register. Writing '0' has no effectChannel 258 enable set register. Writing '0' has no effectChannel 260 enable set register. Writing '0' has no effectChannel 262 enable set register. Writing '0' has no effectChannel 264 enable set register. Writing '0' has no effectChannel 266 enable set register. Writing '0' has no effectChannel 268 enable set register. Writing '0' has no effectChannel 270 enable set register. Writing '0' has no effectChannel 272 enable set register. Writing '0' has no effectChannel 274 enable set register. Writing '0' has no effectChannel 276 enable set register. Writing '0' has no effectChannel 278 enable set register. Writing '0' has no effectChannel 280 enable set register. Writing '0' has no effectChannel 282 enable set register. Writing '0' has no effectChannel 284 enable set register. Writing '0' has no effectChannel 286 enable set register. Writing '0' has no effectChannel 288 enable set register. Writing '0' has no effectChannel 290 enable set register. Writing '0' has no effectChannel 292 enable set register. Writing '0' has no effectChannel 294 enable set register. Writing '0' has no effectChannel 296 enable set register. Writing '0' has no effectChannel 298 enable set register. Writing '0' has no effectChannel 300 enable set register. Writing '0' has no effectChannel 302 enable set register. Writing '0' has no effectChannel 304 enable set register. Writing '0' has no effectChannel 306 enable set register. Writing '0' has no effectChannel 308 enable set register. Writing '0' has no effectChannel 310 enable set register. Writing '0' has no effectChannel 312 enable set register. Writing '0' has no effectChannel 314 enable set register. Writing '0' has no effectChannel 316 enable set register. Writing '0' has no effectChannel 318 enable set register. Writing '0' has no effectChannel 320 enable set register. Writing '0' has no effectChannel 322 enable set register. Writing '0' has no effectChannel 324 enable set register. Writing '0' has no effectChannel 326 enable set register. Writing '0' has no effectChannel 328 enable set register. Writing '0' has no effectChannel 330 enable set register. Writing '0' has no effectChannel 332 enable set register. Writing '0' has no effectChannel 334 enable set register. Writing '0' has no effectChannel 336 enable set register. Writing '0' has no effectChannel 338 enable set register. Writing '0' has no effectChannel 340 enable set register. Writing '0' has no effectChannel 342 enable set register. Writing '0' has no effectChannel 344 enable set register. Writing '0' has no effectChannel 346 enable set register. Writing '0' has no effectChannel 348 enable set register. Writing '0' has no effectChannel 350 enable set register. Writing '0' has no effectChannel 352 enable set register. Writing '0' has no effectChannel 354 enable set register. Writing '0' has no effectChannel 356 enable set register. Writing '0' has no effectChannel 358 enable set register. Writing '0' has no effectChannel 360 enable set register. Writing '0' has no effectChannel 362 enable set register. Writing '0' has no effectChannel 364 enable set register. Writing '0' has no effectChannel 366 enable set register. Writing '0' has no effectChannel 368 enable set register. Writing '0' has no effectChannel 370 enable set register. Writing '0' has no effectChannel 372 enable set register. Writing '0' has no effectChannel 374 enable set register. Writing '0' has no effectChannel 376 enable set register. Writing '0' has no effectChannel 378 enable set register. Writing '0' has no effectChannel 380 enable set register. Writing '0' has no effectChannel 382 enable set register. Writing '0' has no effectChannel 384 enable set register. Writing '0' has no effectChannel 386 enable set register. Writing '0' has no effectChannel 388 enable set register. Writing '0' has no effectChannel 390 enable set register. Writing '0' has no effectChannel 392 enable set register. Writing '0' has no effectChannel 394 enable set register. Writing '0' has no effectChannel 396 enable set register. Writing '0' has no effectChannel 398 enable set register. Writing '0' has no effectChannel 400 enable set register. Writing '0' has no effectChannel 402 enable set register. Writing '0' has no effectChannel 404 enable set register. Writing '0' has no effectChannel 406 enable set register. Writing '0' has no effectChannel 408 enable set register. Writing '0' has no effectChannel 410 enable set register. Writing '0' has no effectChannel 412 enable set register. Writing '0' has no effectChannel 414 enable set register. Writing '0' has no effectChannel 416 enable set register. Writing '0' has no effectChannel 418 enable set register. Writing '0' has no effectChannel 420 enable set register. Writing '0' has no effectChannel 422 enable set register. Writing '0' has no effectChannel 424 enable set register. Writing '0' has no effectChannel 426 enable set register.
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Set1Write: Enable channel
URWCH20Channel 20 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Set1Write: Enable channel
VRWCH21Channel 21 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Set1Write: Enable channel
WRWCH22Channel 22 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Set1Write: Enable channel
XRWCH23Channel 23 enable set register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Set1Write: Enable channel

22.2.3 CHENCLR

Address offset: 0x508

Channel enable clear register

Read: reads value of CH{i} field in CHEN register.

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Disabled0
Enabled1
Clear1
BRWCH1
Disabled0
Enabled1
Clear1
CRWCH2
Disabled0
Enabled1Read: channel disabled
Clear1Write: disable channel
DRWCH3Channel 3 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
ERWCH4Channel 4 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
FRWCH5Channel 5 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
GRWCH6Channel 6 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
HRWCH7Channel 7 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
IRWCH8Channel 8 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabledWrite: disable channel
Clear1
JRWCH9Channel 9 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
KRWCH10Channel 10 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
LRWCH11Channel 11 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
MRWCH12Channel 12 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
NRWCH13Channel 13 enable clear register. Writing '0' has no effect
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
idRWFieldValue IdValueDescription
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
ORWCH14Channel 14 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
PRWCH15Channel 15 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
QRWCH16Channel 16 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
RRWCH17Channel 17 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
SRWCH18Channel 18 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
TRWCH19Channel 19 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
URWCH20Channel 20 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
VRWCH21Channel 21 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
WRWCH22Channel 22 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
XRWCH23Channel 23 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
YRWCH24Channel 24 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
ZRWCH25Channel 25 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
aRWCH26Channel 26 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Read: channel enabled
Clear1Write: disable channel
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
bRWCH27
Disabled0
Enabled1
Clear1
cRWCH28
Disabled0
Enabled1
Clear1
dRWCH29
Disabled0
Enabled1Write: disable channel
Clear1
eRWCH30Channel 30 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Write: disable channel
Clear1
fRWCH31Channel 31 enable clear register. Writing '0' has no effect
Disabled0Read: channel disabled
Enabled1Write: disable channel of channel enabled
Clear1

22.2.4 CH[0].EEP

Address offset: 0x510

Channel 0 event end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.5 CH[0].TEP

Address offset: 0x514

Channel 0 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.6 CH[1].EEP

Address offset: 0x518

Channel 1 event end-point

from the Event group.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.7 CH[1].TEP

Address offset: 0x51C

Channel 1 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.8 CH[2].EEP

Address offset: 0x520

Channel 2 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group.

22.2.9 CH[2].TEP

Address offset: 0x524

Channel 2 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group

22.2.10 CH[3].EEP

Address offset: 0x528

Channel 3 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.11 CH[3].TEP

Address offset: 0x52C

Channel 3 task end-point

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARWFieldValue IdValueDescription
IdRWFieldValue IdDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.12 CH[4].EEP

Address offset: 0x530

Channel 4 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.13 CH[4].TEP

Address offset: 0x534

Channel 4 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group

22.2.14 CH[5].EEP

Address offset: 0x538

Channel 5 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.15 CH[5].TEP

Address offset: 0x53C

Channel 5 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

from the Task group.

22.2.16 CH[6].EEP

Address offset: 0x540

Channel 6 event end-point

from the Event group.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.17 CH[6].TEP

Address offset: 0x544

Channel 6 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.18 CH[7].EEP

Address offset: 0x548

Channel 7 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.19 CH[7].TEP

Address offset: 0x54C

Channel 7 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.20 CH[8].EEP

Address offset: 0x550

Channel 8 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.21 CH[8].TEP

Address offset: 0x554

Channel 8 task end-point

from the Task group.

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000ARWTEPValue IdDescription
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.22 CH[9].EEP

Address offset: 0x558

Channel 9 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.23 CH[9].TEP

Address offset: 0x55C

Channel 9 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.24 CH[10].EEP

Address offset: 0x560

Channel 10 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group.

22.2.25 CH[10].TEP

Address offset: 0x564

Channel 10 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.26 CH[11].EEP

Address offset: 0x568

Channel 11 event end-point

from the Event group.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.27 CH[11].TEP

Address offset: 0x56C

Channel 11 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.28 CH[12].EEP

Address offset: 0x570

Channel 12 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group.

22.2.29 CH[12].TEP

Address offset: 0x574

Channel 12 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group.

22.2.30 CH[13].EEP

Address offset: 0x578

Channel 13 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.31 CH[13].TEP

Address offset: 0x57C

Channel 13 task end-point

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000ARWTEPValue IdDescription
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.32 CH[14].EEP

Address offset: 0x580

Channel 14 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.33 CH[14].TEP

Address offset: 0x584

Channel 14 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group

22.2.34 CH[15].EEP

Address offset: 0x588

Channel 15 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group.

22.2.35 CH[15].TEP

Address offset: 0x58C

Channel 15 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

from the Task group.

22.2.36 CH[16].EEP

Address offset: 0x590

Channel 16 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group

22.2.37 CH[16].TEP

Address offset: 0x594

Channel 16 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.38 CH[17].EEP

Address offset: 0x598

Channel 17 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers from the Event group.

22.2.39 CH[17].TEP

Address offset: 0x59C

Channel 17 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group

22.2.40 CH[18].EEP

Address offset: 0x5A0

Channel 18 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.41 CH[18].TEP

Address offset: 0x5A4

Channel 18 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers from the Task group

22.2.42 CH[19].EEP

Address offset: 0x5A8

Channel 19 event end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEEPPointer to event register. Accepts only addresses to registers

22.2.43 CH[19].TEP

Address offset: 0x5AC

Channel 19 task end-point

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARWFieldValue IdValueDescription
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register. Accepts only addresses to registers

22.2.44 CHG[0]

Address offset: 0x800

Channel group 0

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1
CRWCH2
Excluded0
Included1
DRWCH3
Excluded0
Included1Include or exclude channel 3
ERWCH4
Excluded0
Included1
FRWCH5
Excluded0
Included1
GRWCH6
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Excluded0Exclude
Included1Include
HRWCH7Include or exclude channel 7
Excluded0Exclude
Included1Include
IRWCH8Include or exclude channel 8
Excluded0Exclude
Included1Include
JRWCH9Include or exclude channel 9
Excluded0Exclude
Included1Include
KRWCH10Include or exclude channel 10
Excluded0Exclude
Included1Include
LRWCH11Include or exclude channel 11
Excluded0Exclude
Included1Include
MRWCH12Include or exclude channel 12
Excluded0Exclude
Included1Include
NRWCH13Include or exclude channel 13
Excluded0Exclude
Included1Include
ORWCH14Include or exclude channel 14
Excluded0Exclude
Included1Include
PRWCH15Include or exclude channel 15
Excluded0Exclude
Included1Include
QRWCH16Include or exclude channel 16
Excluded0Exclude
Included1Include
RRWCH17Include or exclude channel 17
Excluded0Exclude
Included1Include
SRWCH18Include or exclude channel 18
Excluded0Exclude
Included1Include
TRWCH19Include or exclude channel 19
Excluded0Exclude
Included1Include
URWCH20Include or exclude channel 20
Excluded0Exclude
Included1Include
VRWCH21Include or exclude channel 21
Excluded0Exclude
Included1Include
WRWCH22Include or exclude channel 22
Excluded0Exclude
Included1Include
XRWCH23Include or exclude channel 23
Excluded0Exclude
Included1Include
YRWCH24Include or exclude channel 24
Excluded0Exclude
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Included1
ZRWCH25
Excluded0
Included1
aRWCH26
Excluded0
Included1
bRWCH27
Excluded0
Included1
cRWCH28
Excluded0
Included1Include or exclude channel 28
dRWCH29
Excluded0Include or exclude channel 29
Included1Include or exclude channel 30
eRWCH30
Excluded0Include or exclude channel 31
Included1Include or exclude channel 32
fRWCH31
Excluded0Exclude
Included1Include or exclude channel 33

22.2.45 CHG[1]

Address offset: 0x804

Channel group 1

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1
CRWCH2
Excluded0
Included1
DRWCH3
Excluded0
Included1Include or exclude channel 3
ERWCH4
Excluded0Exclude or exclude channel 4
Included1Include or exclude channel 5
FRWCH5Exclude or exclude channel 6
Excluded0Exclude or exclude channel 7
Included1Exclude or exclude channel 8
GRWCH6Exclude or exclude channel 9
Excluded0Exclude or exclude channel 10
Included1Exclude or exclude channel 11
HRWCH7Exclude or exclude channel 12
Excluded0Exclude or exclude channel 13
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Included1Include
IRWCH8
Excluded0Exclude
Included1Include
JRWCH9
Excluded0Exclude
Included1Include
KRWCH10
Excluded0Exclude
Included1Include
LRWCH11
Excluded0Exclude
Included1Include
MRWCH12
Excluded0Exclude
Included1Include
NRWCH13
Excluded0Exclude
Included1IncludeInclude or exclude channel 13
ORWCH14
Excluded0Exclude
Included1Include
PRWCH15
Excluded0Exclude
Included1Include
QRWCH16
Excluded0Exclude
Included1Include
RRWCH17
Excluded0Exclude
Included1Include
SRWCH18
Excluded0Exclude
Included1Include
TRWCH19
Excluded0Exclude
Included1Include
URWCH20
Excluded0Exclude
Included1Include
VRWCH21
Excluded0Exclude
Included1Include
WRWCH22
Excluded0Exclude
Included1Include
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
aRWCH26
Excluded0
Included1
bRWCH27
Excluded0
Included1
cRWCH28
Excluded0
Included1
dRWCH29
Excluded0
Included1
eRWCH30
Excluded0
Included1
fRWCH31
Excluded0
Included1Include or exclude channel 31

22.2.46 CHG[2]

Address offset: 0x808

Channel group 2

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1
CRWCH2
Excluded0
Included1Include or exclude channel 2
DRWCH3
Excluded0Exclude
Included1Include or exclude channel 3
ERWCH4Exclude or exclude channel 4
Excluded0Exclude or exclude channel 5
Included1Exclude or exclude channel 6
FRWCH5Exclude or exclude channel 7
Excluded0Exclude or exclude channel 8
Included1Exclude or exclude channel 9
GRWCH6Exclude or exclude channel 10
Excluded0Exclude or exclude channel 11
Included1Exclude or exclude channel 12
HRWCH7Exclude or exclude channel 13
Excluded0Exclude or exclude channel 14
Included1Exclude or exclude channel 15
IRWCH8Exclude or exclude channel 16
Excluded0Exclude or exclude channel 17
Included1Exclude or exclude channel 18
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
JRWCH9
Excluded0
Included1
KRWCH10
Excluded0
Included1Include
LRWCH11
Excluded0
Included1
MRWCH12
Excluded0
Included1
NRWCH13
Excluded0
Included1
ORWCH14
Excluded0
Included1
PRWCH15
Excluded0
Included1
QRWCH16
Excluded0
Included1Include or exclude channel 15
RRWCH17
Excluded0
Included1
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Excluded0
Included1
cRWCH28
Excluded0
Included1
dRWCH29
Excluded0
Included1
eRWCH30
Excluded0
Included1
fRWCH31
Excluded0
Included1

22.2.47 CHG[3]

Address offset: 0x80C

Channel group 3

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1
CRWCH2
Excluded0
Included1Include or exclude channel 2
DRWCH3
Excluded0Exclude
Included1Include or exclude channel 3
ERWCH4Exclude or exclude channel 4
Excluded0Exclude
Included1Include or exclude channel 5
FRWCH5Exclude or exclude channel 6
Excluded0Exclude or exclude channel 7
Included1Exclude or exclude channel 8
GRWCH6Exclude or exclude channel 9
Excluded0Exclude or exclude channel 10
Included1Exclude or exclude channel 11
HRWCH7Exclude or exclude channel 12
Excluded0Exclude or exclude channel 13
Included1Exclude or exclude channel 14
IRWCH8Exclude or exclude channel 15
Excluded0Exclude or exclude channel 16
Included1Exclude or exclude channel 17
JRWCH9Exclude or exclude channel 18
Excluded0Exclude or exclude channel 19
Included1Exclude or exclude channel 20
KRWCH10Include or exclude channel 21
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Excluded0Exclude
Included1Include
LRWCH11Include or exclude channel 11
Excluded0Exclude
Included1Include
MRWCH12Include or exclude channel 12
Excluded0Exclude
Included1Include
NRWCH13Include or exclude channel 13
Excluded0Exclude
Included1Include
ORWCH14Include or exclude channel 14
Excluded0Exclude
Included1Include
PRWCH15Include or exclude channel 15
Excluded0Exclude
Included1Include
QRWCH16Include or exclude channel 16
Excluded0Exclude
Included1Include
RRWCH17Include or exclude channel 17
Excluded0Exclude
Included1Include
SRWCH18Include or exclude channel 18
Excluded0Exclude
Included1Include
TRWCH19Include or exclude channel 19
Excluded0Exclude
Included1Include
URWCH20Include or exclude channel 20
Excluded0Exclude
Included1Include
VRWCH21Include or exclude channel 21
Excluded0Exclude
Included1Include
WRWCH22Include or exclude channel 22
Excluded0Exclude
Included1Include
XRWCH23Include or exclude channel 23
Excluded0Exclude
Included1Include
YRWCH24Include or exclude channel 24
Excluded0Exclude
Included1Include
ZRWCH25Include or exclude channel 25
Excluded0Exclude
Included1Include
aRWCH26Include or exclude channel 26
Excluded0Exclude
Included1Include
bRWCH27Include or exclude channel 27
Excluded0Exclude
Included1Include
cRWCH28Include or exclude channel 28
Excluded0Exclude
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Included1
dRWCH29
Excluded0
Included1
eRWCH30
Excluded0
Included1
fRWCH31
Excluded0
Included1

22.2.48 CHG[4]

Address offset: 0x810

Channel group 4

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1Include or exclude channel 1
CRWCH2
Excluded0
Included1
DRWCH3
Excluded0
Included1
ERWCH4
Excluded0
Included1
FRWCH5
Excluded0
Included1
GRWCH6
Excluded0
Included1
HRWCH7
Excluded0
Included1
IRWCH8
Excluded0
Included1
JRWCH9
Excluded0
Included1
KRWCH10
Excluded0
Included1
LRWCH11
Excluded0
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Included1Include
MRWCH12
Excluded0Exclude
Included1Include
NRWCH13
Excluded0Exclude
Included1Include
ORWCH14
Excluded0Exclude
Included1Include
PRWCH15
Excluded0Exclude
Included1Include
QRWCH16
Excluded0Exclude
Included1Include
RRWCH17
Excluded0Exclude
Included1IncludeInclude or exclude channel 17
SRWCH18
Excluded0Exclude
Included1Include
TRWCH19
Excluded0Exclude
Included1Include
URWCH20
Excluded0Exclude
Included1Include
VRWCH21
Excluded0Exclude
Included1IncludeInclude or exclude channel 21
WRWCH22
Excluded0Exclude
Included1Include
XRWCH23
Excluded0Exclude
Included1Include
YRWCH24
Excluded0Exclude
Included1Include
ZRWCH25
Excluded0Exclude
Included1Include
aRWCH26
Excluded0Exclude
Included1Include
bRWCH27
Excluded0Exclude
Included1Include
cRWCH28
Excluded0Exclude
Included1Include
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
eRWCH30Include or exclude channel 30
Excluded0Exclude
Included1Include
fRWCH31Include or exclude channel 31
Excluded0Exclude
Included1Include

22.2.49 CHG[5]

Address offset: 0x814

Channel group 5

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCH0
Excluded0
Included1
BRWCH1
Excluded0
Included1
CRWCH2
Excluded0
Included1
DRWCH3
Excluded0
Included1Include or exclude channel 2
ERWCH4
Excluded0
Included1Include or exclude channel 3
FRWCH5
Excluded0Include or exclude channel 4
Included1Exclude
GRWCH6Include or exclude channel 5
Excluded0Exclude
Included1Include or exclude channel 6
HRWCH7Include or exclude channel 7
Excluded0Exclude
Included1Include or exclude channel 8
IRWCH8Exclude
Excluded0Include or exclude channel 9
Included1Exclude
JRWCH9Include or exclude channel 10
Excluded0Exclude
Included1Include or exclude channel 11
KRWCH10Exclude
Excluded0Include or exclude channel 12
Included1Exclude
LRWCH11Include or exclude channel 13
Excluded0Exclude
Included1Include or exclude channel 14
MRWCH12Exclude
Excluded0Include or exclude channel 15
Included1Exclude
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
NRWCH13
Excluded0Include or exclude channel 13
Included1Exclude
ORWCH14
Excluded0Include or exclude channel 14
Included1Exclude
PRWCH15
Excluded0Include or exclude channel 15
Included1Exclude
QRWCH16
Excluded0Include or exclude channel 16
Included1Exclude
RRWCH17
Excluded0Include or exclude channel 17
Included1Exclude
SRWCH18
Excluded0Include or exclude channel 18
Included1Exclude
TRWCH19
Excluded0Include or exclude channel 19
Included1Exclude
URWCH20
Excluded0Include or exclude channel 20
Included1Exclude
VRWCH21
Excluded0Include or exclude channel 21
Included1Exclude
WRWCH22
Excluded0Include or exclude channel 22
Included1Exclude
XRWCH23
Excluded0Include or exclude channel 23
Included1Exclude
YRWCH24
Excluded0Include or exclude channel 24
Included1Exclude
ZRWCH25
Excluded0Include or exclude channel 25
Included1Exclude
aRWCH26
Excluded0Include or exclude channel 26
Included1Exclude
bRWCH27
Excluded0Include or exclude channel 27
Included1Exclude
cRWCH28
Excluded0Include or exclude channel 28
Included1Exclude
dRWCH29
Excluded0Include or exclude channel 29
Included1Exclude
eRWCH30
Excluded0Include or exclude channel 30
Included1Exclude
fRWCH31
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Excluded0Exclude
Included1Include

22.2.50 FORK[0].TEP

Address offset: 0x910

Channel 0 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.51 FORK[1].TEP

Address offset: 0x914

Channel 1 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.52 FORK[2].TEP

Address offset: 0x918

Channel 2 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.53 FORK[3].TEP

Address offset: 0x91C

Channel 3 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.54 FORK[4].TEP

Address offset: 0x920

Channel 4 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.55 FORK[5].TEP

Address offset: 0x924

Channel 5 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.56 FORK[6].TEP

Address offset: 0x928

Channel 6 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.57 FORK[7].TEP

Address offset: 0x92C

Channel 7 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.58 FORK[8].TEP

Address offset: 0x930

Channel 8 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.59 FORK[9].TEP

Address offset: 0x934

Channel 9 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.60 FORK[10].TEP

Address offset: 0x938

Channel 10 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.61 FORK[11].TEP

Address offset: 0x93C

Channel 11 task end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTEP

22.2.62 FORK[12].TEP

Address offset: 0x940

Channel 12 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.63 FORK[13].TEP

Address offset: 0x944

Channel 13 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.64 FORK[14].TEP

Address offset: 0x948

Channel 14 task end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTEP

22.2.65 FORK[15].TEP

Address offset: 0x94C

Channel 15 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.66 FORK[16].TEP

Address offset: 0x950

Channel 16 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.67 FORK[17].TEP

Address offset: 0x954

Channel 17 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.68 FORK[18].TEP

Address offset: 0x958

Channel 18 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.69 FORK[19].TEP

Address offset: 0x95C

Channel 19 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.70 FORK[20].TEP

Address offset: 0x960

Channel 20 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.71 FORK[21].TEP

Address offset: 0x964

Channel 21 task end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTEP

22.2.72 FORK[22].TEP

Address offset: 0x968

Channel 22 task end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTEP

22.2.73 FORK[23].TEP

Address offset: 0x96C

Channel 23 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.74 FORK[24].TEP

Address offset: 0x970

Channel 24 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.75 FORK[25].TEP

Address offset: 0x974

Channel 25 task end-point

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTEP

22.2.76 FORK[26].TEP

Address offset: 0x978

Channel 26 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.77 FORK[27].TEP

Address offset: 0x97C

Channel 27 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.78 FORK[28].TEP

Address offset: 0x980

Channel 28 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.79 FORK[29].TEP

Address offset: 0x984

Channel 29 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.80 FORK[30].TEP

Address offset: 0x988

Channel 30 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

22.2.81 FORK[31].TEP

Address offset: 0x98C

Channel 31 task end-point

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTEPPointer to task register

23 RADIO — 2.4 GHz Radio

The RADIO contains a 2.4 GHz radio receiver and a 2.4 GHz radio transmitter that is compatible with Nordic's proprietary 1 Mbps and 2 Mbps radio modes in addition to 1 Mbps and 2 Mbps Bluetooth® low energy mode.

EasyDMA in combination with an automated packet assembler and packet disassembler, and an automated CRC generator and CRC checker, makes it very easy to configure and use the RADIO. See Figure 31: RADIO block diagram on page 209 for details.

Figure 31: RADIO block diagram

The RADIO includes a Device Address Match unit and an interframe spacing control unit that can be utilized to simplify address white listing and interframe spacing respectively, in Bluetooth Smart and simila applications.

The RADIO also includes a Received Signal Strength Indicator (RSSI) and a bit counter. The bit counter generates events when a preconfigured number of bits have been sent or received by the RADIO.

23.1 EasyDMA

The RADIO use EasyDMA for reading and writing of data packets from and to the RAM without CPU involvement.

As illustrated in Figure 31: RADIO block diagram on page 209, the RADIO's EasyDMA utilizes the same PACKETPTR for receiving and transmitting packets. The CPU should reconfigure this pointer every time before the RADIO is started via the START task.

The structure of a radio packet is described in detail in Packet configuration on page 210. The data that is stored in Data RAM and transported by EasyDMA consists of S0, LENGTH, S1, the payload itself, and a static add-on sent immediately after the payload.

The size of each of the above elements in the frame is configurable (see Packet configuration on page 210), and the space occupied in RAM depends on these settings. A size of zero is possible for any of the fields, it is up to the user to make sure that the resulting frame complies with the RF protocol chosen.

For the field sizes defined in bits, the occupation in RAM will always be rounded up to the next full byte size (for instance 3 bit length will allocate 1 byte in RAM, 9 bit length will allocate 2 bytes, etc.).

In addition, the S0INCL field in PCNF0 determines if S0 is present in RAM at all if its length is zero. If present, one byte is allocated in RAM.

The size of S0 is configured through the S0LEN field in PCNF0. The size of LENGTH is configured through the LFLEN field in PCNF0. The size of S1 is configured through the S1LEN field in PCNF0. The size of the payload is configured through the value in RAM corresponding to the LENGTH field. The size of the static add-on to the payload is configured through the STATLEN field in PCNF1.

The MAXLEN field in the PCNF1 register configures the maximum packet payload plus add-on size in number of bytes that can be transmitted or received by the RADIO. This feature can be used to ensure that the RADIO does not overwrite, or read beyond, the RAM assigned to the packet payload. This means that if the packet payload length defined by PCNF1.STATLEN and the LENGTH field in the packet specifies a packet larger than MAXLEN, the payload will be truncated at MAXLEN.

Note that MAXLEN includes the payload and the add-on, but excludes the size occupied by the S0, LENGTH and S1 fields. This has to be taken into account when allocating RAM.

If the payload plus add-on length is specified larger than MAXLEN, the RADIO will still transmit or receive in the same way as before except the payload is now truncated to MAXLEN. The packet's LENGTH field will not be altered when the payload is truncated. The RADIO will calculate CRC as if the packet length is equal to MAXLEN.

If the PACKETPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

The DISABLED event indicates that the EasyDMA has finished accessing the RAM.

23.2 Packet configuration

A Radio packet contains the following fields: PREAMBLE, ADDRESS, S0, LENGTH, S1, PAYLOAD and CRC.

See Figure 32: On-air packet layout on page 210. Not shown in the figure is the static payload add-on (the length of which is defined in STATLEN, and which is 0 bytes long in a standard BLE packet), and would be sent between PAYLOAD and CRC. The Radio sends the different fields in the packet in the order they are illustrated below, from left to right. The preamble will be sent least significant bit first on-air.

LSBITPREAMBLEBASELSBITPREFIXS0LENGTHS1PAYLOADMSBITCRC
LSByteLSByteMSByte
ADDRESS

Figure 32: On-air packet layout

For all modes, except for 2 Mbit/s Bluetooth Low Energy mode, the preamble is one byte long. For 2 Mbit/s Bluetooth Low Energy mode the preamble is 2 bytes long. If the first bit of the ADDRESS is 0 the preamble will be set to 0xAA otherwise the PREAMBLE will be set to 0x55.

Radio packets are stored in memory inside instances of a radio packet data structure as illustrated in Figure 33: In-RAM representation of radio packet, S0, LENGTH and S1 are optional on page 210. The PREAMBLE, ADDRESS and CRC fields are omitted in this data structure.

S0LENGTHS1PAYLOAD
0LSByten

Figure 33: In-RAM representation of radio packet, S0, LENGTH and S1 are optional

The byte ordering on air is always Least Significant Byte First for the ADDRESS and PAYLOAD fields and Most Significant Byte First for the CRC field. The ADDRESS fields are always transmitted and received least significant bit first on-air. The CRC field is always transmitted and received Most Significant Bit first. The bitendian, i.e. which order the bits are sent and received in, of the S0, LENGTH, S1 and PAYLOAD fields can be configured via the ENDIAN in PCNF1.

The S0INCL field in PCNF0 determines if S0 is present in RAM at all if its length is zero. If present, one byte is allocated in RAM.

The sizes of the S0, LENGTH and S1 fields can be individually configured via S0LEN, LFLEN and S1LEN in PCNF0 respectively. If any of these fields are configured to be less than 8 bit long the, the least significant bits of the fields, as seen from the RAM representation, are used.

If S0, LENGTH or S1 are specified with zero length their fields will be omitted in memory, otherwise each field will be represented as a separate byte, regardless of the number of bits in their on-air counterpart.

23.3 Maximum packet length

Independent of the configuration of MAXLEN, the combined length of S0, LENGTH, S1 and PAYLOAD cannot exceed 258 bytes.

23.4 Address configuration

The on-air radio ADDRESS field is composed of two parts, the base address field and the address prefix field.

The size of the base address field is configurable via BALEN in PCNF1. The base address is truncated from LSByte if the BALEN is less than 4. See Table 41: Definition of logical addresses on page 211.

The on-air addresses are defined in the BASEn and PREFIXn registers, and it is only when writing these registers the user will have to relate to actual on-air addresses. For other radio address registers such as the TXADDRESS, RXADDRESSES and RXMATCH registers, logical radio addresses ranging from 0 to 7 are being used. The relationship between the on-air radio addresses and the logical addresses is described in Table 41: Definition of logical addresses on page 211.

Table 41: Definition of logical addresses

Logical addressBase addressPrefix byte
0BASE0PREFIX0.AP0
1BASE1PREFIX0.AP1
2BASE1PREFIX0.AP2
3BASE1PREFIX0.AP3
4BASE1PREFIX1.AP4
5BASE1PREFIX1.AP5
6BASE1PREFIX1.AP6
7BASE1PREFIX1.AP7

23.5 Data whitening

The RADIO is able to do packet whitening and de-whitening.

See WHITEEN in PCNF1 register for how to enable whitening. When enabled, whitening and de-whitening will be handled by the RADIO automatically as packets are sent and received.

The whitening word is generated using polynomial $g ( \mathsf { D } ) = \mathsf { D } ^ { 7 } + \mathsf { D } ^ { 4 } + 1$ , which then is XORed with the data packet that is to be whitened, or de-whitened. See the figure below.


Figure 34: Data whitening and de-whitening

Whitening and de-whitening will be performed over the whole packet (except for the preamble and the address field).

The linear feedback shift register, illustrated in Figure 34: Data whitening and de-whitening on page 212 can be initialised via the DATAWHITEIV register.

23.6 CRC

The CRC generator in the RADIO calculates the CRC over the whole packet excluding the preamble. If desirable, the address field can be excluded from the CRC calculation as well

See CRCCNF register for more information.

The CRC polynomial is configurable as illustrated in Figure 35: CRC generation of an n bit CRC on page 212 where bit 0 in the CRCPOLY register corresponds to $\mathsf { X } ^ { 0 }$ and bit 1 corresponds to $\mathsf { X } ^ { 1 }$ etc. See CRCPOLY for more information.


Figure 35: CRC generation of an n bit CRC

As illustrated in Figure 35: CRC generation of an n bit CRC on page 212, the CRC is calculated by feeding the packet serially through the CRC generator. Before the packet is clocked through the CRC generator, the CRC generator's latches ${ \sf b } _ { 0 }$ through $\mathsf { b } _ { \mathsf { n } }$ will be initialized with a predefined value specified in the CRCINIT register. When the whole packet is clocked through the CRC generator, latches ${ \sf b } _ { 0 }$ through $\mathsf { b } _ { \mathsf { n } }$ will hold the resulting CRC. This value will be used by the RADIO during both transmission and reception but it is not available to be read by the CPU at any time. A received CRC can however be read by the CPU via the RXCRC register independent of whether or not it has passed the CRC check.

The length (n) of the CRC is configurable, see CRCCNF for more information.

After the whole packet including the CRC has been received, the RADIO will generate a CRCOK event if no CRC errors were detected, or alternatively generate a CRCERROR event if CRC errors were detected.

The status of the CRC check can be read from the CRCSTATUS register after a packet has been received.

23.7 Radio states

The RADIO can enter a number of states.

The RADIO can enter the states described the table below. An overview state diagram for the RADIO is illustrated in Figure 36: Radio states on page 213. This figure shows how the tasks and events relate to the RADIO's operation. The RADIO does not prevent a task from being triggered from the wrong state. If a task is triggered from the wrong state, for example if the RXEN task is triggered from the RXDISABLE state, this may lead to incorrect behaviour. As illustrated in Figure 36: Radio states on page 213, the PAYLOAD event is always generated even if the payload is zero.

Table 42: RADIO state diagram

StateDescription
DISABLEDNo operations are going on inside the radio and the power consumption is at a minimum
RXRUThe radio is ramping up and preparing for reception
RXIDLEThe radio is ready for reception to start
RXReception has been started and the addresses enabled in the RXADDRESSES register are being monitored
TXRUThe radio is ramping up and preparing for transmission
TXIDLEThe radio is ready for transmission to start
TXThe radio is transmitting a packet
RXDISABLEThe radio is disabling the receiver
TXDISABLEThe radio is disabling the transmitter


Figure 36: Radio states

23.8 Transmit sequence

Before the RADIO is able to transmit a packet, it must first ramp-up in TX mode.

See TXRU in Figure 36: Radio states on page 213 and Figure 37: Transmit sequence on page 214. A TXRU ramp-up sequence is initiated when the TXEN task is triggered. After the radio has successfully ramped up it will generate the READY event indicating that a packet transmission can be initiate. A packet transmission is initiated by triggering the START task. As illustrated in Figure 36: Radio states on page 213 the START task can first be triggered after the RADIO has entered into the TXIDLE state.

Figure 37: Transmit sequence on page 214 illustrates a single packet transmission where the CPU manually triggers the different tasks needed to control the flow of the RADIO, i.e. no shortcuts are used. If shortcuts are not used, a certain amount of delay caused by CPU execution is expected between READY and START, and between END and DISABLE. As illustrated in Figure 37: Transmit sequence on page 214 the RADIO will by default transmit '1's between READY and START, and between END and DISABLED. What is transmitted can be programmed through the DTX field in the MODECNF0 register.


Figure 37: Transmit sequence

A slightly modified version of the transmit sequence from Figure 37: Transmit sequence on page 214 is illustrated in Figure 38: Transmit sequence using shortcuts to avoid delays on page 214 where the RADIO is configured to use shortcuts between READY and START, and between END and DISABLE, which means that no delay is introduced.


Figure 38: Transmit sequence using shortcuts to avoid delays

The RADIO is able to send multiple packets one after the other without having to disable and re-enable the RADIO between packets, this is illustrated in Figure 39: Transmission of multiple packets on page 215.


Figure 39: Transmission of multiple packets

23.9 Receive sequence

Before the RADIO is able to receive a packet, it must first ramp up in RX mode

See RXRU in Figure 36: Radio states on page 213 and Figure 40: Receive sequence on page 215. An RXRU ramp-up sequence is initiated when the RXEN task is triggered. After the radio has successfully ramped up it will generate the READY event indicating that a packet reception can be initiated. A packet reception is initiated by triggering the START task. As illustrated in Figure 36: Radio states on page 213 the START task can, first be triggered after the RADIO has entered into the RXIDLE state.

Figure 40: Receive sequence on page 215 illustrates a single packet reception where the CPU manually triggers the different tasks needed to control the flow of the RADIO, i.e. no shortcuts are used. If shortcuts are not used, a certain amount of delay, caused by CPU execution, is expected between READY and START, and between END and DISABLE. As illustrated Figure 40: Receive sequence on page 215 the RADIO will be listening and possibly receiving undefined data, illustrated with an 'X', from START and until a packet with valid preamble (P) is received.


Figure 40: Receive sequence

A slightly modified version of the receive sequence from Figure 40: Receive sequence on page 215 is illustrated in Figure 41: Receive sequence using shortcuts to avoid delays on page 216 where the the RADIO is configured to use shortcuts between READY and START, and between END and DISABLE, which means that no delay is introduced.


Figure 41: Receive sequence using shortcuts to avoid delays

The RADIO is able to receive multiple packets one after the other without having to disable and re-enable the RADIO between packets, this is illustrated Figure 42: Reception of multiple packets on page 216.


Figure 42: Reception of multiple packets

23.10 Received Signal Strength Indicator (RSSI)

The radio implements a mechanism for measuring the power in the received radio signal. This feature is called Received Signal Strength Indicator (RSSI).

Sampling of the received signal strength is started by using the RSSISTART task. The sample can be read from the RSSISAMPLE register.

The sample period of the RSSI is defined by RSSI , see the device product specification for details. The RSSI sample will hold the average received signal strength during this sample period.

For the RSSI sample to be valid the radio has to be enabled in receive mode (RXEN task) and the reception has to be started (READY event followed by START task).

23.11 Interframe spacing

Interframe spacing is the time interval between two consecutive packets.

It is defined as the time, in micro seconds, from the end of the last bit of the previous packet received and to the start of the first bit of the subsequent packet that is transmitted. The RADIO is able to enforce this

interval as specified in the TIFS register as long as TIFS is not specified to be shorter than the RADIO’s turnaround time, i.e. the time needed to switch off the receiver, and switch back on the transmitter.

TIFS is only enforced if END_DISABLE and DISABLED_TXEN or END_DISABLE and DISABLED_RXEN shortcuts are enabled. TIFS is only qualified for use in BLE_1MBIT mode, and default ramp-up mode.

23.12 Device address match

The device address match feature is tailored for address white listing in a Bluetooth Smart and similar implementations.

This feature enables on-the-fly device address matching while receiving a packet on air. This feature only works in receive mode and as long as RADIO is configured for little endian, see PCNF1.ENDIAN.

The Device Address match unit assumes that the 48 first bits of the payload is the device address and that bit number 6 in S0 is the TxAdd bit. See the Bluetooth Core Specification for more information about device addresses, TxAdd and whitelisting.

The RADIO is able to listen for eight different device addresses at the same time. These addresses are specified in a DAB/DAP register pair, one pair per address, in addition to a TxAdd bit configured in the DACNF register. The DAB register specifies the 32 least significant bits of the device address, while the DAP register specifies the 16 most significant bits of the device address.

Each of the device addresses can be individually included or excluded from the matching mechanism. This is configured in the DACNF register.

23.13 Bit counter

The RADIO implements a simple counter that can be configured to generate an event after a specific number of bits have been transmitted or received.

By using shortcuts, this counter can be started from different events generated by the RADIO and hence count relative to these.

The bit counter is started by triggering the BCSTART task, and stopped by triggering the BCSTOP task. A BCMATCH event will be generated when the bit counter has counted the number of bits specified in the BCC register. The bit counter will continue to count bits until the DISABLED event is generated or until the BCSTOP task is triggered. The CPU can therefore, after a BCMATCH event, reconfigure the BCC value for new BCMATCH events within the same packet.

The bit counter can only be started after the RADIO has received the ADDRESS event.

The bit counter will stop and reset on BCSTOP, STOP, END and DISABLE tasks.

The figure below illustrates how the bit counter can be used to generate a BCMATCH event in the beginning of the packet payload, and again generate a second BCMATCH event after sending 2 bytes (16 bits) of the payload.


Figure 43: Bit counter example

23.14 Registers

Table 43: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40001000RADIORADIO2.4 GHz radio

Table 44: Register Overview

RegisterOffsetDescription
TASKS_TXEN0x000Enable RADIO in TX mode
TASKS_RXEN0x004Enable RADIO in RX mode
TASKS_START0x008Start RADIO
TASKS_STOP0x00CStop RADIO
TASKS_DISABLE0x010Disable RADIO
TASKS_RSSISTART0x014Start the RSSI and take one single sample of the receive signal strength.
TASKS_RSSISTOP0x018Stop the RSSI measurement
TASKS_BCSTART0x01CStart the bit counter
TASKS_BCSTOP0x020Stop the bit counter
EVENTS_READY0x100RADIO has ramped up and is ready to be started
EVENTS_ADDRESS0x104Address sent or received
EVENTS_PAYLOAD0x108Packet payload sent or received
EVENTS_END0x10CPacket sent or received
EVENTS_DISABLED0x110RADIO has been disabled
EVENTS_DEVMATCH0x114A device address match occurred on the last received packet
EVENTS_DEVMISS0x118No device address match occurred on the last received packet
EVENTS_RSSIEND0x11CSampling of receive signal strength complete.
EVENTS_BCMATCH0x128Bit counter reached bit count value.
EVENTS_CRCOK0x130Packet received with CRC ok
EVENTS_CRCERROR0x134Packet received with CRC error
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
CRCSTATUS0x400CRC status
RXMATCH0x408Received address
RXCRC0x40CCRC field of previously received packet
DAI0x410Device address match index
PACKETPTR0x504Packet pointer
FREQUENCY0x508Frequency
TXPOWER0x50COutput power
MODE0x510Data rate and modulation
PCNFO0x514Packet configuration register 0
PCNF10x518Packet configuration register 1
BASEO0x51CBase address 0
BASE10x520Base address 1
PREFIXO0x524Prefixes bytes for logical addresses 0-3
PREFIX10x528Prefixes bytes for logical addresses 4-7
TXADDRESS0x52CTransmit address select
RXADDRESSES0x530Receive address select
CRCCNF0x534CRC configuration
CRCPOLY0x538CRC polynomial
CRCINIT0x53CCRC initial value
0x540Reserved
TIFS0x544Inter Frame Spacing in us
RSSISAMPLE0x548RSSI sample
STATE0x550Current radio state
DATAWHITEIV0x554Data whitening initial value
BCC0x560Bit counter compare
DAB[0]0x600Device address base segment 0
DAB[1]0x604Device address base segment 1
DAB[2]0x608Device address base segment 2
DAB[3]0x60CDevice address base segment 3
DAB[4]0x610Device address base segment 4
DAB[5]0x614Device address base segment 5
DAB[6]0x618Device address base segment 6
DAB[7]0x61CDevice address base segment 7
DAP[0]0x620Device address prefix 0
DAP[1]0x624Device address prefix 1
DAP[2]0x628Device address prefix 2
DAP[3]0x62CDevice address prefix 3
DAP[4]0x630Device address prefix 4
DAP[5]0x634Device address prefix 5
DAP[6]0x638Device address prefix 6
DAP[7]0x63CDevice address prefix 7
DACNF0x640Device address match configuration
MODECNFO0x650Radio mode configuration register 0
POWER0xFFCPeripheral power control

23.14.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY_START
Disabled0
Enabled1
BRWEND_DISABLE
IdHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
CRWDISABLED_TXEN
Disabled0
Enabled1
DRWDISABLED_RXEN
Disabled0
Enabled1
ERWADDRESS_RSSISTART
Disabled0
Enabled1
FRWEND_START
Disabled0Disable shortcut
Enabled1Enable shortcut
GRWADDRESS_BCSTART
Disabled0
Enabled1
HRWDISABLED_RSSISTOP
Disabled0
Enabled1

23.14.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Set1
Disabled0
Enabled1
BRWADDRESS
Set1
Disabled0
Enabled1
CRWPAYLOAD
Set1
Disabled0
Enabled1
DRWEND
Bit number313029282726252423222120191817161514131211109876543210
IdLKIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
ERWDISABLED
Set1
Disabled0Write '1' to Enable interrupt for DISABLED event
Enabled1
FRWDEVMATCH
Set1Write '1' to Enable interrupt for DEVMATCH event
Disabled0See EVENTS_DISAMATCH
Enabled1Write '1' to Enable interrupt for DEVMATCH event
GRWDEVMISS
Set1
Disabled0Write '1' to Enable interrupt for DEVMISS event
Enabled1See EVENTS_DEVMISS
HRWRSSIEND
Set1
Disabled0Write '1' to Enable interrupt for RSSIEND event
Enabled1See EVENTS_RSSIEND
IRWBCMATCH
Set1Write '1' to Enable interrupt for BCMATCH event
Disabled0See EVENTS_BCMATCH
Enabled1Write '1' to Enable interrupt for CRCOK event
KRWCRCOK
Set1
Disabled0Write '1' to Enable interrupt for CRCERROR event
Enabled1See EVENTS_CRCERROR
LRWCRCERROR
Set1

23.14.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Clear1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000EventS_ADDRESS
IdRWFieldValue IdValueDescription
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWADDRESSWrite '1' to Disable interrupt for ADDRESS event
See EVENTS_ADDRESS
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWPAYLOADWrite '1' to Disable interrupt for PAYLOAD event
See EVENTS_PAYLOAD
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWENDWrite '1' to Disable interrupt for END event
See EVENTS_END
Clear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDelete
Disabled0Read: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead:DisabledWrite '1' to Disable interrupt for DISABLED event
ERWDISABLEDWrite '1' to Disable interrupt for DISABLED eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDelete
See EVENTS_DISABLEDDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable#
Clear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable#
Disabled0Read: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead:DisabledWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Enabled1Read: EnabledRead:EnabledRead:EnabledRead:EnabledRead:EnabledRead:EnabledWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
FRWDEVMATCHWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
See EVENTS_DEVMATCHDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Clear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Disabled0Read: DisabledRead: DisabledRead: DisabledRead: DisabledRead: DisabledRead:DisabledWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Enabled1Read: EnabledRead:EnabledRead:EnabledRead:EnabledRead:EnabledRead:DisabledWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
GRWDEVMISSWrite '1' to Disable interrupt for DEVMATCH eventDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
See EVENTS_DEVMISSDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Clear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled,Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disability, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Self, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, disabilities, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Single, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Special, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Distributed, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled,Deferred, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled, Disabled,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,Downloaded,DOWNINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGNINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGINGIN G C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C CCA C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C A C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C CA C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C/C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C CC C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C
Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
Enabled

23.14.4 CRCSTATUS

Address offset: 0x400

CRC status

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARCRCSTATUS
CRCError0
CRCOk1

23.14.5 RXMATCH

Address offset: 0x408

Received address

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRXMATCHReceived address

Logical address of which previous packet was received

23.14.6 RXCRC

Address offset: 0x40C

CRC field of previously received packet

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRXCRCCRC field of previously received packet

CRC field of previously received packet

23.14.7 DAI

Address offset: 0x410

Device address match index

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARDAIDevice address match index

Index (n) of device address, see DAB[n] and DAP[n], that got an address match.

23.14.8 PACKETPTR

Address offset: 0x504

Packet pointer

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPACKETPTRPacket pointer
Packet address to be used for the next transmission or reception. When transmitting, the packet pointed to by this address will be transmitted and when receiving, the received packet will be written to this address. This address is a byte aligned ram address.

23.14.9 FREQUENCY

Address offset: 0x508

Frequency

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAAAA
Reset 0x00000002000000000000000000000000000000010
IdRWFieldValue IdValueDescription
ARWFREQUENCY[0..100]Radio channel frequency
Frequency = 2400 + FREQUENCY (MHz).
BRWMAPChannel map selection.
Default0Channel map between 2400 MHZ .. 2500 MHz
Frequency = 2400 + FREQUENCY (MHz)
Low1Channel map between 2360 MHZ .. 2460 MHz
Frequency = 2360 + FREQUENCY (MHz)

23.14.10 TXPOWER

Address offset: 0x50C

Output power

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTXPOWER
RADIO output power.
the output power will be set to -20dBm.
Pos4dBm0x04
Pos3dBm0x03
0dBm0x00
Neg4dBm0xFC
Neg8dBm0xF8
Neg12dBm0xF4
Neg16dBm0xF0
Neg20dBm0xEC
Neg30dBm0xD8
Neg40dBm0xD8

23.14.11 MODE

Address offset: 0x510

Data rate and modulation

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Nrf_1Mbit0
Nrf_2Mbit1
Nrf_250Kbit2
Ble_1Mbit3
Ble_2Mbit4

23.14.12 PCNF0

Address offset: 0x514

Packet configuration register 0

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEECAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWLFLEN
CRWS0LEN
ERWS1LEN
FRWS1INCL
Automatic0
Include1
GRWPLEN
8bit0
16bit1

23.14.13 PCNF1

Address offset: 0x518

Packet configuration register 1

Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdE D
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
ARWMAXLEN[0..255]Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN.
BRWSTATLEN[0..255]Static length in number of bytesThe static length parameter is added to the total length of the payload when sending and receiving packets, e.g. if the static length is set to N the radio will receive or send N bytes more than what is defined in the LENGTH field of the packet.
CRWBALEN[2..4]Base address length in number of bytesThe address field is composed of the base address and the one byte long address prefix, e.g. set BALEN=2 to get a total address of 3 bytes.
DRWENDIANOn air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields.
LittleLeast Significant bit on air first
BigMost significant bit on air first
ERWWHITEENEnable or disable packet whitening
DisabledDisable
Bit number313029282726252423222120191817161514131211109876543210
IdEDCCCBBBBBBBBAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Enabled1Enable

23.14.14 BASE0

Address offset: 0x51C

Base address 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWBASE0Base address 0

23.14.15 BASE1

Address offset: 0x520

Base address 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWBASE1Base address 1

Radio base address 1.

23.14.16 PREFIX0

Address offset: 0x524

Prefixes bytes for logical addresses 0-3

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWAP0Address prefix 0.
BRWAP1Address prefix 1.
CRWAP2Address prefix 2.
DRWAP3Address prefix 3.

23.14.17 PREFIX1

Address offset: 0x528

Prefixes bytes for logical addresses 4-7

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWAP4Address prefix 4.
BRWAP5Address prefix 5.
CRWAP6Address prefix 6.
DRWAP7Address prefix 7.

23.14.18 TXADDRESS

Address offset: 0x52C

Transmit address select

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTXADDRESSTransmit address select

Logical address to be used when transmitting a packet.

23.14.19 RXADDRESSES

Address offset: 0x530

Receive address select

Bit number313029282726252423222120191817161514131211109876543210
IdHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWADDR0
Disabled0
Enabled1
BRWADDR1
Disabled0
Enabled1Enable
CRWADDR2
Disabled0Disable
Enabled1Enable
DRWADDR3
Disabled0Disable
Enabled1Enable
ERWADDR4
Disabled0Disable
Enabled1Enable
FRWADDR5
Disabled0Disable
Enabled1Enable
GRWADDR6
Disabled0Disable
Enabled1
HRWADDR7
Disabled0Disable
Enabled1

23.14.20 CRCCNF

Address offset: 0x534

CRC configuration

Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWLEN[1..3]
Disabled0
One1
Two2
Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Three3
BRWSKIPADDR
Include0
Skip1

23.14.21 CRCPOLY

Address offset: 0x538

CRC polynomial

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCRCPOLYCRC polynomial
Each term in the CRC polynomial is mapped to a bit in this register which index corresponds to the term's exponent. The least significant term/bit is hard-wired internally to 1, and bit number 0 of the register content is ignored by the hardware. The following example is for an 8 bit CRC polynomial: x8 + x7 + x3 + x2 + 1 = 1 1000 1101 .

23.14.22 CRCINIT

Address offset: 0x53C

CRC initial value

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCRCINITCRC initial value

23.14.23 TIFS

Address offset: 0x544

Inter Frame Spacing in us

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWTIFS

Inter frame space is the time interval between two consecutive packets. It is defined as the time, in micro seconds, from the end of the last bit of the previous packet to the start of the first bit of the subsequent packet.

23.14.24 RSSISAMPLE

Address offset: 0x548

RSSI sample

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAA
Reset 0x0000004000000000000000000000000000100000
IdRWFieldValue IdValue
ARWDATAWHITEIV
Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'.
Bit 0 corresponds to Position 6 of the LSFR, Bit 1 to Position 5, etc.
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARRSSISAMPLE[0..127]RSSI sample
RSSI sample result. The value of this register is read as a positive value while the actual received signal strength is a negative value. Actual received signal strength is therefore as follows: received signal strength = -A dBm

23.14.25 STATE

Address offset: 0x550

Current radio state

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARSTATE
Disabled0
RxRu1
RxIdle2
Rx3
RxDisable4
TxRu9
TxIdle10
Tx11
TxDisable12

23.14.26 DATAWHITEIV

Address offset: 0x554

Data whitening initial value

Bit counter compare

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWBCCBit counter compare

23.14.28 DAB[0]

Address offset: 0x600

Device address base segment 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 0

23.14.29 DAB[1]

Address offset: 0x604

Device address base segment 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 1

23.14.30 DAB[2]

Address offset: 0x608

Device address base segment 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 2

23.14.31 DAB[3]

Address offset: 0x60C

Device address base segment 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 3

23.14.32 DAB[4]

Address offset: 0x610

Device address base segment 4

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWDAB

23.14.33 DAB[5]

Address offset: 0x614

Device address base segment 5

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 5

23.14.34 DAB[6]

Address offset: 0x618

Device address base segment 6

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 6

23.14.35 DAB[7]

Address offset: 0x61C

Device address base segment 7

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDABDevice address base segment 7

23.14.36 DAP[0]

Address offset: 0x620

Device address prefix 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 0

23.14.37 DAP[1]

Address offset: 0x624

Device address prefix 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 1

23.14.38 DAP[2]

Address offset: 0x628

Device address prefix 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 2

23.14.39 DAP[3]

Address offset: 0x62C

Device address prefix 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 3

23.14.40 DAP[4]

Address offset: 0x630

Device address prefix 4

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 4

23.14.41 DAP[5]

Address offset: 0x634

Device address prefix 5

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 5

23.14.42 DAP[6]

Address offset: 0x638

Device address prefix 6

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 6

23.14.43 DAP[7]

Address offset: 0x63C

Device address prefix 7

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDAPDevice address prefix 7

23.14.44 DACNF

Address offset: 0x640

Device address match configuration

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENA0
Disabled0
Enabled1
BRWENA1
Disabled0Disabled
Enabled1Enabled
CRWENA2
Enable or disable device address matching using device address 2
Disabled0Disabled
Enabled1Enabled
DRWENA3Enable or disable device address matching using device address 3
Disabled
Disabled0Disabled
Enabled1Enabled
ERWENA4Enable or disable device address matching using device address 4
Disabled0Disabled
Enabled1Enabled
FRWENA5Enable or disable device address matching using device address 5
Disabled
Disabled0Enabled
Enabled1Enabled
GRWENA6Enable or disable device address matching using device address 6
Disabled0Disabled
Enabled1Enabled
HRWENA7Enable or disable device address matching using device address 7
Disabled0Disabled
Enabled1EnabledEnabled
IRWTXADD0TxAdd for device address 0TxAdd for device address 1
JRWTXADD1TxAdd for device address 1TxAdd for device address 2
KRWTXADD2TxAdd for device address 3TxAdd for device address 4
LRWTXADD3TxAdd for device address 5TxAdd for device address 6
MRWTXADD4TxAdd for device address 7TxAdd for device address 8
NRWTXADD5TxAdd for device address 9TxAdd for device address 10
ORWTXADD6TxAdd for device address 11TxAdd for device address 12
PRWTXADD7TxAdd for device address 13TxAdd for device address 14

23.14.45 MODECNF0

Address offset: 0x650

Radio mode configuration register 0

Bit number
Id
Reset 0x00000200
IdRWFieldValue IdValueDescription
ARWRU
Default0
Fast1
Bit number313029282726252423222120191817161514131211109876543210
IdCCA
Reset 0x0000020000000000000000000000001000000000
IdRWFieldValue IdValue
CRWDTX
RADIO.EVENTS_READY and RADIO.TASKS_START
RADIO.EVENTS_END and RADIO.TASKS_START
RADIO.EVENTS_END and RADIO.EVENTS_DISABLED
B10Transmit '1'
B01Transmit '0'
Center2Transmit center frequency
When tuning the crystal for centre frequency, the RADIO must be set in DTX = Center mode to be able to achieve the expected accuracy.

23.14.46 POWER

Address offset: 0xFFC

Peripheral power control

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValueDescription
ARWPOWER
Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again.
Disabled0Peripheral is powered off
Enabled1Peripheral is powered on

23.15 Electrical specification

23.15.1 General Radio Characteristics

SymbolDescriptionMin.Typ.Max.Units
$f_{OP}$ Operating frequencies23602500MHz
$f_{PLL,PROG,RES}$ PLL programming resolution2kHz
$f_{PLL,CH,SP}$ PLL channel spacing1MHz
$f_{DELTA,1M}$ Frequency deviation @ 1 Msps±170kHz
$f_{DELTA,BLE,1M}$ Frequency deviation @ BLE 1Msps±250kHz
$f_{DELTA,2M}$ Frequency deviation @ 2 Msps±320kHz
$f_{DELTA,BLE,2M}$ Frequency deviation @ BLE 2 Msps±500kHz
$f_{sk_{SPS}}$ On-the-air data rate12Msps

23.15.2 Radio current consumption (Transmitter)

SymbolDescriptionMin.Typ.Max.Units
$I_{TX,PLUS4dBM,DCDC}$ TX only run current (DCDC, 3V) $P_{RF} = +4$ dBm7.5mA
$I_{TX,PLUS4dBM}$ TX only run current $P_{RF} = +4$ dBm16.6mA
$I_{TX,0dBM,DCDC}$ TX only run current (DCDC, 3V) $P_{RF} = 0dBm$ 5.3mA
$I_{TX,0dBM}$ TX only run current $P_{RF} = 0dBm$ 11.6mA
$I_{TX,MINUS4dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF} = -4dBm$ 4.2mA
$I_{TX,MINUS4dBM}$ TX only run current $P_{RF} = -4$ dBm9.3mA
$I_{TX,MINUS8dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF} = -8$ dBm3.8mA
$I_{TX,MINUS8dBM}$ TX only run current $P_{RF}$ = -8 dBm8.4mA
$I_{TX,MINUS12dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF}$ = -12 dBm3.5mA
$I_{TX,MINUS12dBM}$ TX only run current $P_{RF}$ = -12 dBm7.7mA
$I_{TX,MINUS16dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF}$ = -16 dBm3.3mA
$I_{TX,MINUS16dBM}$ TX only run current $P_{RF}$ = -16 dBm7.3mA
$I_{TX,MINUS20dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF}$ = -20 dBm3.2mA
$I_{TX,MINUS20dBM}$ TX only run current $P_{RF}$ = -20 dBm7.0mA
$I_{TX,MINUS40dBM,DCDC}$ TX only run current DCDC, 3V $P_{RF}$ = -40 dBm2.7mA
$I_{TX,MINUS40dBM}$ TX only run current $P_{RF}$ = -40 dBm5.9mA
$I_{START,TX,DCDC}$ TX start-up current DCDC, 3V, $P_{RF}$ = 4 dBm4.0mA
$I_{START,TX}$ TX start-up current, $P_{RF}$ = 4 dBm8.8mA

23.15.3 Radio current consumption (Receiver)

SymbolDescriptionMin.Typ.Max.Units
$I_{RX,1M,DCDC}$ RX only run current (DCDC, 3V) 1Msps / 1Msps BLE5.4mA
$I_{RX,1M}$ RX only run current 1Msps / 1Msps BLE11.7mA
$I_{RX,2M,DCDC}$ RX only run current (DCDC, 3V) 2Msps / 2Msps BLE5.8mA
$I_{RX,2M}$ RX only run current 2Msps / 2Msps BLE12.9mA
$I_{START,RX,DCDC}$ RX start-up current (DCDC 3V)3.5mA
$I_{START,RX,LDO}$ RX start-up current (LDO 3V)7.5mA

23.15.4 Transmitter specification

SymbolDescriptionMin.Typ.Max.Units
$P_{RF}$ Maximum output power46dBm
$P_{RFC}$ RF power control range24dB
$P_{RFCR}$ RF power accuracy±4dB
$P_{RF1,1}$ 1st Adjacent Channel Transmit Power 1 MHz (1 Msps Nordic proprietary mode)-25dBc
$P_{RF2,1}$ 2nd Adjacent Channel Transmit Power 2 MHz (1 Msps Nordic proprietary mode)-50dBc
$P_{RF1,2}$ 1st Adjacent Channel Transmit Power 2 MHz (2 Msps Nordic proprietary mode)-25dBc
$P_{RF2,2}$ 2nd Adjacent Channel Transmit Power 4 MHz (2 Msps Nordic proprietary mode)-50dBc
$P_{RF1,2,BLE}$ 1st Adjacent Channel Transmit Power 2 MHz (2 Msps BLE mode)-20dBc
$P_{RF2,2,BLE}$ 2nd Adjacent Channel Transmit Power 4 MHz (2 Msps BLE mode)-50dBc

23.15.5 Receiver operation

SymbolDescriptionMin.Typ.Max.Units
$P_{RX,MAX}$ Maximum received signal strength at < 0.1% BER0dBm
$P_{SENS,IT,1M}$ Sensitivity, 1Msps nRF mode $^{16}$ -93dBm
$P_{SENS,IT,SP,1M,BLE}$ Sensitivity, 1Msps BLE ideal transmitter, <=37 bytes BER=1E-3 $^{17}$ -96dBm
$P_{SENS,IT,LP,1M,BLE}$ Sensitivity, 1Msps BLE ideal transmitter >=128 bytes BER=1E-4 $^{18}$ -95dBm
$P_{SENS,IT,2M}$ Sensitivity, 2Msps nRF mode $^{19}$ -89dBm
$P_{SENS,IT,SP,2M,BLE}$ Sensitivity, 2Msps BLE ideal transmitter, Packet length <=37bytes-93dBm
$P_{SENS,DT,SP,2M,BLE}$ Sensitivity, 2Msps BLE dirty transmitter, Packet length <=37bytes-93dBm
$P_{SENS,IT,LP,2M,BLE}$ Sensitivity, 2Msps BLE ideal transmitter >= 128bytes-92dBm
$P_{SENS,DT,LP,2M,BLE}$ Sensitivity, 2Msps BLE dirty transmitter, Packet length >= 128bytes-92dBm

23.15.6 RX selectivity

RX selectivity with equal modulation on interfering signal20

SymbolDescriptionMin.Typ.Max.Units
$C/I_{1M,co-channel}$ 1Msps mode, Co-Channel interference9dB
$C/I_{1M,-1MHz}$ 1 Msps mode, Adjacent (-1 MHz) interference-2dB
$C/I_{1M,+1MHz}$ 1 Msps mode, Adjacent (+1 MHz) interference-10dB
$C/I_{1M,-2MHz}$ 1 Msps mode, Adjacent (-2 MHz) interference-19dB
$C/I_{1M,+2MHz}$ 1 Msps mode, Adjacent (+2 MHz) interference-42dB
$C/I_{1M,-3MHz}$ 1 Msps mode, Adjacent (-3 MHz) interference-38dB
$C/I_{1M,+3MHz}$ 1 Msps mode, Adjacent (+3 MHz) interference-48dB
$C/I_{1M,\pm6MHz}$ 1 Msps mode, Adjacent (≥6 MHz) interference-50dB
$C/I_{1MBLE,co-channel}$ 1 Msps BLE mode, Co-Channel interference6dB
$C/I_{1MBLE,-1MHz}$ 1 Msps BLE mode, Adjacent (-1 MHz) interference-2dB
$C/I_{1MBLE,+1MHz}$ 1 Msps BLE mode, Adjacent (+1 MHz) interference-9dB
$C/I_{1MBLE,-2MHz}$ 1 Msps BLE mode, Adjacent (-2 MHz) interference-22dB
$C/I_{1MBLE,+2MHz}$ 1 Msps BLE mode, Adjacent (+2 MHz) interference-46dB
$C/I_{1MBLE,>3MHz}$ 1 Msps BLE mode, Adjacent (≥3 MHz) interference-50dB
$C/I_{1MBLE,image}$ Image frequency Interference-22dB
$C/I_{1MBLE,image,1MHz}$ Adjacent (1 MHz) interference to in-band image frequency-35dB
$C/I_{2M,co-channel}$ 2Msps mode, Co-Channel interference10dB
$C/I_{2M,-2MHz}$ 2 Msps mode, Adjacent (-2 MHz) interference6dB
$C/I_{2M,+2MHz}$ 2 Msps mode, Adjacent (+2 MHz) interference-14dB
$C/I_{2M,-4MHz}$ 2 Msps mode, Adjacent (-4 MHz) interference-20dB
$C/I_{2M,+4MHz}$ 2 Msps mode, Adjacent (+4 MHz) interference-44dB
$C/I_{2M,-6MHz}$ 2 Msps mode, Adjacent (-6 MHz) interference-42dB
$C/I_{2M,+6MHz}$ 2 Msps mode, Adjacent (+6 MHz) interference-47dB
$C/I_{2M,\geq12MHz}$ 2 Msps mode, Adjacent (≥12 MHz) interference-52dB
$C/I_{2MBLE,co-channel}$ 2 Msps BLE mode, Co-Channel interference7dB
$C/I_{2MBLE,\pm2MHz}$ 2 Msps BLE mode, Adjacent (±2 MHz) interference0dB
$C/I_{2MBLE,\pm4MHz}$ 2 Msps BLE mode, Adjacent (±4 MHz) interference-47dB
$C/I_{2MBLE,\geq6MHz}$ 2 Msps BLE mode, Adjacent (≥6 MHz) interference-49dB
$C/I_{2MBLE,image}$ Image frequency Interference-21dB
$C/I_{2MBLE,image, 2MHz}$ Adjacent (2 MHz) interference to in-band image frequency-36dB

23.15.7 RX intermodulation

RX intermodulation21

SymbolDescriptionMin.Typ.Max.Units
$P_{\text{IMD,1M}}$ IMD performance, 1 Msps (3 MHz, 4 MHz, and 5 MHz offset)-33dBm
$P_{\text{IMD,1M,BLE}}$ IMD performance, BLE 1 Msps (3 MHz, 4 MHz, and 5 MHz offset)-30dBm
$P_{\text{IMD,2M}}$ IMD performance, 2 Msps (6 MHz, 8 MHz, and 10 MHz offset)-33dBm

20 Wanted signal level at PIN = -67 dBm. One interferer is used, having equal modulation as the wanted signal. The input power of the interferer where the sensitivity equals BER = 0.1% is presented 21 Wanted signal level at PIN = -64 dBm. Two interferers with equal input power are used. The interferer closest in frequency is not modulated, the other interferer is modulated equal with the wanted signal. The input power of the interferers where the sensitivity equals BER = 0.1% is presented.

SymbolDescriptionMin.Typ.Max.Units
$P_{\text{IMD,2M,BLE}}$ IMD performance, BLE 2 Msps (6 MHz, 8 MHz, and 10 MHz offset)-32dBm

23.15.8 Radio timing

SymbolDescriptionMin.Typ.Max.Units
$t_{TXEN}$ Time between TXEN task and READY event after channel FREQUENCY configured140us
$t_{TXEN,FAST}$ Time between TXEN task and READY event after channel FREQUENCY configured (Fast Mode)40us
$t_{TXDISABLE}$ Time between DISABLE task and DISABLED event when the radio was in TX and mode is set to 1Msps6us
$t_{TXDISABLE,2M}$ Time between DISABLE task and DISABLED event when the radio was in TX and mode is set to 2Msps4us
$t_{RXEN}$ Time between the RXEN task and READY event after channel FREQUENCY configured in default mode140us
$t_{RXEN,FAST}$ Time between the RXEN task and READY event after channel FREQUENCY configured in fast mode40us
$t_{SWITCH}$ The minimum time taken to switch from RX to TX or TX to RX (channel FREQUENCY unchanged)20us
$t_{RXDISABLE}$ Time between DISABLE task and DISABLED event when the radio was in RX0us
$t_{TXCHAIN}$ TX chain delay0.6us
$t_{RXCHAIN}$ RX chain delay9.4us
$t_{RXCHAIN,2M}$ RX chain delay in 2Msps mode5us

23.15.9 Received Signal Strength Indicator (RSSI) specifications

SymbolDescriptionMin.Typ.Max.Units
$RSSI_{ACC}$ RSSI Accuracy Valid range -90 to -20 dBm±2dB
$RSSI_{RESOLUTION}$ RSSI resolution1dB
$RSSI_{PERIOD}$ Sample period0.25us

23.15.10 Jitter

SymbolDescriptionMin.Typ.Max.Units
$t_{DISABLEDJITTER}$ Jitter on DISABLED event relative to END event when shortcut between END and DISABLE is enabled.0.25us
$t_{READYJITTER}$ Jitter on READY event relative to TXEN and RXEN task.0.25us

23.15.11 Delay when disabling the RADIO

SymbolDescriptionMin.Typ.Max.Units
$t_{TXDISABLE,1M}$ Disable delay from TX.6us
Delay between DISABLE and DISABLED for MODE = Nrf_1Mbit and MODE = Ble_1Mbit
$t_{RXDISABLE,1M}$ Disable delay from RX.0us
Delay between DISABLE and DISABLED for MODE = Nrf_1Mbit and MODE = Ble_1Mbit

24 TIMER — Timer/counter

The TIMER can operate in two modes: timer and counter.


Figure 44: Block schematic for timer/counte

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 f as illustrated in Figure 44: Block schematic for timer/counter on page 238. The timer frequency is derived from PCLK16M as shown below, using the values specified in the PRESCALER register:

$$
f _ {\text { TIMER }} = 1 6 \mathrm{MHz} / (2 ^ {\text { PRESCALER }})
$$

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 243 register.

PRESCALER on page 243 and the BITMODE on page 243 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 f as illustrated in Figure 44: Block schematic for timer/counter on page 238.

24.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.

24.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 243 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.

24.3 Task delays

After the TIMER is started, the CLEAR task, COUNT task and the STOP task will guarantee to take effect within one clock cycle of the PCLK16M.

24.4 Task priority

If the START task and the STOP task are triggered at the same time, that is, within the same period of PCLK16M, the STOP task will be prioritized.

24.5 Registers

Table 45: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40008000TIMERTIMER0Timer 0This timer instance has 4 CC registers (CC[0..3])
0x40009000TIMERTIMER1Timer 1This timer instance has 4 CC registers (CC[0..3])
0x4000A000TIMERTIMER2Timer 2This timer instance has 4 CC registers (CC[0..3])
0x4001A000TIMERTIMER3Timer 3This timer instance has 6 CC registers (CC[0..5])
0x4001B000TIMERTIMER4Timer 4This timer instance has 6 CC registers (CC[0..5])

Table 46: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start Timer
TASKS_STOP0x004Stop Timer
TASKS_COUNT0x008Increment Timer (Counter mode only)
TASKS_CLEAR0x00CClear time
TASKS_SHUTDOWN0x010Shut down timer Deprecated
TASKS_CAPTURE[0]0x040Capture Timer value to CC[0] register
TASKS_CAPTURE[1]0x044Capture Timer value to CC[1] register
TASKS_CAPTURE[2]0x048Capture Timer value to CC[2] register
TASKS_CAPTURE[3]0x04CCapture Timer value to CC[3] register
TASKS_CAPTURE[4]0x050Capture Timer value to CC[4] register
TASKS_CAPTURE[5]0x054Capture Timer value to CC[5] register
EVENTS_COMPARE[0]0x140Compare event on CC[0] match
EVENTS_COMPARE[1]0x144Compare event on CC[1] match
EVENTS_COMPARE[2]0x148Compare event on CC[2] match
EVENTS_COMPARE[3]0x14CCompare event on CC[3] match
EVENTS_COMPARE[4]0x150Compare event on CC[4] match
EVENTS_COMPARE[5]0x154Compare event on CC[5] match
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
MODE0x504Timer mode selection
BITMODE0x508Configure the number of bits used by the TIMER
PRESCALER0x510Timer prescaler register
CC[0]0x540Capture/Compare register 0
CC[1]0x544Capture/Compare register 1
CC[2]0x548Capture/Compare register 2
CC[3]0x54CCapture/Compare register 3
CC[4]0x550Capture/Compare register 4
CC[5]0x554Capture/Compare register 5

24.5.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCOMPARE0_CLEAR
Disabled0
Enabled1
BRWCOMPARE1_CLEAR
Disabled0
Enabled1
CRWCOMPARE2_CLEAR
Disabled0
Enabled1
DRWCOMPARE3_CLEAR
Disabled0
Enabled1
ERWCOMPARE4_CLEAR
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
FRWCOMPARE5_CLEAR
Disabled0
Enabled1
GRWCOMPARE0_STOP
Disabled0
Enabled1
HRWCOMPARE1_STOP
Disabled0
Enabled1
IRWCOMPARE2_STOP
Disabled0Shortcut between COMPARE[1] event and STOP task
Enabled1See EVENTS_COMPARE[1] and TASKS_STOP
JRWCOMPARE3_STOP
Shortcut between COMPARE[3] event and STOP task
See EVENTS_COMPARE[3] and TASKS_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut
KRWCOMPARE4_STOPShortcut between COMPARE[4] event and STOP task
See EVENTS_COMPARE[4] and TASKS_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut
LRWCOMPARE5_STOPShortcut between COMPARE[5] event and STOP task
See EVENTS_COMPARE[5] and TASKS_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut

24.5.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdF E D C B A
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCOMPARE0
Set1
Disabled0
Enabled1
BRWCOMPARE1
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWCOMPARE2Write &#x27;1&#x27; to Enable interrupt for COMPARE[2] event
Bit number313029282726252423222120191817161514131211109876543210
IdF E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
DRWCOMPARE3
Set1
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWCOMPARE4
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWCOMPARE5
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

24.5.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdF E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCOMPARE0
BRWCOMPARE1
Write &#x27;1&#x27; to Disable interrupt for COMPARE[0] event
See EVENTS_COMPARE[0]
Disable
Read: Disabled
Read: Enabled
CRWCOMPARE2Write &#x27;1&#x27; to Disable interrupt for COMPARE[1] event
See EVENTS_COMPARE[1]
Disable
Read: Disabled
Read: Enabled
DRWCOMPARE3Write &#x27;1&#x27; to Disable interrupt for COMPARE[2] event
See EVENTS_COMPARE[2]
Disable
Read: Disabled
Clear1Read: Enabled
Disabled0Write &#x27;1&#x27; to Disable interrupt for COMPARE[3] event
Enabled1See EVENTS_COMPARE[3]
ERWCOMPARE4Disable
Clear1Write &#x27;1&#x27; to Disable interrupt for COMPARE[4] event
See EVENTS_COMPARE[4]
Bit number313029282726252423222120191817161514131211109876543210
IdF E D C B A
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWCOMPARE5Write &#x27;1&#x27; to Disable interrupt for COMPARE[5] event
See EVENTS_COMPARE[5]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

24.5.4 MODE

Address offset: 0x504

Timer mode selection

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMODE
Timer0
Counter1
LowPowerCounter2

24.5.5 BITMODE

Address offset: 0x508

Configure the number of bits used by the TIMER

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWBITMODE
16Bit0
08Bit1
24Bit2
32Bit3

24.5.6 PRESCALER

Address offset: 0x510

Timer prescaler register

Bit number
Id
Reset 0x00000004
IdRWFieldValue IdValueDescription
ARWPRESCALER[0..9]Prescaler value

24.5.7 CC[0]

Address offset: 0x540

Capture/Compare register 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value

Only the number of bits indicated by BITMODE will be used by the TIMER.

24.5.8 CC[1]

Address offset: 0x544

Capture/Compare register 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value

Only the number of bits indicated by BITMODE will be used by the TIMER.

24.5.9 CC[2]

Address offset: 0x548

Capture/Compare register 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value

Only the number of bits indicated by BITMODE will be used by the TIMER.

24.5.10 CC[3]

Address offset: 0x54C

Capture/Compare register 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value

Only the number of bits indicated by BITMODE will be used by the TIMER.

24.5.11 CC[4]

Address offset: 0x550

Capture/Compare register 4

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue

24.5.12 CC[5]

Address offset: 0x554

Capture/Compare register 5

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCCCapture/Compare value

Only the number of bits indicated by BITMODE will be used by the TIMER.

24.6 Electrical specification

24.6.1 Timers Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{TIMER\_1M}$ Run current with 1 MHz clock input (PCLK1M)358μA
$I_{TIMER\_16M}$ Run current with 16 MHz clock input (PCLK16M)5070120μA
$t_{TIMER,START}$ Time from START task is given until timer starts counting0.25μs

25 RTC — Real-time counter

The Real-time counter (RTC) module provides a generic, low power timer on the low-frequency clock source (LFCLK).


Figure 45: RTC block schematic

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.

25.1 Clock source

The RTC will run off the LFCLK.

The COUNTER resolution will therefore be 30.517 µs. Depending on the source, the RTC is able to run while the HFCLK is OFF and PCLK16M is not available.

The software has to explicitely start LFCLK before using the RTC.

See CLOCK — Clock control on page 104 for more information about clock sources.

25.2 Resolution versus overflow and the PRESCALER

Counter increment frequency:

<div class="mineru-algorithm" style="white-space: pre-wrap; font-family:monospace;"> $f_{RTC}$ [kHz] = 32.768 / (PRESCALER + 1) </div>

The PRESCALER register is read/write when the RTC is stopped. The PRESCALER register is read-only once the RTC is STARTed. Writing to the PRESCALER register when the RTC is started has no effect.

The PRESCALER is restarted on 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

$$
f _ {\mathrm{RTC}} = 9 9. 9 \mathrm{Hz}
$$

10009.576 µs counter period

  1. 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

Table 47: RTC resolution versus overflow

PrescalerCounter resolutionOverflow
030.517 μs512 seconds
$2^{8}$ -17812.5 μs131072 seconds
$2^{12}$ -1125 ms582.542 hours

25.3 COUNTER register

The COUNTER increments on LFCLK when the internal PRESCALER register (<<PRESC>>) is 0x00. <<PRESC>> is reloaded from the PRESCALER register. If enabled, the TICK event occurs on each increment of the COUNTER. The TICK event is disabled by default.


Figure 46: Timing diagram - COUNTER_PRESCALER_0


Figure 47: Timing diagram - COUNTER_PRESCALER_1

25.4 Overflow features

The TRIGOVRFLW task sets the COUNTER value to 0xFFFFF0 to allow SW test of the overflow condition. OVRFLW occurs when COUNTER overflows from 0xFFFFFF to 0.

Important: The OVRFLW event is disabled by default.

25.5 TICK event

The TICK event enables low power "tick-less" RTOS implementation as it optionally provides a regular interrupt source for a RTOS without the need to use the ARM® SysTick feature.

Using the RTC TICK event rather than the SysTick allows the CPU to be powered down while still keeping RTOS scheduling active.

Important: The TICK event is disabled by default.

25.6 Event control feature

To optimize RTC power consumption, events in the RTC can be individually disabled to prevent PCLK16M and HFCLK being requested when those events are triggered. This is managed using the EVTEN register.

For example, if the TICK event is not required for an application, this event should be disabled as it is frequently occurring and may increase power consumption if HFCLK otherwise could be powered down for long durations.

This means that the RTC implements a slightly different task and event system compared to the standard system described in Peripheral interface on page 69. The RTC task and event system is illustrated in Figure 48: Tasks, events and interrupts in the RTC on page 248.


Figure 48: Tasks, events and interrupts in the RTC

25.7 Compare feature

There are a number of Compare registers.

For more information, see Registers on page 252.

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.

PRESC 0x000

COUNTER X 0x000000

CLEAR

CC[0] 0x000000

COMPARE[0] 0

Figure 49: Timing diagram - COMPARE_CLEAR
• If a CC register is N and the COUNTER value is N when the START task is set, this will not trigger a COMPARE event.

COUNTER N-1 N N+1

CC[0] N

Figure 50: Timing diagram - COMPARE_START
• COMPARE occurs when a CC register is N and the COUNTER value transitions from N-1 to N.

Figure 51: Timing diagram - COMPARE

• If the COUNTER is N, writing N+2 to a CC register is guaranteed to trigger a COMPARE event at N+2.


Figure 52: Timing diagram - COMPARE_N+2

• If the COUNTER is N, writing N or N+1 to a CC register may not trigger a COMPARE event.


Figure 53: Timing diagram - COMPARE_N+1

• If the COUNTER is N and the current CC register value is N+1 or N+2 when a new CC value is written, a match may trigger on the previous CC value before the new value takes effect. If the current CC value greater than N+2 when the new value is written, there will be no event due to the old value.


Figure 54: Timing diagram - COMPARE_N-1

25.8 TASK and EVENT jitter/delay

Jitter or delay in the RTC is due to the peripheral clock being a low frequency clock (LFCLK) which is not synchronous to the faster PCLK16M.

Registers in the peripheral interface, part of the PCLK16M domain, have a set of mirrored registers in the LFCLK domain. For example, the COUNTER value accessible from the CPU is in the PCLK16M domain and is latched on read from an internal register called COUNTER in the LFCLK domain. COUNTER is the register which is actually modified each time the RTC ticks. These registers must be synchronised between clock domains (PCLK16M and LFCLK).

The following is a summary of the jitter introduced on tasks and events. Figures illustrating jitter follow.

Table 48: RTC jitter magnitudes on tasks

TaskDelay
CLEAR, STOP, START, TRIGOVRFLOW+15 to 46 μs

Table 49: RTC jitter magnitudes on events

Operation/FunctionJitter
START to COUNTER increment+/- 15 μs
COMPARE to COMPARE $^{22}$ +/- 62.5 ns
  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.


Figure 55: Timing diagram - DELAY_CLEAR

Figure 56: Timing diagram - DELAY_STOP

  1. The START task will start the RTC. Assuming that the LFCLK was previously running and stable, the first increment of COUNTER (and instance of TICK event) will be typically after 30.5 µs +/-15 µs. In some cases, in particular if the RTC is STARTed before the LFCLK is running, that timing can be up to ~250 µs. The software should therefore wait for the first TICK if it has to make sure the RTC is running. Sending a TRIGOVRFLW task sets the COUNTER to a value close to overflow. However, since the update of COUNTER relies on a stable LFCLK, sending this task while LFCLK is not running will start LFCLK, but the update will then be delayed by the same amount of time of up to ~250 us. The figures show the smallest and largest delays to on the START task which appears as a +/-15 µs jitter on the first COUNTER increment.


Figure 57: Timing diagram - JITTER_START-


Figure 58: Timing diagram - JITTER_START+

25.9 Reading the COUNTER register

To read the COUNTER register, the internal <<COUNTER>> value is sampled.

To ensure that the <<COUNTER>> is safely sampled (considering an LFCLK transition may occur during a read), the CPU and core memory bus are halted for three cycles by lowering the core PREADY signal. The Read takes the CPU 2 cycles in addition resulting in the COUNTER register read taking a fixed five PCLK16M clock cycles.


Figure 59: Timing diagram - COUNTER_READ

25.10 Registers

Table 50: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000B000RTCRTC0Real-time counter 0CC[0..2] implemented, CC[3] not implemented
0x40011000RTCRTC1Real-time counter 1CC[0..3] implemented
0x40024000RTCRTC2Real-time counter 2CC[0..3] implemented

Table 51: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start RTC COUNTER
TASKS_STOP0x004Stop RTC COUNTER
TASKS_CLEAR0x008Clear RTC COUNTER
TASKS_TRIGOVRFLW0x00CSet COUNTER to 0xFFFFF0
EVENTS_TICK0x100Event on COUNTER increment
EVENTS_OVRFLW0x104Event on COUNTER overflow
EVENTS_COMPARE[0]0x140Compare event on CC[0] match
EVENTS_COMPARE[1]0x144Compare event on CC[1] match
EVENTS_COMPARE[2]0x148Compare event on CC[2] match
EVENTS_COMPARE[3]0x14CCompare event on CC[3] match
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
EVTEN0x340Enable or disable event routing
EVTENSET0x344Enable event routing
EVTENCLR0x348Disable event routing
COUNTER0x504Current COUNTER value
PRESCALER0x50812 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped
CC[0]0x540Compare register 0
CC[1]0x544Compare register 1
CC[2]0x548Compare register 2
CC[3]0x54CCompare register 3

25.10.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdFBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTICK
Set1
Disabled0
Enabled1
BRWOVRFLW
Set1
Disabled0
Enabled1
CRWCOMPARE0
Write '1' to Enable interrupt for COMPARE[0] event
See EVENTS_COMPARE[0]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCOMPARE1Write '1' to Enable interrupt for COMPARE[1] event
See EVENTS_COMPARE[1]
Set1Enable
Disabled0Read: Disabled
EnabledIRead: Enabled
ERWCOMPARE2
SetWrite '1' to Enable interrupt for COMPARE[2] event
DisabledRead: Disabled
EnabledRead: Enabled
FRWCOMPARE3Write '1' to Enable interrupt for COMPARE[3] event
See EVENTS_COMPARE[3]
SetEnable
DisabledRead: Disabled
EnabledRead: Enabled

25.10.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdF
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTICK
BRWOVRFLW
Write &#x27;1&#x27; to Disable interrupt for TICK event
See EVENTS_TICK
Disable
Read: Disabled
Read: Enabled
CRWCOMPARE0Write &#x27;1&#x27; to Disable interrupt for OVRFLW event
See EVENTS_OVRFLW
Disable
Read: Disabled
Read: Enabled
DRWCOMPARE1Write &#x27;1&#x27; to Disable interrupt for COMPARE[0] event
See EVENTS_COMPARE[0]
Disable
Read: Disabled
Clear11111111111111111Read: Enabled111111111
DRWCOMPARE2Write &#x27;1&#x27; to Disable interrupt for COMPARE[1] event
See EVENTS_COMPARE[1]
Disable
Clear11111111111111111Read: Disabled111111111
ERWCOMPARE3Write &#x27;1&#x27; to Disable interrupt for COMPARE[2] event
See EVENTS_COMPARE[2]
Clear11111111111111111Read: Disabled111111111
Disabled01111111111111111Read: Enabled111111111
FRWCOMPARE3Write &#x27;1&#x27; to Disable interrupt for COMPARE[3] event
Clear11111111111111111Read: Disabled111111111
Disabled01111Read: Enabled111111111

25.10.3 EVTEN

Address offset: 0x340

Enable or disable event routing

Bit number313029282726252423222120191817161514131211109876543210
IdF E D CB A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTICK
Disabled0
Enabled1
BRWOVRFLW
Disabled0
Enabled1
CRWCOMPARE0
Disabled0
Enabled1
DRWCOMPARE1
Disabled0
Enabled1
ERWCOMPARE2
Disabled0Disable
Enabled1Enable
FRWCOMPARE3
Disabled0Disable
Enabled1Enable

25.10.4 EVTENSET

Address offset: 0x344

Enable event routing

Bit number313029282726252423222120191817161514131211109876543210
IdFBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWTICKWrite &#x27;1&#x27; to Enable event routing for TICK event
See EVENTS_TICK
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWOVRFLWWrite &#x27;1&#x27; to Enable event routing for OVRFLW event
See EVENTS_OVRFLW
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWCOMPARE0Write &#x27;1&#x27; to Enable event routing for COMPARE[0] event
See EVENTS_COMPARE[0]
Set1Enable
Bit number313029282726252423222120191817161514131211109876543210
IdFBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
DRWCOMPARE1
Set1
Disabled0
Enabled1
ERWCOMPARE2
Set1
Disabled0
Enabled1
FRWCOMPARE3
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

25.10.5 EVTENCLR

Address offset: 0x348

Disable event routing

Bit number313029282726252423222120191817161514131211109876543210
IdF E D CB A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTICK
Clear1
Disabled0
Enabled1
BRWOVRFLW
Clear1
Disabled0
Enabled1
CRWCOMPARE0
Write &#x27;1&#x27; to Disable event routing for OVRFLW event
See EVENTS_OVRFLW
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCOMPARE1Write &#x27;1&#x27; to Disable event routing for COMPARE[0] event
See EVENTS_COMPARE[0]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWCOMPARE2Write &#x27;1&#x27; to Disable event routing for COMPARE[1] event
See EVENTS_COMPARE[1]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
FRWCOMPARE3Write &#x27;1&#x27; to Disable event routing for COMPARE[3] event
See EVENTS_COMPARE[3]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

25.10.6 COUNTER

Address offset: 0x504

Current COUNTER value

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARCOUNTERCounter value

25.10.7 PRESCALER

Address offset: 0x508

12 bit prescaler for COUNTER frequency (32768/(PRESCALER+1)).Must be written when RTC is stopped

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPRESCALERPrescaler value

25.10.8 CC[0]

Address offset: 0x540

Compare register 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCOMPARECompare value

25.10.9 CC[1]

Address offset: 0x544

Compare register 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCOMPARECompare value

25.10.10 CC[2]

Address offset: 0x548

Compare register 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCOMPARECompare value

25.10.11 CC[3]

Address offset: 0x54C

Compare register 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCOMPARECompare value

25.11 Electrical specification

25.11.1 RTC Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{RTC}$ Run current Real Time Counter (LFCLK source)0.1μA

26 RNG — Random number generator

The Random number generator (RNG) generates true non-deterministic random numbers based on internal thermal noise that are suitable for cryptographic purposes. The RNG does not require a seed value.

Figure 60: Random number generator

The RNG is started by triggering the START task and stopped by triggering the STOP task. When started, new random numbers are generated continuously and written to the VALUE register when ready. A VALRDY event is generated for every new random number that is written to the VALUE register. This means that after a VALRDY event is generated the CPU has the time until the next VALRDY event to read out the random number from the VALUE register before it is overwritten by a new random number.

26.1 Bias correction

A bias correction algorithm is employed on the internal bit stream to remove any bias toward '1' or '0'. The bits are then queued into an eight-bit register for parallel readout from the VALUE register.

It is possible to enable bias correction in the CONFIG register. This will result in slower value generation, but will ensure a statistically uniform distribution of the random values.

26.2 Speed

The time needed to generate one random byte of data is unpredictable, and may vary from one byte to the next. This is especially true when bias correction is enabled.

26.3 Registers

Table 52: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000D000RNGRNGRandom number generator

Table 53: Register Overview

RegisterOffsetDescription
TASKS_START0x000Task starting the random number generator
TASKS_STOP0x004Task stopping the random number generator
EVENTS_VALRDY0x100Event being generated for every new random number written to the VALUE register
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
CONFIG0x504Configuration register
VALUE0x508Output random number

26.3.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWVALRDY_STOPShortcut between VALRDY event and STOP task
See EVENTS_VALRDY and TASKS_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut

26.3.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWVALRDYWrite &#x27;1&#x27; to Enable interrupt for VALRDY event
See EVENTS_VALRDY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

26.3.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWVALRDY
Write &#x27;1&#x27; to Disable interrupt for VALRDY event
See EVENTS_VALRDY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

26.3.4 CONFIG

Address offset: 0x504

Configuration register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDERCENBias correction
Disabled0Disabled
Enabled1Enabled

26.3.5 VALUE

Address offset: 0x508

Output random number

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARVALUE

26.4 Electrical specification

26.4.1 RNG Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{RNG}$ Run current, CPU sleeping.500μA
$t_{RNG,START}$ Time from setting the START task to generation begins. This is a one-time delay on START signal and does not apply between samples.128μs
$t_{RNG,RAW}$ Run time per byte without bias correction. Uniform distribution of 0 and 1 is not guaranteed.30μs
$t_{RNG,BC}$ Run time per byte with bias correction. Uniform distribution of 0 and 1 is guaranteed. Time to generate a byte cannot be guaranteed.120μs

27 TEMP — Temperature sensor

The temperature sensor measures die temperature over the temperature range of the device. Linearity compensation can be implemented if required by the application.

Listed here are the main features for TEMP:

• Temperature range is greater than or equal to operating temperature of the device

• Resolution is 0.25 degrees

TEMP is started by triggering the START task.

When the temperature measurement is completed, a DATARDY event will be generated and the result of the measurement can be read from the TEMP register.

To achieve the measurement accuracy stated in the electrical specification, the crystal oscillator must be selected as the HFCLK source, see CLOCK — Clock control on page 104 for more information.

When the temperature measurement is completed, TEMP analog electronics power down to save power.

TEMP only supports one-shot operation, meaning that every TEMP measurement has to be explicitly started using the START task.

27.1 Registers

Table 54: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000C000TEMPTEMPTemperature sensor

Table 55: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start temperature measurement
TASKS_STOP0x004Stop temperature measurement
EVENTS_DATARDY0x100Temperature measurement complete, data ready
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
TEMP0x508Temperature in °C (0.25° steps)
A00x520Slope of 1st piece wise linear function
A10x524Slope of 2nd piece wise linear function
A20x528Slope of 3rd piece wise linear function
A30x52CSlope of 4th piece wise linear function
A40x530Slope of 5th piece wise linear function
A50x534Slope of 6th piece wise linear function
B00x540y-intercept of 1st piece wise linear function
B10x544y-intercept of 2nd piece wise linear function
B20x548y-intercept of 3rd piece wise linear function
B30x54Cy-intercept of 4th piece wise linear function
B40x550y-intercept of 5th piece wise linear function
B50x554y-intercept of 6th piece wise linear function
T00x560End point of 1st piece wise linear function
T10x564End point of 2nd piece wise linear function
T20x568End point of 3rd piece wise linear function
T30x56CEnd point of 4th piece wise linear function
T40x570End point of 5th piece wise linear function

27.1.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDATARDYWrite &#x27;1&#x27; to Enable interrupt for DATARDY event
See EVENTS_DATARDY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

27.1.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDATARDYWrite &#x27;1&#x27; to Disable interrupt for DATARDY event
See EVENTS_DATARDY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

27.1.3 TEMP

Address offset: 0x508

Temperature in °C (0.25° steps)

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARTEMPTemperature in °C (0.25° steps)

Decision point: DATARDY

27.1.4 A0

Address offset: 0x520

Slope of 1st piece wise linear function

Bit number
Id
Reset 0x00000320
IdRWFieldValue IdValueDescription
ARWA0Slope of 1st piece wise linear function

27.1.5 A1

Address offset: 0x524

Slope of 2nd piece wise linear function

Bit number
Id
Reset 0x00000343
IdRWFieldValue IdValueDescription
ARWA1Slope of 2nd piece wise linear function

27.1.6 A2

Address offset: 0x528

Slope of 3rd piece wise linear function

Bit number
Id
Reset 0x0000035D
IdRWFieldValue IdValueDescription
ARWA2Slope of 3rd piece wise linear function

27.1.7 A3

Address offset: 0x52C

Slope of 4th piece wise linear function

Bit number
Id
Reset 0x00000400
IdRWFieldValue IdValueDescription
ARWA3Slope of 4th piece wise linear function

27.1.8 A4

Address offset: 0x530

Slope of 5th piece wise linear function

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAA
Reset 0x0000047F00000000000000000000001000111111
IdRWFieldValue IdValue
ARWA

27.1.9 A5

Address offset: 0x534

Slope of 6th piece wise linear function

Bit number
Id
Reset 0x0000037B
IdRWFieldValue IdValueDescription
ARWA5Slope of 6th piece wise linear function

27.1.10 B0

Address offset: 0x540

y-intercept of 1st piece wise linear function

Bit number
Id
Reset 0x00003FCC
IdRWFieldValue IdValueDescription
ARWB0y-intercept of 1st piece wise linear function

27.1.11 B1

Address offset: 0x544

y-intercept of 2nd piece wise linear function

Bit number
Id
Reset 0x00003F98
IdRWFieldValue IdValueDescription
ARWB1y-intercept of 2nd piece wise linear function

27.1.12 B2

Address offset: 0x548

y-intercept of 3rd piece wise linear function

Bit number
Id
Reset 0x00003F98
IdRWFieldValue IdValueDescription
ARWB2y-intercept of 3rd piece wise linear function

27.1.13 B3

Address offset: 0x54C

y-intercept of 4th piece wise linear function

Bit number
Id
Reset 0x00000012
IdRWFieldValue IdValueDescription
ARWB3y-intercept of 4th piece wise linear function

27.1.14 B4

Address offset: 0x550

y-intercept of 5th piece wise linear function

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAA
Reset 0x0000006A000000000000000000000000001101010
IdRWFieldValue IdValue
ARWB4

27.1.15 B5

Address offset: 0x554

y-intercept of 6th piece wise linear function

Bit number
Id
Reset 0x00003DD0
IdRWFieldValue IdValueDescription
ARWB5y-intercept of 6th piece wise linear function

27.1.16 T0

Address offset: 0x560

End point of 1st piece wise linear function

Bit number
Id
Reset 0x000000E2
IdRWFieldValue IdValueDescription
ARWT0End point of 1st piece wise linear function

27.1.17 T1

Address offset: 0x564

End point of 2nd piece wise linear function

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWT1End point of 2nd piece wise linear function

27.1.18 T2

Address offset: 0x568

End point of 3rd piece wise linear function

Bit number
Id
Reset 0x00000014
IdRWFieldValue IdValueDescription
ARWT2End point of 3rd piece wise linear function

27.1.19 T3

Address offset: 0x56C

End point of 4th piece wise linear function

Bit number
Id
Reset 0x00000019
IdRWFieldValue IdValueDescription
ARWT3End point of 4th piece wise linear function

27.1.20 T4

Address offset: 0x570

End point of 5th piece wise linear function

Bit number
Id
Reset 0x00000050
IdRWFieldValue IdValueDescription
ARWT4End point of 5th piece wise linear function

27.2 Electrical specification

27.2.1 Temperature Sensor Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$t_{TEMP}$ Time required for temperature measurement36μs
$T_{TEMP,RANGE}$ Temperature sensor range-4085°C
$T_{TEMP,ACC}$ Temperature sensor accuracy-55°C
$T_{TEMP,RES}$ Temperature sensor resolution0.25°C
$T_{TEMP,STB}$ Sample to sample stability at constant device temperature+/-0.25°C
$T_{TEMP,OFFST}$ Sample offset at 25°C-2.52.5°C

28 ECB — AES electronic codebook mode encryption

The AES electronic codebook mode encryption (ECB) can be used for a range of cryptographic functions like hash generation, digital signatures, and keystream generation for data encryption/decryption. The ECB encryption block supports 128 bit AES encryption (encryption only, not decryption).

AES ECB operates with EasyDMA access to system Data RAM for in-place operations on cleartext and ciphertext during encryption. ECB uses the same AES core as the CCM and AAR blocks and is an asynchronous operation which may not complete if the AES core is busy.

AES ECB features:

• 128 bit AES encryption

• Supports standard AES ECB block encryption

• Memory pointer support

• DMA data transfer

AES ECB performs a 128 bit AES block encrypt. At the STARTECB task, data and key is loaded into the algorithm by EasyDMA. When output data has been written back to memory, the ENDECB event is triggered.

AES ECB can be stopped by triggering the STOPECB task.

28.1 Shared resources

The ECB, CCM, and AAR share the same AES module. The ECB will always have lowest priority and if there is a sharing conflict during encryption, the ECB operation will be aborted and an ERRORECB event will be generated.

28.2 EasyDMA

The ECB implements an EasyDMA mechanism for reading and writing to the Data RAM. This DMA cannot access the program memory or any other parts of the memory area except RAM.

If the ECBDATAPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

The EasyDMA will have finished accessing the Data RAM when the ENDECB or ERRORECB is generated.

28.3 ECB data structure

Input to the block encrypt and output from the block encrypt are stored in the same data structure. ECBDATAPTR should point to this data structure before STARTECB is initiated.

Table 56: ECB data structure overview

PropertyAddress offsetDescription
KEY016 byte AES key
CLEARTEXT1616 byte AES cleartext input block
CIPHERTEXT3216 byte AES ciphertext output block

28.4 Registers

Table 57: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000E000ECBECBAES Electronic Code Book (ECB) mode block encryption

Table 58: Register Overview

RegisterOffsetDescription
TASKS_STARTECB0x000Start ECB block encrypt
TASKS_STOPECB0x004Abort a possible executing ECB operation
EVENTS_ENDECB0x100ECB block encrypt complete
EVENTS_ERRORECB0x104ECB block encrypt aborted because of a STOPECB task or due to an error
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ECBDATAPTR0x504ECB block encrypt memory pointers

28.4.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENDECB
Set1
Disabled0
Enabled1
BRWERRORECB
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

28.4.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENDECB
Clear1
Disabled0
Enabled1
BRWERRORECB
Clear1
Disabled0
Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
Enabled

28.4.3 ECBDATAPTR

Address offset: 0x504

ECB block encrypt memory pointers

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWECBDATAPTRPointer to the ECB data structure (see Table 1 ECB data)

28.5 Electrical specification

28.5.1 ECB Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$t_{ECB}$ Run time per 16 byte block in all modes6μs

29 CCM — AES CCM mode encryption

Cipher block chaining - message authentication code (CCM) mode is an authenticated encryption algorithm designed to provide both authentication and confidentiality during data transfer. CCM combines counter mode encryption and CBC-MAC authentication. The CCM terminology "Message authentication code (MAC)" is called the "Message integrity check (MIC)" in 'Bluetooth terminology and also in this document.

The CCM block generates an encrypted keystream that is applied to input data using the XOR operation and generates the 4 byte MIC field in one operation. The CCM and radio can be configured to work synchronously. The CCM will encrypt in time for transmission and decrypt after receiving bytes into memory from the Radio. All operations can complete within the packet RX or TX time. CCM on this device is implemented according to Bluetooth requirements and the algorithm as defined in IETF RFC3610, and depends on the AES-128 block cipher. A description of the CCM algorithm can also be found in NIST Special Publication 800-38C. The Bluetooth specification describes the configuration of counter mode blocks and encryption blocks to implement compliant encryption for BLE.

The CCM block uses EasyDMA to load key, counter mode blocks (including the nonce required), and to read/write plain text and cipher text.

The AES CCM supports three operations: key-stream generation, packet encryption, and packet decryption. All these operations are done in compliance with the Bluetooth specification.23A new key-stream must be generated before a new packet encryption or packet decryption operation can be started.

A key-stream is generated by triggering the KSGEN task. An ENDKSGEN event will be generated when the new key-stream has been generated. The key-stream will be stored in the AES CCM’s temporary memory area, specified by the SCRATCHPTR, where it will be used in subsequent encryption and decryption operations.

Encryption is started by triggering the CRYPT task with the MODE register set to ENCRYPTION. Similarly, decryption is started by triggering the same task with MODE set to DECRYPTION. An ENDCRYPT event will be generated when packet encryption is completed as well as when packet decryption is completed, see Figure 61: Key-stream generation followed by encryption or decryption. The shortcut is optional. on page 271.


Figure 61: Key-stream generation followed by encryption or decryption. The shortcut is optional.

Key-stream generation, packet encryption, and packet decryption operations utilize the configuration specified in the data structure pointed to by the CNFPTR pointer. It is necessary to configure this pointer and its underlying data structure, and the MODE register before the KSGEN task is triggered. It is also necessary to configure the INPTR pointer and the OUTPTR pointer before the CRYPT task is triggered.

If a shortcut is used between ENDKSGEN event and CRYPT task, the INPTR pointer and the OUTPTR pointer must be configured before the KSGEN task is triggered.

The AES CCM supports different packet lengths, this is configured via the PACKETLENGTH field in the MODE register.

29.1 Shared resources

The CCM shares registers and other resources with other peripherals that have the same ID as the CCM. The user must therefore disable all peripherals that have the same ID as the CCM before the CCM can be configured and used.

Disabling a peripheral that have the same ID as the CCM will not reset any of the registers that are shared with the CCM. It is therefore important to configure all relevant CCM registers explicitly to secure that it operates correctly.

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

29.2 Encryption

During packet encryption, the AES CCM will read the unencrypted packet located in RAM at the address specified in the INPTR pointer, encrypt the packet and append a four byte long Message Integrity Check (MIC) field to the packet.

The AES CCM will also modify the length field of the packet to adjust for the appended MIC field, that is, add four bytes to the length, and store the resulting packet back into RAM at the address specified in the OUTPTR pointer, see Figure 62: Encryption on page 272.

Empty packets (length field is set to 0) will not be encrypted but instead moved unmodified through the AES CCM.


Figure 62: Encryption

29.3 Decryption

During packet decryption, the AES CCM will read the encrypted packet located in RAM at the address specified in the INPTR pointer, decrypt the packet, authenticate the packet’s MIC field and generate the appropriate MIC status.

The AES CCM will also modify the length field of the packet to adjust for the MIC field, that is, subtrac four bytes from the length, and then store the decrypted packet into RAM at the address pointed to by the OUTPTR pointer, see Figure 63: Decryption on page 273.

The CCM is only able to decrypt packets that are at least 5 bytes long, that is, 1 byte or more encrypted payload (EPL) and 4 bytes of MIC. The CCM will therefore generate a MIC error for packets where the length field is set to 1, 2, 3 or 4.

Empty packets (length field is set to 0) will not be decrypted but instead moved unmodified through the AES CCM, these packets will always pass the MIC check.


Figure 63: Decryption

29.4 AES CCM and RADIO concurrent operation

The AES CCM is designed to run in parallel with the RADIO to enable on-the-fly encryption and decryption of RADIO packets without CPU involvement. To facilitate this, the RADIO has to be configured with specific settings.

Table 59: Radio configuration settings

Radio parameterValueDescription
PCNF0.S0LEN1Length of HEADER field in: Table 61: Data structure for unencrypted packet on page 275 and Table 62: Data structure for encrypted packet on page 275.
PCNF0.LFLEN5 or 8Length of LENGTH field in: Table 61: Data structure for unencrypted packet on page 275 and Table 62: Data structure for encrypted packet on page 275.
PCNF0.S1LEN3 or 0Length of the RFU field in: Table 61: Data structure for unencrypted packet on page 275 and Table 62: Data structure for encrypted packet on page 275. The combined length of LENGTH and RFU must always be 8 bit.
PCNF0.S1IncludeAlways include the S1 field (RFU field) in RAM to secure that the same data structure can be used for PCNF0.S1LEN = 3 and PCNF0.S1LEN = 0: Table 61: Data structure for unencrypted packet on page 275 and Table 62: Data structure for encrypted packet on page 275.
MODEBle_1MbitData rate. Must match CCM-&gt;MODE.DATARATE
PCNF1.BALEN3Length of address (32 bit)
CRCCNF.LEN3Length of CRC (24 bit)

29.5 Encrypting packets on-the-fly in radio transmit mode

When the AES CCM is encrypting a packet on-the-fly at the same time as the RADIO is transmitting it, the RADIO must read the encrypted packet from the same memory location as the AES CCM is writing to.

The OUTPTR pointer in the AES CCM must therefore point to the same memory location as the PACKETPTR pointer in the RADIO, see Figure 64: Configuration of on-the-fly encryption on page 273.


Figure 64: Configuration of on-the-fly encryption

In order to match the RADIO’s timing, the KSGEN task must be triggered no later than when the START task in the RADIO is triggered, in addition the shortcut between the ENDKSGEN event and the CRYPT task must be enabled. This use-case is illustrated in Figure 65: On-the-fly encryption using a PPI connection on page 274 using a PPI connection between the READY event in the RADIO and the KSGEN task in the AES CCM.


Figure 65: On-the-fly encryption using a PPI connection

29.6 Decrypting packets on-the-fly in radio receive mode

When the AES CCM is decrypting a packet on-the-fly at the same time as the RADIO is receiving it, the AES CCM must read the encrypted packet from the same memory location as the RADIO is writing to.

The INPTR pointer in the AES CCM must therefore point to the same memory location as the PACKETPTR pointer in the RADIO, see Figure 66: Configuration of on-the-fly decryption on page 274.


Figure 66: Configuration of on-the-fly decryption

In order to match the RADIO’s timing, the KSGEN task must be triggered no later than when the START task in the RADIO is triggered. In addition, the CRYPT task must be triggered no earlier than when the ADDRESS event is generated by the RADIO.

If the CRYPT task is triggered exactly at the same time as the ADDRESS event is generated by the RADIO, the AES CCM will guarantee that the decryption is completed no later than when the END event in the RADIO is generated.

This use-case is illustrated in Figure 67: On-the-fly decryption using a PPI connection between the READY event in the RADIO and the KSGEN task in the AES CCM on page 275 using a PPI connection between the ADDRESS event in the RADIO and the CRYPT task in the AES CCM. The KSGEN task is triggered from the READY event in the RADIO through a PPI connection.


Figure 67: On-the-fly decryption using a PPI connection between the READY event in the RADIO and the KSGEN task in the AES CCM

29.7 CCM data structure

The CCM data structure is located in Data RAM at the memory location specified by the CNFPTR pointer register.

Table 60: CCM data structure overview

PropertyAddress offsetDescription
KEY016 byte AES key
PKTCTR16Octet0 (LSO) of packet counter
17Octet1 of packet counter
18Octet2 of packet counter
19Octet3 of packet counter
20Bit 6 – Bit 0: Octet4 (7 most significant bits of packet counter, with Bit 6 being the most significant bit) Bit7: Ignored
21Ignored
22Ignored
23Ignored
24Bit 0: Direction bit Bit 7 – Bit 1: Zero padded
IV258 byte initialization vector (IV) Octet0 (LSO) of IV, Octet1 of IV, ... , Octet7 (MSO) of IV

The NONCE vector (as specified by the Bluetooth Core Specification) will be generated by hardware based on the information specified in the CCM data structure from Table 60: CCM data structure overview on page 275 .

Table 61: Data structure for unencrypted packet

PropertyAddress offsetDescription
HEADER0Packet Header
LENGTH1Number of bytes in unencrypted payload
RFU2Reserved Future Use
PAYLOAD3Unencrypted payload

Table 62: Data structure for encrypted packet

PropertyAddress offsetDescription
HEADER0Packet Header
LENGTH1Number of bytes in encrypted payload including length of MIC
Important: LENGTH will be 0 for empty packets since the MIC is not added to empty packets
RFU2Reserved Future Use
PAYLOAD3Encrypted payload
MIC3 + payload lengthENCRYPT: 4 bytes encrypted MIC

29.8 EasyDMA and ERROR event

The CCM implements an EasyDMA mechanism for reading and writing to the RAM.

In some scenarios where the CPU and other DMA enabled peripherals are accessing the RAM at the same time, the CCM DMA could experience some bus conflicts which may also result in an error during encryption. If this happens, the ERROR event will be generated.

The EasyDMA will have finished accessing the RAM when the ENDKSGEN and ENDCRYPT events are generated.

If the CNFPTR, SCRATCHPTR, INPTR and the OUTPTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

29.9 Registers

Table 63: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000F000CCMCCMAES CCM Mode Encryption

Table 64: Register Overview

RegisterOffsetDescription
TASKS_KSGEN0x000Start generation of key-stream. This operation will stop by itself when completed.
TASKS_CRYPT0x004Start encryption/decryption. This operation will stop by itself when completed.
TASKS_STOP0x008Stop encryption/decryption
EVENTS_ENDKSGEN0x100Key-stream generation complete
EVENTS_ENDCRYPT0x104Encrypt/decrypt complete
EVENTS_ERROR0x108CCM error event
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
MICSTATUS0x400MIC check result
ENABLE0x500Enable
MODE0x504Operation mode
CNFPTR0x508Pointer to data structure holding AES key and NONCE vector
INPTR0x50CInput pointer
OUTPTR0x510Output pointer
SCRATCHPTR0x514Pointer to data area used for temporary storage

29.9.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENDKSGEN_CRYPT
Disabled0
Enabled1

29.9.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue

29.9.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENDKSGEN
Clear1
Disabled0
Enabled1
BRWENDCRYPT
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWERRORWrite &#x27;1&#x27; to Disable interrupt for ERROR event
See EVENTS_ERROR
Clear1Disable
Disabled0Read: Disabled
Enabled11Read: Enabled

29.9.4 MICSTATUS

Address offset: 0x400

MIC check result

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARMICSTATUSThe result of the MIC check performed during the previous decryption operation
CheckFailed0MIC check failed
CheckPassed1MIC check passed

29.9.5 ENABLE

Address offset: 0x500

Enable

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled2

29.9.6 MODE

Address offset: 0x504

Operation mode

Bit number313029282726252423222120191817161514131211109876543210
IdCA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValue
ARWMODE
Encryption0
Decryption1
BRWDATARATE
1Mbit0
2Mbit1
CRWLENGTH
Default0
Extended1

29.9.7 CNFPTR

Address offset: 0x508

Pointer to data structure holding AES key and NONCE vector

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCNFPTRPointer to the data structure holding the AES key and the CCM

Pointer to the data structure holding the AES key and the CCM NONCE vector (see Table 1 CCM data structure overview)

29.9.8 INPTR

Address offset: 0x50C

Input pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWINPTRInput pointer

29.9.9 OUTPTR

Address offset: 0x510

Output pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWOUTPTROutput pointer

29.9.10 SCRATCHPTR

Address offset: 0x514

Pointer to data area used for temporary storage

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSCRATCHPTRPointer to a scratch data area used for temporary storage during key-stream generation, MIC generation and encryption/ decryption. The scratch area is used for temporary storage of data during key-stream generation and encryption. A space of 43 bytes, or (16 + MAXPACKETSIZE) bytes, whatever is largest, must be reserved in RAM.

30 AAR — Accelerated address resolver

Accelerated address resolver is a cryptographic support function for implementing the "Resolvable Private Address Resolution Procedure" described in the Bluetooth Core specification v4.0. "Resolvable private address generation" should be achieved using ECB and is not supported by AAR.

The procedure allows two devices that share a secret key to generate and resolve a hash based on their device address. The AAR block enables real-time address resolution on incoming packets when configured as described in this chapter. This allows real-time packet filtering (whitelisting) using a list of known shared keys (Identity Resolving Keys (IRK) in Bluetooth).

30.1 Shared resources

The AAR shares registers and other resources with the peripherals that have the same ID as the AAR. The user must therefore disable all peripherals that have the same ID as the AAR before the AAR can be configured and used.

Disabling a peripheral that have the same ID as the AAR will not reset any of the registers that are shared with the AAR. It is therefore important to configure all relevant AAR registers explicitly to secure that it operates correctly

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

30.2 EasyDMA

The AAR implements EasyDMA for reading and writing to the RAM. The EasyDMA will have finished accessing the RAM when the END, RESOLVED, and NOTRESOLVED events are generated.

If the IRKPTR, ADDRPTR and the SCRATCHPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

30.3 Resolving a resolvable address

As per Bluetooth specification, a private resolvable address is composed of six bytes.

LSBMSB
random1 0
hash(24-bit)×prand(24-bit)

Figure 68: Resolvable address

To resolve an address the ADDRPTR register must point to the start of packet. The resolver is started by triggering the START task. A RESOLVED event is generated when the AAR manages to resolve the address using one of the Identity Resolving Keys (IRK) found in the IRK data structure. The AAR will use the IRK specified in the register IRK0 to IRK15 starting from IRK0. How many to be used is specified by the NIRK register. The AAR module will generate a NOTRESOLVED event if it is not able to resolve the address using the specified list of IRKs.

The AAR will go through the list of available IRKs in the IRK data structure and for each IRK try to resolve the address according to the Resolvable Private Address Resolution Procedure described in the Bluetooth Specification24. The time it takes to resolve an address may vary depending on where in the list the

resolvable address is located. The resolution time will also be affected by RAM accesses performed by other peripherals and the CPU. See the Electrical specifications for more information about resolution time.

The AAR will only do a comparison of the received address to those programmed in the module. And not check what type of address it actually is.

The AAR will stop as soon as it has managed to resolve the address, or after trying to resolve the address using NIRK number of IRKs from the IRK data structure. The AAR will generate an END event after it has stopped.


Figure 69: Address resolution with packet preloaded into RAM

30.4 Use case example for chaining RADIO packet reception with address resolution using AAR

The AAR may be started as soon as the 6 bytes required by the AAR have been received by the RADIO and stored in RAM. The ADDRPTR pointer must point to the start of packet.


Figure 70: Address resolution with packet loaded into RAM by the RADIO

30.5 IRK data structure

The IRK data structure is located in RAM at the memory location specified by the CNFPTR pointer register.

Table 65: IRK data structure overview

PropertyAddress offsetDescription
IRK00IRK number 0 (16 - byte)
IRK116IRK number 1 (16 - byte)
......
IRK15240IRK number 15 (16 - byte)

30.6 Registers

Table 66: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4000F000AARAARAccelerated Address Resolver

Table 67: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start resolving addresses based on IRKs specified in the IRK data structure
TASKS_STOP0x008Stop resolving addresses
EVENTS_END0x100Address resolution procedure complete
EVENTS_RESOLVED0x104Address resolved
EVENTS_NOTRESOLVED0x108Address not resolved
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
STATUS0x400Resolution status
ENABLE0x500Enable AAR
NIRK0x504Number of IRKs
IRKPTR0x508Pointer to IRK data structure
ADDRPTR0x510Pointer to the resolvable address
SCRATCHPTR0x514Pointer to data area used for temporary storage

30.6.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEND
Set1
Disabled0
Enabled1
BRWRESOLVED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWNOTRESOLVEDWrite &#x27;1&#x27; to Enable interrupt for RESOLVED event
See EVENTS_NOTRESOLVED
Set1Enable
Disabled0Read: Disabled
Enabled11Read: Enabled

30.6.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEND
Clear1
Disabled0
Enabled1
BRWRESOLVED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWNOTRESOLVEDWrite &#x27;1&#x27; to Disable interrupt for RESOLVED event
See EVENTS_NOTRESOLVED
Clear1Disable
Disabled0Read: Disabled
Enabled11Read: Enabled

30.6.3 STATUS

Address offset: 0x400

Resolution status

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSTATUS[0..15]The IRK that was used last time an address was resolved

30.6.4 ENABLE

Address offset: 0x500

Enable AAR

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled3

30.6.5 NIRK

Address offset: 0x504

Number of IRKs

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValueDescription
ARWNIRK[1..16]Number of Identity root keys available in the IRK data structure

30.6.6 IRKPTR

Address offset: 0x508

Pointer to the resolvable address (6-bytes)

Pointer to IRK data structure

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWIRKPTRPointer to the IRK data structure

30.6.7 ADDRPTR

Address offset: 0x510

Pointer to the resolvable address

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWADDRPTR

30.6.8 SCRATCHPTR

Address offset: 0x514

Pointer to data area used for temporary storage

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSCRATCHPTR

30.7 Electrical specification

30.7.1 AAR Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$t_{AAR,8}$ Time for address resolution of 8 IRKs48μs

31 SPIM — Serial peripheral interface master with EasyDMA

The SPI master can communicate with multiple slaves using individual chip select signals for each of the slave devices attached to a bus.

Listed here are the main features for the SPIM

• Three SPIM instances

• SPI mode 0-3

• EasyDMA direct transfer to/from RAM for both SPI Slave and SPI Master

• Individual selection of IO pin for each SPI signal


Figure 71: SPIM — SPI master with EasyDMA

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.

Table 68: SPI modes

ModeClock polarityCPOLClock phaseCPHA
SPI_MODE0 (Active High)0 (Leading)
SPI_MODE0 (Active High)1 (Trailing)
SPI_MODE1 (Active Low)0 (Leading)
SPI_MODE1 (Active Low)1 (Trailing)

31.1 Shared resources

The SPI shares registers and other resources with other peripherals that have the same ID as the SPI. Therefore, the user must disable all peripherals that have the same ID as the SPI before the SPI can be configured and used.

Disabling a peripheral that has the same ID as the SPI will not reset any of the registers that are shared with the SPI. It is therefore important to configure all relevant SPI registers explicitly to secure that it operates correctly.

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

31.2 EasyDMA

The SPI master implements EasyDMA for reading and writing of data packets from and to the DATA RAM without CPU involvement.

The RXD.PTR and TXD.PTR point to the RXD buffer (receive buffer) and TXD buffer (transmit buffer) respectively, see Figure 71: SPIM — SPI master with EasyDMA on page 285. RXD.MAXCNT and TXD.MAXCNT specify the maximum number of bytes allocated to the buffers.

The SPI master will automatically stop transmitting after TXD.MAXCNT bytes have been transmitted and RXD.MAXCNT bytes have been received. If TXD.MAXCNT is larger than RXD.MAXCNT, the superfluous received bytes will be ignored. If RXD.MAXCNT is larger than TXD.MAXCNT, the remaining transmitted bytes will contain the value defined in the ORC register.

If the RXD.PTR and the TXD.PTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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 event indicate that EasyDMA has finished accessing respectively the RX/TX buffer in RAM. The END event gets generated when both RX and TX are finished accessing the buffers in RAM.

31.2.1 EasyDMA list

EasyDMA supports one list type.

The supported list type is:

• Array list

EasyDMA array list

The EasyDMA array list can be represented by the data structure ArrayList_type.

For illustration, see the code example below. This data structure includes only a buffer with size equal to Channel.MAXCNT. EasyDMA will use the Channel.MAXCNT register to determine when the buffer is full. Replace 'Channel' by the specific data channel you want to use, for instance 'NRF_SPIM->RXD', 'NRF_SPIM->TXD', 'NRF_TWIM->RXD', etc.

The Channel.MAXCNT register cannot be specified larger than the actual size of the buffer. If Channel.MAXCNT is specified larger than the size of the buffer, the EasyDMA channel may overflow the buffer.

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
typedef struct ArrayList {
    uint8_t buffer[BUFFER_SIZE];
} ArrayList_type;
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.
Channel.MAXCNT = BUFFER_SIZE;
Channel.PTR = &MyArrayList;

buffer[0]buffer[1]buffer[2]buffer[3]
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]

Figure 72: EasyDMA array list

31.3 SPI master transaction sequence

An SPI master transaction consists of a sequence started by the START task followed by a number of events, and finally the STOP task.

An SPI master transaction is started by triggering the START task. The ENDTX event will be generated when the transmitter has transmitted all bytes in the TXD buffer as specified in the TXD.MAXCNT register. The ENDRX event will be generated when the receiver has filled the RXD buffer, i.e. received the last possible byte as specified in the RXD.MAXCNT register.

Following a START task, the SPI master will generate an END event when both ENDRX and ENDTX have been generated.

The SPI master is stopped by triggering the STOP task. A STOPPED event is generated when the SPI master has stopped.

If the ENDRX event has not already been generated when the SPI master has come to a stop, the SPI master will generate the ENDRX event explicitly even though the RX buffer is not full.

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 TXD.MAXCNT 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 Figure 73: SPI master transaction on page 288.


Figure 73: SPI master transaction

31.4 Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOP task may not be always needed (the peripheral might already be stopped), but if it is sent, software shall wait until the STOPPED event was received as a response before disabling the peripheral through the ENABLE register.

31.5 Master mode pin configuration

The SCK, MOSI, and MISO signals associated with the SPI master are mapped to physical pins according to the configuration specified in the PSEL.SCK, PSEL.MOSI, and PSEL.MISO registers respectively.

The PSEL.SCK, PSEL.MOSI, and PSEL.MISO registers and their configurations are only used as long as the SPI master is enabled, and retained only as long as the device is in ON mode. PSEL.SCK, PSEL.MOSI and PSEL.MISO must only be configured when the SPI master is disabled.

To secure correct behavior in the SPI, the pins used by the SPI must be configured in the GPIO peripheral as described in Table 69: GPIO configuration on page 288 prior to enabling the SPI. This configuration must be retained in the GPIO for the selected IOs as long as the SPI 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.

Table 69: GPIO configuration

SPI master signalSPI master pinDirectionOutput valueComments
SCKAs specified in PSEL.SCKOutputSame as CONFIG.CPOL
MOSIAs specified in PSEL.MOSIOutput0
MISOAs specified in PSEL.MISOInputNot applicable

31.6 Registers

Table 70: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000SPIMSPIMOSPI master 0
0x40004000SPIMSPIM1SPI master 1
0x40023000SPIMSPIM2SPI master 2

Table 71: Register Overview

RegisterOffsetDescription
TASKS_START0x010Start SPI transaction
TASKS_STOP0x014Stop SPI transaction
TASKS_SUSPEND0x01CSuspend SPI transaction
TASKS_RESUME0x020Resume SPI transaction
EVENTS_STOPPED0x104SPI transaction has stopped
EVENTS_ENDRX0x110End of RXD buffer reached
EVENTS_END0x118End of RXD buffer and TXD buffer reached
EVENTS_ENDTX0x120End of TXD buffer reached
EVENTS_STARTED0x14CTransaction started
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500Enable SPIM
PSEL.SCK0x508Pin select for SCK
PSEL.MOSI0x50CPin select for MOSI signal
PSEL.MISO0x510Pin select for MISO signal
FREQUENCY0x524SPI frequency. Accuracy depends on the HFCLK source selected.
RXD.PTR0x534Data pointer
RXD.MAXCNT0x538Maximum number of bytes in receive buffer
RXD.AMOUNT0x53CNumber of bytes transferred in the last transaction
RXD.LIST0x540EasyDMA list type
TXD.PTR0x544Data pointer
TXD.MAXCNT0x548Maximum number of bytes in transmit buffer
TXD.AMOUNT0x54CNumber of bytes transferred in the last transaction
TXD.LIST0x550EasyDMA list type
CONFIG0x554Configuration register
ORC0x5C0Over-read character. Character clocked out in case and over-read of the TXD buffer.

31.6.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWEND_STARTShortcut between END event and START task
See EVENTS_END and TASKS_START
Disabled0Disable shortcut
Enabled1Enable shortcut

31.6.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
Set1
Disabled0
Enabled1
BRWENDRX
Set1
Disabled0
Enabled1
CRWEND
Write &#x27;1&#x27; to Enable interrupt for ENDTX event
See EVENTS_ENDX
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWENDTXWrite &#x27;1&#x27; to Enable interrupt for ENDTX event
See EVENTS_ENDTX
Set1Enable
Disabled0Read: Disabled
enabled1Read: Enabled
ERWSTARTEDWrite &#x27;1&#x27; to Enable interrupt for STARTED event
See EVENTS_STARTEDX
Set1Enable
Disabled0Read: Disabled

31.6.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
BRWENDRX
Write &#x27;1&#x27; to Disable interrupt for ENDRX event
See EVENTS_STOPPED
Disable
Read: Disabled
Read: Enabled
CRWENDWrite &#x27;1&#x27; to Disable interrupt for END event
See EVENTS_END
Disable
Read: Disabled
Read: Enabled
DRWENDTXWrite &#x27;1&#x27; to Disable interrupt for ENDTX event
See EVENTS_ENDTX
Bit number313029282726252423222120191817161514131211109876543210
IdEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWSTARTEDWrite &#x27;1&#x27; to Disable interrupt for STARTED event
See EVENTS_STARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

31.6.4 ENABLE

Address offset: 0x500

Enable SPIM

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled7

31.6.5 PSEL.SCK

Address offset: 0x508

Pin select for SCK

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

31.6.6 PSEL.MOSI

Address offset: 0x50C

Pin select for MOSI signal

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

31.6.7 PSEL.MISO

Address offset: 0x510

Pin select for MISO signal

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

31.6.8 FREQUENCY

Address offset: 0x524

SPI frequency. Accuracy depends on the HFCLK source selected.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWFREQUENCYSPI master data rate
K1250x02000000125 kbps
K2500x04000000250 kbps
K5000x08000000500 kbps
M10x100000001 Mbps
M20x200000002 Mbps
M40x400000004 Mbps
M80x800000008 Mbps

31.6.9 RXD.PTR

Address offset: 0x534

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

31.6.10 RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in receive buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in receive buffer

31.6.11 RXD.AMOUNT

Address offset: 0x53C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction

31.6.12 RXD.LIST

Address offset: 0x540

EasyDMA list type

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWLISTList type
Disabled0Disable EasyDMA list
ArrayList1Use array list

31.6.13 TXD.PTR

Address offset: 0x544

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

31.6.14 TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in transmit buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in transmit buffer

31.6.15 TXD.AMOUNT

Address offset: 0x54C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction

31.6.16 TXD.LIST

Address offset: 0x550

EasyDMA list type

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWLIST
Disabled0
ArrayList1

31.6.17 CONFIG

Address offset: 0x554

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWORDER
MsbFirst0
LsbFirst1
BRWCPHA
Leading0
Trailing1
CRWCPOL
ActiveHigh0
ActiveLow1

31.6.18 ORC

Address offset: 0x5C0

Over-read character. Character clocked out in case and over-read of the TXD buffer.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWORCOver-read character. Character clocked out in case and over-

31.7 Electrical specification

31.7.1 SPIM master interface electrical specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{SPIM}$ Bit rates for $SPIM^{25}$ $8^{26}$ Mbps
$I_{SPIM,2Mbps}$ Run current for SPIM, 2 Mbps50μA
$I_{SPIM,8Mbps}$ Run current for SPIM, 8 Mbps50μA
$I_{SPIM,IDLE}$ Idle current for SPIM (STARTed, no CSN activity)1μA
$t_{SPIM,START}$ Time from START task to transmission started......μs

31.7.2 Serial Peripheral Interface Master (SPIM) timing specifications

SymbolDescriptionMin.Typ.Max.Units
$t_{SPIM,CSCK}$ SCK period......ns
$t_{SPIM,RSCK,LD}$ SCK rise time, standard drive $^{a}$ $t_{RF,25pF}$
$t_{SPIM,RSCK,HD}$ SCK rise time, high drive $^{a}$ $t_{HRF,25pF}$
$t_{SPIM,FSCK,LD}$ SCK fall time, standard drive $^{a}$ $t_{RF,25pF}$
$t_{SPIM,FSCK,HD}$ SCK fall time, high drive $^{a}$ $t_{HRF,25pF}$
$t_{SPIM,WHSCK}$ SCK high time $^{a}$ (0.5*t $_{CSCK}$ )
- $t_{RSCK}$

25 High bit rates may require GPIOs to be set as High Drive, see GPIO chapter for more details.
26 The actual maximum data rate depends on the slave's CLK to MISO and MOSI setup and hold timings.
a At 25pF load, including GPIO pin capacitance, see GPIO spec.

SymbolDescriptionMin.Typ.Max.Units
$t_{SPIM,WLSCK}$ SCK low time $^{a}$ (0.5*t $_{CSCK}$ )
- t $_{FSCK}$
$t_{SPIM,SUMI}$ MISO to CLK edge setup time19ns
$t_{SPIM,HMI}$ CLK edge to MISO hold time18ns
$t_{SPIM,VMO}$ CLK edge to MOSI valid59ns
$t_{SPIM,HMO}$ MOSI hold time after CLK edge20ns


Figure 74: SPIM timing diagram

32 SPIS — Serial peripheral interface slave with EasyDMA

SPI slave (SPIS) is implemented with EasyDMA support for ultra low power serial communication from an external SPI master. EasyDMA in conjunction with hardware-based semaphore mechanisms removes all real-time requirements associated with controlling the SPI slave from a low priority CPU execution context.


Figure 75: SPI slave

The SPIS supports SPI modes 0 through 3. The CONFIG register allows setting CPOL and CPHA appropriately.

Table 72: SPI modes

ModeClock polarityCPOLClock phaseCPHA
SPI_MODE00 (Leading)0 (Active High)
SPI_MODE10 (Leading)1 (Active Low)
SPI_MODE21 (Trailing)0 (Active High)
SPI_MODE31 (Trailing)1 (Active Low)

32.1 Shared resources

The SPI slave shares registers and other resources with other peripherals that have the same ID as the SPI slave. Therefore, you must disable all peripherals that have the same ID as the SPI slave before the SPI slave can be configured and used.

Disabling a peripheral that has the same ID as the SPI slave will not reset any of the registers that are shared with the SPI slave. It is important to configure all relevant SPI slave registers explicitly to secure that it operates correctly.

The Instantiation table in Instantiation on page 25 shows which peripherals have the same ID as the SPI slave.

32.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 TXD.PTR and the RXD.PTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

32.3 SPI slave operation

SPI slave uses two memory pointers, RXD.PTR and TXD.PTR, that point to the RXD buffer (receive buffer) and TXD buffer (transmit buffer) respectively. Since these buffers are located in RAM, which can be accessed by both the SPI slave and the CPU, a hardware based semaphore mechanism is implemented to enable safe sharing.

See Figure 76: SPI transaction when shortcut between END and ACQUIRE is enabled on page 298.

Before the CPU can safely update the RXD.PTR and TXD.PTR pointers it must first acquire the SPI semaphore. The CPU can acquire the semaphore by triggering the ACQUIRE task and then receiving the ACQUIRED event. When the CPU has updated the RXD.PTR and TXD.PTR pointers the CPU must release the semaphore before the SPI slave will be able to acquire it. The CPU releases the semaphore by triggering the RELEASE task. This is illustrated in Figure 76: SPI transaction when shortcut between END and ACQUIRE is enabled on page 298. Triggering the RELEASE task when the semaphore is not granted to the CPU will have no effect.

The semaphore mechanism does not, at any time, prevent the CPU from performing read or write access to the RXD.PTR register, the TXD.PTR registers, or the RAM that these pointers are pointing to. The semaphore is only telling when these can be updated by the CPU so that safe sharing is achieved.

The semaphore is by default assigned to the CPU after the SPI slave is enabled. No ACQUIRED event will be generated for this initial semaphore handover. An ACQUIRED event will be generated immediately if the ACQUIRE task is triggered while the semaphore is assigned to the CPU.

The SPI slave will try to acquire the semaphore when CSN goes low. If the SPI slave does not manage to acquire the semaphore at this point, the transaction will be ignored. This means that all incoming data on MOSI will be discarded, and the DEF (default) character will be clocked out on the MISO line throughout the whole transaction. This will also be the case even if the semaphore is released by the CPU during the 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 Figure 76: SPI transaction when shortcut between END and ACQUIRE is enabled on page 298, 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 TXD.PTR and RXD.PTR 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 RXD.AMOUNT and TXD.AMOUNT registers are updated when a granted transaction is completed. The TXD.AMOUNT 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 RXD.AMOUNT 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.


Figure 76: SPI transaction when shortcut between END and ACQUIRE is enabled

32.4 Pin configuration

The CSN, SCK, MOSI, and MISO signals associated with the SPI slave are mapped to physical pins according to the configuration specified in the PSEL.CSN, PSEL.SCK, PSEL.MOSI, and PSEL.MISO registers respectively. If the CONNECT field of any of these registers is set to Disconnected, the associated SPI slave signal will not be connected to any physical pins.

The PSEL.CSN, PSEL.SCK, PSEL.MOSI, and PSEL.MISO registers and their configurations are only used as long as the SPI slave is enabled, and retained only as long as the device is in System ON mode, see POWER — Power supply on page 81 chapter for more information about power modes. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register. PSEL.CSN, PSEL.SCK, PSEL.MOSI, and PSEL.MISO must only be configured when the SPI slave is disabled.

To secure correct behavior in the SPI slave, the pins used by the SPI slave must be configured in the GPIO peripheral as described in Table 73: GPIO configuration before enabling peripheral on page 299 before enabling the SPI slave. This is to secure that the pins used by the SPI slave are driven correctly if the SP slave itself is temporarily disabled, or if the device temporarily enters System OFF. This configuration must be retained in the GPIO for the selected I/Os as long as the SPI slave is to be recognized by an external SPI master.

The MISO line is set in high impedance as long as the SPI slave is not selected with CSN.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 73: GPIO configuration before enabling peripheral

SPI signalSPI pinDirectionOutput valueComment
CSNAs specified in PSEL.CSNInputNot applicable
SCKAs specified in PSEL.SCKInputNot applicable
MOSIAs specified in PSEL.MOSIInputNot applicable
MISOAs specified in PSEL.MISOInputNot applicableEmulates that the SPI slave is not selected.

32.5 Registers

Table 74: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000SPISSPISOSPI slave 0
0x40004000SPISSPIS1SPI slave 1
0x40023000SPISSPIS2SPI slave 2

Table 75: Register Overview

RegisterOffsetDescription
TASKS_ACQUIRE0x024Acquire SPI semaphore
TASKS_RELEASE0x028Release SPI semaphore, enabling the SPI slave to acquire it
EVENTS_END0x104Granted transaction completed
EVENTS_ENDRX0x110End of RXD buffer reached
EVENTS_ACQUIRED0x128Semaphore acquired
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
SEMSTAT0x400Semaphore status register
STATUS0x440Status from last transaction
ENABLE0x500Enable SPI slave
PSELSCK0x508Pin select for SCKDeprecated
PSELMISO0x50CPin select for MISODeprecated
PSELMOSI0x510Pin select for MOSIDeprecated
PSELCSN0x514Pin select for CSNDeprecated
PSEL.SCK0x508Pin select for SCK
PSEL.MISO0x50CPin select for MISO signal
PSEL.MOSI0x510Pin select for MOSI signal
PSEL.CSN0x514Pin select for CSN signal
RXDPTR0x534RXD data pointerDeprecated
MAXRX0x538Maximum number of bytes in receive bufferDeprecated
AMOUNTRX0x53CNumber of bytes received in last granted transactionDeprecated
RXD.PTR0x534RXD data pointer
RXD.MAXCNT0x538Maximum number of bytes in receive buffer
RXD.AMOUNT0x53CNumber of bytes received in last granted transaction
TXDPTR0x544TXD data pointerDeprecated
MAXTX0x548Maximum number of bytes in transmit bufferDeprecated
AMOUNTTX0x54CNumber of bytes transmitted in last granted transactionDeprecated
TXD.PTR0x544TXD data pointer
TXD.MAXCNT0x548Maximum number of bytes in transmit buffer
TXD.AMOUNT0x54CNumber of bytes transmitted in last granted transaction
CONFIG0x554Configuration register
RegisterOffsetDescription
DEF0x55CDefault character. Character clocked out in case of an ignored transaction.
ORC0x5C0Over-read character

32.5.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEND_ACQUIREShortcut between END event and ACQUIRE task
See EVENTS_END and TASKS_ACQUIRE
Disabled0Disable shortcut
Enabled1Enable shortcut

32.5.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEND
Set1
Disabled0
Enabled1
BRWENDRX
Set1
Disabled0
Enabled1
CRWACQUIRED
Set1
Disabled0
Enabled1

32.5.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARWEND
Clear1
Disabled0
Enabled1
BRWENDRX
Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Clear1
Disabled0
Enabled1
CRWACQUIRED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

32.5.4 SEMSTAT

Address offset: 0x400

Semaphore status register

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValue
ARSEMSTAT
Free0
CPU1
SPIS2
CPUPending3

32.5.5 STATUS

Address offset: 0x440

Status from last transaction

Individual bits are cleared by writing a '1' to the bits that shall be cleared

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERREAD
NotPresent0
Present1
Clear1
BRWOVERFLOW
NotPresent0
Present1
Clear1

32.5.6 ENABLE

Address offset: 0x500

Enable SPI slave

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWENABLE
Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
Disabled0Disable SPI slave
Enabled2Enable SPI slave

32.5.7 PSELSCK ( Deprecated )

Address offset: 0x508

Pin select for SCK

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELSCK[0..31]Pin number configuration for SPI SCK signal
Disconnected0xFFFFFFFDisconnect

32.5.8 PSELMISO ( Deprecated )

Address offset: 0x50C

Pin select for MISO

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELMISO[0..31]Pin number configuration for SPI MISO signal
Disconnected0xFFFFFFFDisconnect

32.5.9 PSELMOSI ( Deprecated )

Address offset: 0x510

Pin select for MOSI

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELMOSI[0..31]Pin number configuration for SPI MOSI signal
Disconnected0xFFFFFFFDisconnect

32.5.10 PSELCSN ( Deprecated )

Address offset: 0x514

Pin select for CSN

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELCSN[0..31]Pin number configuration for SPI CSN signal
Disconnected0xFFFFFFFDisconnect

32.5.11 PSEL.SCK

Address offset: 0x508

Pin select for SCK

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

32.5.12 PSEL.MISO

Address offset: 0x50C

Pin select for MISO signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValue
ARWPIN[0..31]
BRWCONNECT
Disconnected1
Connected0

32.5.13 PSEL.MOSI

Address offset: 0x510

Pin select for MOSI signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

32.5.14 PSEL.CSN

Address offset: 0x514

Pin select for CSN signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

32.5.15 RXDPTR ( Deprecated )

Address offset: 0x534

RXD data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWRXDPTR

32.5.16 MAXRX ( Deprecated )

Address offset: 0x538

Maximum number of bytes in receive buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXRXMaximum number of bytes in receive buffer

32.5.17 AMOUNTRX ( Deprecated )

Address offset: 0x53C

Number of bytes received in last granted transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTRXNumber of bytes received in the last granted transaction

32.5.18 RXD.PTR

Address offset: 0x534

RXD data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRRXD data pointer

32.5.19 RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in receive buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in receive buffer

32.5.20 RXD.AMOUNT

Address offset: 0x53C

Number of bytes received in last granted transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes received in the last granted transaction

32.5.21 TXDPTR ( Deprecated )

Address offset: 0x544

TXD data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTXDPTRTXD data pointer

32.5.22 MAXTX ( Deprecated )

Address offset: 0x548

Maximum number of bytes in transmit buffer

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

32.5.23 AMOUNTTX ( Deprecated )

Address offset: 0x54C

Number of bytes transmitted in last granted transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTTXNumber of bytes transmitted in last granted transaction

32.5.24 TXD.PTR

Address offset: 0x544

TXD data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRTXD data pointer

32.5.25 TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in transmit buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in transmit buffer

32.5.26 TXD.AMOUNT

Address offset: 0x54C

Number of bytes transmitted in last granted transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transmitted in last granted transaction

32.5.27 CONFIG

Address offset: 0x554

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWORDER
MsbFirst0
LsbFirst1
BRWCPHA
Leading0
Trailing1
CRWCPOL
ActiveHigh0
ActiveLow1

32.5.28 DEF

Address offset: 0x55C

Default character. Character clocked out in case of an ignored transaction.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDEFDefault character. Character clocked out in case of an ignored

32.5.29 ORC

Address offset: 0x5C0

Over-read character

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWORCOver-read character. Character clocked out after an over-read of the transmit buffer.

32.6 Electrical specification

32.6.1 SPIS slave interface electrical specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{SPIS}$ Bit rates for $SPIS^{27}$ $8^{28}$ Mbps
$I_{SPIS,2Mbps}$ Run current for SPIS, 2 Mbps45μA
$I_{SPIS,8Mbps}$ Run current for SPIS, 8 Mbps45μA
$I_{SPIS,IDLE}$ Idle current for SPIS (STARTed, no CSN activity)1μA
$t_{SPIS,LP,START}$ Time from RELEASE task to ready to receive/transmit (CSN active), Low power mode $t_{SPIS,CL,STAR}$ + $t_{START_HFIN}$ μs
$t_{SPIS,CL,START}$ Time from RELEASE task to receive/transmit (CSN active), Constant latency mode0.125μs

32.6.2 Serial Peripheral Interface Slave (SPIS) timing specifications

SymbolDescriptionMin.Typ.Max.Units
$t_{SPIS,CSCKIN,8Mbps}$ SCK input period at 8Mbps125ns
$t_{SPIS,CSCKIN,4Mbps}$ SCK input period at 4Mbps250ns
$t_{SPIS,CSCKIN,2Mbps}$ SCK input period at 2Mbps500ns
$t_{SPIS,RFSCKIN}$ SCK input rise/fall time30ns
$t_{SPIS,WHSCKIN}$ SCK input high time30ns
$t_{SPIS,WLSCKIN}$ SCK input low time30ns
$t_{SPIS,SUCSN,LP}$ CSN to CLK setup time, Low power mode $t_{SPIS,SUCSN,I}$ + $t_{START_HFIN}$ ns
$t_{SPIS,SUCSN,CL}$ CSN to CLK setup time, Constant latency mode1000ns
$t_{SPIS,HCSN}$ CLK to CSN hold time2000ns
$t_{SPIS,ASO}$ CSN to MISO drivena1000ns
$t_{SPIS,DISSO}$ CSN to MISO disableda68ns
$t_{SPIS,CWH}$ CSN inactive time300ns
$t_{SPIS,VSO}$ CLK edge to MISO valid59ns
$t_{SPIS,HSO}$ MISO hold time after CLK edge $20^{29}$ ns
$t_{SPIS,SUSI}$ MOSI to CLK edge setup time19ns
$t_{SPIS,HSI}$ CLK edge to MOSI hold time18ns


Figure 77: SPIS timing diagram


Figure 78: Common SPIM and SPIS timing diagram

33 TWIM — I2C compatible two-wire interface master with EasyDMA

TWI master with EasyDMA (TWIM) is a two-wire half-duplex master which can communicate with multiple slave devices connected to the same bus

Listed here are the main features for TWIM:

${ \mathsf { I } } ^ { 2 } { \mathsf { C } }$ compatible

• 100 kbps, 250 kbps, or 400 kbps

• Support for clock stretching

• EasyDMA

The two-wire interface can communicate with a bi-directional wired-AND bus with two lines (SCL, SDA). The protocol makes it possible to interconnect up to 127 individually addressable devices. TWIM is not compatible with CBUS.

The GPIOs used for each two-wire interface line 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.


Figure 79: TWI master with EasyDMA

A typical TWI setup consists of one master and one or more slaves. For an example, see Figure 80: A typical TWI setup comprising one master and three slaves on page 310. This TWIM is only able to operate as a single master on the TWI bus. Multi-master bus configuration is not supported.


Figure 80: A typical TWI setup comprising one master and three slaves

This TWI master supports clock stretching performed by the slaves. 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.

33.1 Shared resources

The TWI master shares registers and other resources with other peripherals that have the same ID as the TWI master. Therefore, you must disable all peripherals that have the same ID as the TWI master before the TWI master can be configured and used.

Disabling a peripheral that has the same ID as the TWI master will not reset any of the registers that are shared with the TWI master. It is therefore important to configure all relevant registers explicitly to secure that the TWI master operates correctly.

The Instantiation table in Instantiation on page 25 shows which peripherals have the same ID as the TWI.

33.2 EasyDMA

The TWI master implements EasyDMA for reading and writing to and from the RAM.

If the TXD.PTR and the RXD.PTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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.

33.2.1 EasyDMA list

EasyDMA supports one list type.

The supported list type is:

• Array list

EasyDMA array list

The EasyDMA array list can be represented by the data structure ArrayList_type.

For illustration, see the code example below. This data structure includes only a buffer with size equal to Channel.MAXCNT. EasyDMA will use the Channel.MAXCNT register to determine when the buffer is full. Replace 'Channel' by the specific data channel you want to use, for instance 'NRF_SPIM->RXD', 'NRF_SPIM->TXD', 'NRF_TWIM->RXD', etc.

The Channel.MAXCNT register cannot be specified larger than the actual size of the buffer. If Channel.MAXCNT is specified larger than the size of the buffer, the EasyDMA channel may overflow the buffer.

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.


Figure 81: EasyDMA array list

33.3 Master write sequence

A TWI master write sequence is started by triggering the STARTTX task. After the STARTTX task has been triggered, the TWI master will generate a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 0 (WRITE=0, READ=1).

The address must match the address of the slave device that the master wants to write to. The READ/ WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) generated by the slave.

After receiving the ACK bit, the TWI master will clock out the data bytes found in the transmit buffer located in RAM at the address specified in the TXD.PTR register. Each byte clocked out from the master will be followed by an ACK/NACK bit clocked in from the slave.

A typical TWI master write sequence is illustrated in Figure 82: TWI master writing data to a slave on page 312. 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.


Figure 82: TWI master writing data to a slave

The TWI master will generate a LASTTX event when it starts to transmit the last byte, this is illustrated in Figure 82: TWI master writing data to a slave on page 312

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.

33.4 Master read sequence

A TWI master read sequence is started by triggering the STARTRX task. After the STARTRX task has been triggered the TWI master will generate a start condition on the TWI bus, followed by clocking out the 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 RXD.PTR 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 Figure 83: The TWI master reading data from a slave on page 313. 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 Figure 83: The TWI master reading data from a slave on page 313. If RXD.MAXCNT > 1 the LASTRX event is generated after sending the ACK of the previously received byte. If RXD.MAXCNT = 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.


Figure 83: The TWI master reading data from a slave

33.5 Master repeated start sequence

A typical repeated start sequence is one in which the TWI master writes two bytes to the slave followed by reading four bytes from the slave. This example uses shortcuts to perform the simplest type of repeated start sequence, i.e. one write followed by one read. The same approach can be used to perform a repeated start sequence where the sequence is read followed by write.

The figure Figure 84: A repeated start sequence, where the TWI master writes two bytes followed by reading 4 bytes from the slave on page 313 illustrates this:


Figure 84: 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 Figure 85: A double repeated start sequence using the SUSPEND task to secure safe operation in low priority interrupts on page 314.


Figure 85: A double repeated start sequence using the SUSPEND task to secure safe operation in low priority interrupts

33.6 Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOP task may not be always needed (the peripheral might already be stopped), but if it is sent, software shall wait until the STOPPED event was received as a response before disabling the peripheral through the ENABLE register.

33.7 Master mode pin configuration

The SCL and SDA signals associated with the TWI master are mapped to physical pins according to the configuration specified in the PSEL.SCL and PSEL.SDA registers respectively.

The PSEL.SCL and PSEL.SDA registers and their configurations are only used as long as the TWI master is enabled, and retained only as long as the device is in ON mode. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register. PSEL.SCL, PSEL.SDA 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 Table 76: GPIO configuration before enabling peripheral on page 314.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 76: GPIO configuration before enabling peripheral

TWI master signalTWI master pinDirectionOutput valueDrive strength
SCLAs specified in PSEL.SCLInputNot applicableS0D1
SDAAs specified in PSEL.SDAInputNot applicableS0D1

33.8 Registers

Table 77: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000TWIMTWIM0Two-wire interface master 0
0x40004000TWIMTWIM1Two-wire interface master 1

Table 78: Register Overview

RegisterOffsetDescription
TASKS_STARTRX0x000Start TWI receive sequence
TASKS_STARTTX0x008Start TWI transmit sequence
TASKS_STOP0x014Stop TWI transaction. Must be issued while the TWI master is not suspended.
TASKS_SUSPEND0x01CSuspend TWI transaction
TASKS_RESUME0x020Resume TWI transaction
EVENTS_STOPPED0x104TWI stopped
EVENTS_ERROR0x124TWI error
EVENTS_SUSPENDED0x148Last byte has been sent out after the SUSPEND task has been issued, TWI traffic is now suspended.
EVENTS_RXSTARTED0x14CReceive sequence started
EVENTS_TXSTARTED0x150Transmit sequence started
EVENTS_LASTRX0x15CByte boundary, starting to receive the last byte
EVENTS_LASTTX0x160Byte boundary, starting to transmit the last byte
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x4C4Error source
ENABLE0x500Enable TWIM
PSEL.SCL0x508Pin select for SCL signal
PSEL.SDA0x50CPin select for SDA signal
FREQUENCY0x524TWI frequency
RXD.PTR0x534Data pointer
RXD.MAXCNT0x538Maximum number of bytes in receive buffer
RXD.AMOUNT0x53CNumber of bytes transferred in the last transaction
RXD.LIST0x540EasyDMA list type
TXD.PTR0x544Data pointer
TXD.MAXCNT0x548Maximum number of bytes in transmit buffer
TXD.AMOUNT0x54CNumber of bytes transferred in the last transaction
TXD.LIST0x550EasyDMA list type
ADDRESS0x588Address used in the TWI transfer

33.8.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdFDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWLASTTX_STARTRX
Disabled0
Enabled1
BRWLASTTX_SUSPEND
Disabled0
Enabled1
CRWLASTTX_STOP
Disabled0See EVENTS_LASTTX and TASKS_STOP
Enabled1Disable shortcut
DRWLASTRX_STARTTXShortcut between LASTRX event and STARTTX task
See EVENTS_LASTRX and TASKS_STARTTX
Disabled0Disable shortcut
Bit number313029282726252423222120191817161514131211109876543210
IdFDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Enabled1
FRWLASTRX_STOP
Disabled0
Enabled1

33.8.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdJIHGFDA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSTOPPED
Disabled0
Enabled1
DRWERROR
Disabled0
Enabled1
FRWSUSPENDED
Disabled0See EVENTS_ERROR
Enabled1
GRWRXSTARTED
See EVENTS_SUSPENDED
Disabled0Disable
Enabled1Enable
HRWTXSTARTEDEnable or disable interrupt for RXSTARTED event
See EVENTS_RXSTARTED
Disabled0Disable
Enabled1Enable
IRWLASTRXEnable or disable interrupt for LASTRX event
See EVENTS_LASTRX
Disabled0Disable
Enabled1Enable
JRWLASTTXEnable or disable interrupt for LASTTX event
See EVENTS_LASTTX
Disabled0Disable
Enabled1Enable

33.8.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
Set1
Disabled0
Enabled1
DRWERROR
Set1
Disabled0
Enabled1
FRWSUSPENDEDWrite &#x27;1&#x27; to Enable interrupt for ERROR event
See EVENTS_ERROR
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWRXSTARTEDWrite &#x27;1&#x27; to Enable interrupt for SUSPENDED event
See EVENTS_SUSPENDED
Set1Enable
Disabled0Read: Disabled
HRXSTARTEDSet1Write &#x27;1&#x27; to Enable interrupt for RXSTARTED event
Set1See EVENTS_RXSTARTED
Disabled0Enable
Enabled1Read: Disabled
IRWLASTRXWrite &#x27;1&#x27; to Enable interrupt for LASTRX event
Set1See EVENTS_LASTRX
Disabled0Enable
Enabled1Read: Disabled
JRWLASTTXWrite &#x27;1&#x27; to Enable interrupt for LASTTX event
Set1See EVENTS_LASTTX
Disabled0Enable

33.8.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdJIHGFDA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSTOPPEDWrite '1' to Disable interrupt for STOPPED event
See EVENTS_STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWERRORWrite '1' to Disable interrupt for ERROR event
See EVENTS_ERROR
IdJ
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Clear1
Disabled0
Enabled1
FRWSUSPENDED
Clear1
Disabled0
Enabled1
GRWRXSTARTED
Clear1
Disabled0
Enabled1
HRWTXSTARTED
Clear1
Disabled0
Enabled1
IRWLASTRX
Clear1
Disabled0
Enabled1
JRWLASTTX
Clear1
Disabled0
Enabled1

33.8.5 ERRORSRC

Address offset: 0x4C4

Error source

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERRUN
overrun error
NotReceived0
Received1
BRWANACK
NotReceived0
Received1
CRWDNACK
NotReceived0
Received1

33.8.6 ENABLE

Address offset: 0x500

Enable TWIM

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled6

33.8.7 PSEL.SCL

Address offset: 0x508

Pin select for SCL signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

33.8.8 PSEL.SDA

Address offset: 0x50C

Pin select for SDA signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

33.8.9 FREQUENCY

Address offset: 0x524

TWI frequency

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWFREQUENCYTWI master clock frequency
K1000x01980000100 kbps
K2500x04000000250 kbps
K4000x06400000400 kbps

33.8.10 RXD.PTR

Address offset: 0x534

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

33.8.11 RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in receive buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNT[1..255]Maximum number of bytes in receive buffer

33.8.12 RXD.AMOUNT

Address offset: 0x53C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction. In case of NACK error, includes the NACK&#x27;ed byte.

33.8.13 RXD.LIST

Address offset: 0x540

EasyDMA list type

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWLIST
Disabled
ArrayList

33.8.14 TXD.PTR

Address offset: 0x544

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARWPTR

33.8.15 TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in transmit buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNT[1..255]Maximum number of bytes in transmit buffer

33.8.16 TXD.AMOUNT

Address offset: 0x54C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction. In case of

33.8.17 TXD.LIST

Address offset: 0x550

EasyDMA list type

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWLISTList type
Disabled0Disable EasyDMA list
ArrayList1Use array list

33.8.18 ADDRESS

Address offset: 0x588

Address used in the TWI transfer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWADDRESSAddress used in the TWI transfer

33.9 Electrical specification

33.9.1 TWIM interface electrical specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{TWIM}$ Bit rates for TWIM $^{30}$ 100400kbps
$I_{TWIM,100kbps}$ Run current for TWIM, 100 kbps50μA
$I_{TWIM,400kbps}$ Run current for TWIM, 400 kbps50μA
$t_{TWIM,START,LP}$ Time from STARTRX/STARTTX task to transmission started, Low power mode $t_{TWIM,START}$ + $t_{START\_HFIN}$ μs
$t_{TWIM,START,CL}$ Time from STARTRX/STARTTX task to transmission started, Constant latency mode1.5μs

33.9.2 Two Wire Interface Master (TWIM) timing specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{\text{TWIM,SCL,100kbps}}$ SCL clock frequency, 100 kbps100kHz
$f_{\text{TWIM,SCL,250kbps}}$ SCL clock frequency, 250 kbps250kHz
$f_{\text{TWIM,SCL,400kbps}}$ SCL clock frequency, 400 kbps400kHz
$t_{\text{TWIM,SU_DAT}}$ Data setup time before positive edge on SCL – all modes300ns
$t_{\text{TWIM,HD_DAT}}$ Data hold time after negative edge on SCL – all modes500ns
$t_{\text{TWIM,HD_STA,100kbps}}$ TWIM master hold time for START and repeated START condition, 100 kbps10000ns
$t_{\text{TWIM,HD_STA,250kbps}}$ TWIM master hold time for START and repeated START condition, 250kbps4000ns
$t_{\text{TWIM,HD_STA,400kbps}}$ TWIM master hold time for START and repeated START condition, 400 kbps2500ns
$t_{\text{TWIM,SU_STO,100kbps}}$ TWIM master setup time from SCL high to STOP condition, 100 kbps5000ns
$t_{\text{TWIM,SU_STO,250kbps}}$ TWIM master setup time from SCL high to STOP condition, 250 kbps2000ns
$t_{\text{TWIM,SU_STO,400kbps}}$ TWIM master setup time from SCL high to STOP condition, 400 kbps1250ns
$t_{\text{TWIM,BUF,100kbps}}$ TWIM master bus free time between STOP and START conditions, 100 kbps5800ns
$t_{\text{TWIM,BUF,250kbps}}$ TWIM master bus free time between STOP and START conditions, 250 kbps2700ns
$t_{\text{TWIM,BUF,400kbps}}$ TWIM master bus free time between STOP and START conditions, 400 kbps2100ns


Figure 86: TWIM timing diagram, 1 byte transaction


Figure 87: Recommended TWIM pullup value vs. line capacitance
• The I2C specification allows a line capacitance of 400 ${ \mathsf { p F } }$ at most.
• The nRF52832 internal pullup has a fixed value of typ. 13 kOhm, see $\mathsf { R } _ { \mathsf { P U } }$ in the GPIO chapter.

34 TWIS — I2C compatible two-wire interface slave with EasyDMA

TWI slave with EasyDMA (TWIS) is compatible with ${ \mathsf { I } } ^ { 2 } { \mathsf { C } }$ operating at 100 kHz and 400 kHz. The TWI transmitter and receiver implement EasyDMA.


Figure 88: TWI slave with EasyDMA

A typical TWI setup consists of one master and one or more slaves. For an example, see Figure 89: A typical TWI setup comprising one master and three slaves on page 323. TWIS is only able to operate with a single master on the TWI bus.


Figure 89: A typical TWI setup comprising one master and three slaves

The TWI slave state machine is illustrated in Figure 90: TWI slave state machine on page 324 and Table 79: TWI slave state machine symbols on page 324 is explaining the different symbols used in the state machine.


Figure 90: TWI slave state machine

Table 79: TWI slave state machine symbols

SymbolTypeDescription
ENABLERegisterThe TWI slave has been enabled via the ENABLE register
PREPARETXTaskThe TASKS_PREPARETX task has been triggered
STOPTaskThe TASKS_STOP task has been triggered
PREPARERXTaskThe TASKS_PREPARERX task has been triggered
STOPPEDEventThe EVENTS_STOPPED event was generated
RXSTARTEDEventThe EVENTS_RXSTARTED event was generated
TXSTARTEDEventThe EVENTS_TXSTARTED event was generated
TX preparedInternalInternal flag indicating that a TASKS_PREPARETX task has been triggered. This flag is not visible to the user.
RX preparedInternalInternal flag indicating that a TASKS_PREPARERX task has been triggered. This flag is not visible to the user.
Unprepare TXInternalClears the internal &#x27;TX prepared&#x27; flag until next TASKS_PREPARETX task.
Unprepare RXInternalClears the internal &#x27;RX prepared&#x27; flag until next TASKS_PREPARERX task.
Stop sequenceTWI protocolA TWI stop sequence was detected
Restart sequenceTWI protocolA TWI restart sequence was detected

The TWI slave supports clock stretching performed by the master.

The TWI slave operates in a low power mode while waiting for a TWI master to initiate a transfer. As long as the TWI slave is not addressed, it will remain in this low power mode.

To secure correct behaviour of the TWI slave, PSEL.SCL, PSEL.SDA, 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.

34.1 Shared resources

The TWI slave shares registers and other resources with other peripherals that have the same ID as the TWI slave.

Therefore, you must disable all peripherals that have the same ID as the TWI slave before the TWI slave can be configured and used. Disabling a peripheral that has the same ID as the TWI slave will not reset any of the registers that are shared with the TWI slave. It is therefore important to configure all relevant registers explicitly to secure that the TWI slave operates correctly.

The Instantiation table in Instantiation on page 25 shows which peripherals have the same ID as the TWI slave.

34.2 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 TXD.PTR and the RXD.PTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 for more information about the different memory regions.

34.3 TWI slave responding to a read command

Before the TWI slave can respond to a read command the TWI slave must be configured correctly and enabled via the ENABLE register. When enabled the TWI slave will be in its IDLE state where it will consume IIDLE .

A read command is started when the TWI master generates a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 1 (WRITE=0, READ=1). The READ/WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) response from the TWI slave.

The TWI slave is able to listen for up to two addresses at the same time. Which addresses to listen for is configured in the ADDRESS registers and the CONFIG register.

The TWI slave will only acknowledge (ACK) the read command if the address presented by the master matches one of the addresses the slave is configured to listen for. The TWI slave will generate a READ event when it acknowledges the read command.

The TWI slave is only able to detect a read command from the IDLE state.

The TWI slave will set an internal 'TX prepared' flag when the PREPARETX task is triggered.

When the read command is received the TWI slave will enter the TX state if the internal 'TX prepared' flag is set.

If the internal 'TX prepared' flag is not set when the read command is received, the TWI slave will stretch the master's clock until the PREPARETX task is triggered and the internal 'TX prepared' flag is set.

The TWI slave will generate the TXSTARTED event and clear the 'TX prepared' flag ('unprepare TX') when it enters the TX state. In this state the TWI slave will send the data bytes found in the transmit buffer to the master using the master's clock. The TWI slave will consume I in this mode.

The TWI slave will go back to the IDLE state if the TWI slave receives a restart command when it is in the TX 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 'TX prepared' flag ('unprepare TX') and go back to the IDLE state when it has stopped.

The transmit buffer is located in RAM at the address specified in the TXD.PTR register. The TWI slave will only be able to send TXD.MAXCNT bytes from the transmit buffer for each transaction. If the TWI master forces the slave to send more than TXD.MAXCNT bytes, the slave will send the byte specified in the ORC register to the master instead. If this happens, an ERROR event will be generated.

The EasyDMA configuration registers, see TXD.PTR etc., are latched when the TXSTARTED 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 'TX prepared' flag and go back to the IDLE state when it has stopped, see also Terminating an ongoing TWI transaction on page 328.

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 TXD.AMOUNT register can be queried after a transaction to see how many bytes were sent.

A typical TWI slave read command response is illustrated in Figure 91: The TWI slave responding to a read command on page 326. Occurrence 2 in the figure illustrates clock stretching performed by the TWI slave following a SUSPEND task.


Figure 91: The TWI slave responding to a read command

34.4 TWI slave responding to a write command

Before the TWI slave can respond to a write command the TWI slave must be configured correctly and enabled via the ENABLE register. When enabled the TWI slave will be in its IDLE state where it will consume IIDLE.

A write command is started when the TWI master generates a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 0 (WRITE=0, READ=1). The READ/WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) response from the slave.

The TWI slave is able to listen for up to two addresses at the same time. Which addresses to listen for is configured in the ADDRESS registers and the CONFIG register.

The TWI slave will only acknowledge (ACK) the write command if the address presented by the master matches one of the addresses the slave is configured to listen for. The TWI slave will generate a WRITE event if it acknowledges the write command.

The TWI slave is only able to detect a write command from the IDLE state.

The TWI slave will set an internal 'RX prepared' flag when the PREPARERX task is triggered.

When the write command is received the TWI slave will enter the RX state if the internal 'RX prepared' flag is set.

If the internal 'RX prepared' flag is not set when the write command is received, the TWI slave will stretch the master's clock until the PREPARERX task is triggered and the internal 'RX prepared' flag is set.

The TWI slave will generate the RXSTARTED event and clear the internal 'RX prepared' flag ('unprepare RX') when it enters the RX state. In this state the TWI slave will be able to receive the bytes sent by the TWI master. The TWI slave will consume IRX in this mode.

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 TXD.PTR register. The TWI slave will only be able to receive as many bytes as specified in the RXD.MAXCNT 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 RXD.PTR 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 328.

The TWI slave will generate an ACK after every byte received from the master. The RXD.AMOUNT register can be queried after a transaction to see how many bytes were received.

A typical TWI slave write command response is illustrated in Figure 92: The TWI slave responding to a write command on page 327. Occurrence 2 in the figure illustrates clock stretching performed by the TWI slave following a SUSPEND task.


Figure 92: The TWI slave responding to a write command

34.5 Master repeated start sequence

An example of a repeated start sequence is one in which the TWI master writes two bytes to the slave followed by reading four bytes from the slave.

This is illustrated in Figure 93: A repeated start sequence, where the TWI master writes two bytes followed by reading four bytes from the slave on page 328.

It is here assumed that the receiver does not know in advance what the master wants to read, and that this information is provided in the first two bytes received in the write part of the repeated start sequence. To guarantee that the CPU is able to process the received data before the TWI slave starts to reply to the read command, the SUSPEND task is triggered via a shortcut from the READ event generated when the read command is received. When the CPU has processed the incoming data and prepared the correct data response, the CPU will resume the transaction by triggering the RESUME task.


Figure 93: A repeated start sequence, where the TWI master writes two bytes followed by reading four bytes from the slave

34.6 Terminating an ongoing TWI transaction

In some situations, e.g. if the external TWI master is not responding correctly, it may be required to terminate an ongoing transaction.

This can be achieved by triggering the STOP task. In this situation a STOPPED event will be generated when the TWI has stopped independent of whether or not a STOP condition has been generated on the TWI bus. The TWI slave will release the bus when it has stopped and go back to its IDLE state.

34.7 Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOP task may not be always needed (the peripheral might already be stopped), but if it is sent, software shall wait until the STOPPED event was received as a response before disabling the peripheral through the ENABLE register.

34.8 Slave mode pin configuration

The SCL and SDA signals associated with the TWI slave are mapped to physical pins according to the configuration specified in the PSEL.SCL and PSEL.SDA registers respectively.

The PSEL.SCL and PSEL.SDA registers and their configurations are only used as long as the TWI slave is enabled, and retained only as long as the device is in ON mode. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register. PSEL.SCL and PSEL.SDA must only be configured when the TWI slave is disabled.

To secure correct signal levels on the pins used by the TWI slave when the system is in OFF mode, and when the TWI slave is disabled, these pins must be configured in the GPIO peripheral as described in Table 80: GPIO configuration before enabling peripheral on page 328.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 80: GPIO configuration before enabling peripheral

TWI slave signalTWI slave pinDirectionOutput valueDrive strength
SCLAs specified in PSEL.SCLInputNot applicableS0D1
SDAAs specified in PSEL.SDAInputNot applicableS0D1

34.9 Registers

Table 81: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000TWISTWISOTwo-wire interface slave 0
0x40004000TWISTWIS1Two-wire interface slave 1

Table 82: Register Overview

RegisterOffsetDescription
TASKS_STOP0x014Stop TWI transaction
TASKS_SUSPEND0x01CSuspend TWI transaction
TASKS_RESUME0x020Resume TWI transaction
TASKS_PREPARERX0x030Prepare the TWI slave to respond to a write command
TASKS_PREPARETX0x034Prepare the TWI slave to respond to a read command
EVENTS_STOPPED0x104TWI stopped
EVENTS_ERROR0x124TWI error
EVENTS_RXSTARTED0x14CReceive sequence started
EVENTS_TXSTARTED0x150Transmit sequence started
EVENTS_WRITE0x164Write command received
EVENTS_READ0x168Read command received
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x4D0Error source
MATCH0x4D4Status register indicating which address had a match
ENABLE0x500Enable TWIS
PSEL.SCL0x508Pin select for SCL signal
PSEL.SDA0x50CPin select for SDA signal
RXD.PTR0x534RXD Data pointer
RXD.MAXCNT0x538Maximum number of bytes in RXD buffer
RXD.AMOUNT0x53CNumber of bytes transferred in the last RXD transaction
TXD.PTR0x544TXD Data pointer
TXD.MAXCNT0x548Maximum number of bytes in TXD buffer
TXD.AMOUNT0x54CNumber of bytes transferred in the last TXD transaction
ADDRESS[0]0x588TWI slave address 0
ADDRESS[1]0x58CTWI slave address 1
CONFIG0x594Configuration register for the address match mechanism
ORC0x5C0Over-read character. Character sent out in case of an over-read of the transmit buffer.

34.9.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdB A
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWWRITE_SUSPEND
BRWREAD_SUSPENDShortcut between READ event and SUSPEND task
See EVENTS_READ and TASKS_SUSPEND
Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
Disabled0Disable shortcut
Enabled1Enable shortcut

34.9.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdH GF EBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSTOPPEDEnable or disable interrupt for STOPPED event
See EVENTS_STOPPED
Disabled0Disable
Enabled1Enable
BRWERROREnable or disable interrupt for ERROR event
See EVENTS_ERROR
Disabled0Disable
Enabled1Enable
ERWRXSTARTEDEnable or disable interrupt for RXSTARTED event
See EVENTS_RXSTARTED
Disabled0Disable
Enabled1Enable
FRWTXSTARTEDEnable or disable interrupt for TXSTARTED event
See EVENTS_TXSTARTED
Disabled0Disable
Enabled1Enable
GRWWRITEEnable or disable interrupt for WRITE event
See EVENTS_WRITE
Disabled0Disable
Enabled1Enable
HRWREADEnable or disable interrupt for READ event
See EVENTS_READ
Disabled0Disable
Enabled1Enable

34.9.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdHGFEBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSTOPPEDWrite &#x27;1&#x27; to Enable interrupt for STOPPED event
See EVENTS_STOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWERRORWrite &#x27;1&#x27; to Enable interrupt for ERROR event
Bit number313029282726252423222120191817161514131211109876543210
IdH GF EBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_ERROR
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWRXSTARTEDWrite &#x27;1&#x27; to Enable interrupt for RXSTARTED event
See EVENTS_RXSTARTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWTXSTARTEDWrite &#x27;1&#x27; to Enable interrupt for TXSTARTED event
See EVENTS_TXSTARTED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWWRITEWrite &#x27;1&#x27; to Enable interrupt for WRITE event
See EVENTS_WRITE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREADWrite &#x27;1&#x27; to Enable interrupt for READ event
See EVENTS_READ
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

34.9.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
Clear1
Disabled0
Enabled1
BRWERROR
Clear1
Disabled0
Enabled1
ERWRXSTARTEDWrite '1' to Disable interrupt for ERROR event
See EVENTS Rx STARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWTX STARTEDWrite '1' to Disable interrupt for TX STARTED event
See EVENTS TX STARTED
Clear1Disable
IdHGFEBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWWRITEWrite '1' to Disable interrupt for WRITE event
See EVENTS_WRITE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREADWrite '1' to Disable interrupt for READ event
See EVENTS_READ
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

34.9.5 ERRORSRC

Address offset: 0x4D0

Error source

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERFLOW
NotDetected0
Detected1
BRWDNACK
NotReceived0
Received1
CRWOVERREAD
NotDetected0
Detected1

34.9.6 MATCH

Address offset: 0x4D4

Status register indicating which address had a match

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARMATCH[0..1]Which of the addresses in {ADDRESS} matched the incoming address.

34.9.7 ENABLE

Address offset: 0x500

Enable TWIS

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLEEnable or disable TWIS
Disabled0Disable TWIS
IdRWFieldValue Id
Enabled

34.9.8 PSEL.SCL

Address offset: 0x508

Pin select for SCL signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

34.9.9 PSEL.SDA

Address offset: 0x50C

Pin select for SDA signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

34.9.10 RXD.PTR

Address offset: 0x534

RXD Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRRXD Data pointer

34.9.11 RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in RXD buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in RXD buffer

34.9.12 RXD.AMOUNT

Address offset: 0x53C

Number of bytes transferred in the last RXD transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARAMOUNT

34.9.13 TXD.PTR

Address offset: 0x544

TXD Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRTXD Data pointer

34.9.14 TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in TXD buffer

34.9.15 TXD.AMOUNT

Address offset: 0x54C

Number of bytes transferred in the last TXD transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last TXD transaction

34.9.16 ADDRESS[0]

Address offset: 0x588

TWI slave address 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWADDRESSTWI slave address

34.9.17 ADDRESS[1]

Address offset: 0x58C

TWI slave address 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWADDRESSTWI slave address

34.9.18 CONFIG

Address offset: 0x594

Configuration register for the address match mechanism

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValueDescription
ARWADDRESS0Enable or disable address matching on ADDRESS[0]
Disabled0Disabled
Enabled1Enabled
BRWADDRESS1Enable or disable address matching on ADDRESS[1]
Disabled0Disabled
Enabled1Enabled

34.9.19 ORC

Address offset: 0x5C0

Over-read character. Character sent out in case of an over-read of the transmit buffer.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWORCOver-read character. Character sent out in case of an over-read

Over-read character. Character sent out in case of an over-read of the transmit buffer.

34.10 Electrical specification

34.10.1 TWIS slave interface electrical specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{\text{TWIS}}$ Bit rates for TWIS31100400kbps
$I_{\text{TWIS,100kbps}}$ Run current for TWIS (Average current to receive and transfer a byte to RAM), 100 kbps45μA
$I_{\text{TWIS,400kbps}}$ Run current for TWIS (Average current to receive and transfer a byte to RAM), 400 kbps45μA
$I_{\text{TWIS,IDLE}}$ Idle current for TWIS1μA
$t_{\text{TWIS,START,LP}}$ Time from PREPARERX/PREPARETX task to ready to receive/ transmit, Low power mode $t_{\text{TWIS,START}}$ , + $t_{\text{START_HFIN}}$ μs
$t_{\text{TWIS,START,CL}}$ Time from PREPARERX/PREPARETX task to ready to receive/ transmit, Constant latency mode1.5μs

34.10.2 TWIS slave timing specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{TWIS,SCL,400kbps}$ SCL clock frequency, 400 kbps400kHz
$t_{TWIS,SU_DAT}$ Data setup time before positive edge on SCL – all modes300ns
$t_{TWIS,HD_DAT}$ Data hold time after negative edge on SCL – all modes500ns
$t_{TWIS,HD_STA,100kbps}$ TWI slave hold time from for START condition (SDA low to SCL low), 100 kbps5200ns
$t_{TWIS,HD_STA,400kbps}$ TWI slave hold time from for START condition (SDA low to SCL low), 400 kbps1300ns
$t_{TWIS,SU\_STO,100kbps}$ TWI slave setup time from SCL high to STOP condition, 100 kbps5200ns
$t_{TWIS,SU\_STO,400kbps}$ TWI slave setup time from SCL high to STOP condition, 400 kbps1300ns
$t_{TWIS,BUF,100kbps}$ TWI slave bus free time between STOP and START conditions, 100 kbps4700ns
$t_{TWIS,BUF,400kbps}$ TWI slave bus free time between STOP and START conditions, 400 kbps1300ns

Figure 94: TWIS timing diagram, 1 byte transaction

35 UARTE — Universal asynchronous receiver/ transmitter with EasyDMA

The Universal asynchronous receiver/transmitter with EasyDMA (UARTE) offers fast, full-duplex, asynchronous serial communication with built-in flow control (CTS, RTS) support in hardware at a rate up to 1 Mbps, and EasyDMA data transfer from/to RAM.

Listed here are the main features for UARTE:

• Full-duplex operation

• Automatic hardware flow control

• Parity checking and generation for the ${ \mathfrak { g } } ^ { \mathfrak { t h } }$ data bit

• EasyDMA

• Up to 1 Mbps baudrate

• Return to IDLE between transactions supported (when using HW flow control)

• One stop bit

• Least significant bit (LSB) first

Figure 95: UARTE configuration

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.

35.1 Shared resources

The UARTE shares registers and other resources with other peripherals that have the same ID as the UARTE.

Therefore, you must disable all peripherals that have the same ID as the UARTE before the UARTE can be configured and used. Disabling a peripheral that has the same ID as the UARTE will not reset any of the registers that are shared with the UARTE. It is therefore important to configure all relevant UARTE registers explicitly to ensure that it operates correctly.

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

35.2 EasyDMA

The UARTE implements EasyDMA for reading and writing to and from the RAM.

If the TXD.PTR and the RXD.PTR are not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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.

35.3 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 TXD.PTR, and the number of bytes in the RAM buffer to TXD.MAXCNT. 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 TXD.MAXCNT 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 TXD.MAXCNT register, have not been transmitted.

If flow control is enabled, a transmission will be automatically suspended when CTS is deactivated and resumed when CTS is activated again, as illustrated in Figure 96: UARTE transmission on page 338. A byte that is in transmission when CTS is deactivated will be fully transmitted before the transmission is suspended.


Figure 96: UARTE transmission

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 supply on page 81 for more information about power modes.

35.4 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 RXD.PTR register. The RXD.PTR register is doublebuffered 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 RXD.MAXCNT register and the UARTE will generate an ENDRX event when it has filled up the RX buffer, see Figure 97: UARTE reception on page 339.

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 RXD.AMOUNT 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.


Figure 97: UARTE reception

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 RXD.AMOUNT 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 RXD.PTR 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 RXD.MAXCNT register must be set to RXD.MAXCNT > 4, see Figure 98: UARTE reception with forced stop via STOPRX on page 340. 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 RXD.AMOUNT register following the ENDRX event.


Figure 98: UARTE reception with forced stop via STOPRX

If HW flow control is enabled 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 supply on page 81 for more information about power modes.

35.5 Error conditions

An ERROR event, in the form of a framing error, will be generated if a valid stop bit is not detected in a frame. Another ERROR event, in the form of a break condition, will be generated if the RXD line is held active low for longer than the length of a data frame. Effectively, a framing error is always generated before a break condition occurs.

An ERROR event will not stop reception. If the error was a parity error, the received byte will still be transferred into Data RAM, and so will following incoming bytes. If there was a framing error (wrong stop bit), that specific byte will NOT be stored into Data RAM, but following incoming bytes will.

35.6 Using the UARTE without flow control

If flow control is not enabled, the interface will behave as if the CTS and RTS lines are kept active all the time.

35.7 Parity configuration

When parity is enabled, the parity will be generated automatically from the even parity of TXD and RXD for transmission and reception respectively.

35.8 Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOPTX and STOPRX tasks may not be always needed (the peripheral might already be stopped), but if STOPTX and/or STOPRX is sent, software shall wait until the TXSTOPPED and/or RXTO event is received in response, before disabling the peripheral through the ENABLE register.

35.9 Pin configuration

The different signals RXD, CTS (Clear To Send, active low), RTS (Request To Send, active low), and TXD associated with the UARTE are mapped to physical pins according to the configuration specified in the PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD registers respectively.

The PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD registers and their configurations are only used as long as the UARTE is enabled, and retained only for the duration the device is in ON mode. PSEL.RXD, PSEL.RTS, PSEL.RTS and PSEL.TXD must only be configured when the UARTE is disabled.

To secure correct signal levels on the pins by the UARTE when the system is in OFF mode, the pins must be configured in the GPIO peripheral as described in Table 83: GPIO configuration before enabling peripheral on page 341.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 83: GPIO configuration before enabling peripheral

UARTE signalUARTE pinDirectionOutput value
RXDAs specified in PSEL.RXDInputNot applicable
CTSAs specified in PSEL.CTSInputNot applicable
RTSAs specified in PSEL.RTSOutput1
TXDAs specified in PSEL.TXDOutput1

35.10 Registers

Table 84: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40002000UARTEUARTE0Universal Asynchronous Receiver/Transmitter with EasyDMA

Table 85: Register Overview

RegisterOffsetDescription
TASKS_STARTRX0x000Start UART receiver
TASKS_STOPRX0x004Stop UART receiver
TASKS_STARTTX0x008Start UART transmitter
TASKS_STOPTX0x00CStop UART transmitter
TASKS_FLUSHRX0x02CFlush RX FIFO into RX buffer
EVENTS_CTS0x100CTS is activated (set low). Clear To Send.
EVENTS_NCTS0x104CTS is deactivated (set high). Not Clear To Send.
EVENTS_RXDRDY0x108Data received in RXD (but potentially not yet transferred to Data RAM)
EVENTS_ENDRX0x110Receive buffer is filled up
EVENTS_TXDRDY0x11CData sent from TXD
EVENTS_ENDTX0x120Last TX byte transmitted
EVENTS_ERROR0x124Error detected
EVENTS_RXTO0x144Receiver timeout
EVENTS_RXSTARTED0x14CUART receiver has started
EVENTS_TXSTARTED0x150UART transmitter has started
EVENTS_TXSTOPPED0x158Transmitter stopped
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x480Error source
ENABLE0x500Enable UART
PSEL.RTS0x508Pin select for RTS signal
PSEL.TXD0x50CPin select for TXD signal
PSEL.CTS0x510Pin select for CTS signal
PSEL.RXD0x514Pin select for RXD signal
BAUDRATE0x524Baud rate. Accuracy depends on the HFCLK source selected.
RXD.PTR0x534Data pointer
RXD.MAXCNT0x538Maximum number of bytes in receive buffer
RXD.AMOUNT0x53CNumber of bytes transferred in the last transaction
TXD.PTR0x544Data pointer
TXD.MAXCNT0x548Maximum number of bytes in transmit buffer
TXD.AMOUNT0x54CNumber of bytes transferred in the last transaction
CONFIG0x56CConfiguration of parity and hardware flow control

35.10.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
CRWENDRX_STARTRX
Disabled0
Enabled1
DRWENDRX_STOPRX
Disabled0
Enabled1

35.10.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCTS
Disabled0
Enabled1
BRWNCTS
Disabled0
Enabled1
CRWRXDRDY
Disabled0
Enabled1
DRWENDRX
Bit number313029282726252423222120191817161514131211109876543210
IdL
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
ERWTXDRDY
Disabled0
Enabled1
FRWENDTX
Disabled0
Enabled1
GRWERROR
Disabled0See EVENTS_ENDTX
Enabled1Disable
HRWRXTO
Enable or disable interrupt for ERROR event
Disabled0See EVENTS_ERROR
Enabled1Disable
IRWRXSTARTEDEnable or disable interrupt for RXTO event
See EVENTS_RXTO
Disabled0Disable
Enabled1Enable
JRWTXSTARTEDEnable or disable interrupt for TXSTARTED event
See EVENTS_TXSTARTED
Disabled0Disable
Enabled1Enable
LRWTXSTOPPEDEnable or disable interrupt for TXSTOPPED event
See EVENTS_TXSTOPPED
Disabled0Disable
Enabled1Enable

35.10.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCTS
Set1
Disabled0
Enabled1
BRWNCTS
Set1
Disabled0
Enabled1
CRWRXDRDYWrite &#x27;1&#x27; to Enable interrupt for RXDRDY event
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
DRWENDRX
Set1
Disabled0Write &#x27;1&#x27; to Enable interrupt for ENDRX event
Enabled1
ERWTXDRDY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWENDTX
Set1
Disabled0Write &#x27;1&#x27; to Enable interrupt for ENDRX event
Enabled1See EVENTS_TXDRDY
GRWERROR
Set1
Disabled0Enable
Enabled1Read: Disabled
HRWRXTO
Set1
Disabled0Write &#x27;1&#x27; to Enable interrupt for RXSTARTED event
Enabled1
IRWTXSTARTED
Set1
Disabled0Write &#x27;1&#x27; to Enable interrupt for TXSTARTED event
Enabled1
JRWTXSTARTED
Set1Write &#x27;1&#x27; to Enable interrupt for TXSTOPPED event
Disabled0
Enabled1See EVENTS_TXSTOPPED
LRWTXSTOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

35.10.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCTS
Clear1
Disabled0
Enabled1
BRWNCTS
Clear1
Disabled0
Enabled1
CRWRXDRDY
Clear1
Disabled0
Enabled1
DRWENDRX
Clear1
Disabled0
Enabled1
ERWTXDRDY
Clear1
Disabled0
Enabled1
FRWENDTX
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWERROR
Write &#x27;1&#x27; to Disable interrupt for ENDTX event
Clear1See EVENTS_ERROR
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWRXTOWrite &#x27;1&#x27; to Disable interrupt for RXTO event
See EVENTS_RXTO
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: EnabledWrite &#x27;1&#x27; to Disable interrupt for TXSTARTED event
IRWTXSTARTEDSee EVENTS_TXSTARTED
Clear1Disable
Disabled0Read: Disabled
LRWTXSTOPPED1Write &#x27;1&#x27; to Disable interrupt for TXSTOPPED event
Bit number313029282726252423222120191817161514131211109876543210
IdLJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_TXSTOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

35.10.5 ERRORSRC

Address offset: 0x480

Error source

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERRUN
NotPresent0
Present1
BRWPARITY
Parity error
A character with bad parity is received, if HW parity check is enabled.
NotPresent0Read: error not present
Present1Read: error present
CRWFRAMINGFraming error occurred
A valid stop bit is not detected on the serial data input after all bits in a character have been received.
NotPresent0Read: error not present
Present1Read: error present

35.10.6 ENABLE

Address offset: 0x500

Enable UART

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled8

35.10.7 PSEL.RTS

Address offset: 0x508

Pin select for RTS signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

35.10.8 PSEL.TXD

Address offset: 0x50C

Pin select for TXD signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValue
ARWPIN[0..31]
BRWCONNECT
Disconnected1
Connected0

35.10.9 PSEL.CTS

Address offset: 0x510

Pin select for CTS signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

35.10.10 PSEL.RXD

Address offset: 0x514

Pin select for RXD signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

35.10.11 BAUDRATE

Address offset: 0x524

Baud rate. Accuracy depends on the HFCLK source selected.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWBAUDRATEBaud rate
Baud12000x0004F0001200 baud (actual rate: 1205)
Baud24000x0009D0002400 baud (actual rate: 2396)
Baud48000x0013B0004800 baud (actual rate: 4808)
Baud96000x002750009600 baud (actual rate: 9598)
Baud144000x003AF00014400 baud (actual rate: 14401)
Baud192000x004EA00019200 baud (actual rate: 19208)
Baud288000x0075C00028800 baud (actual rate: 28777)
Baud384000x009D000038400 baud (actual rate: 38369)
Baud576000x00EB000057600 baud (actual rate: 57554)
Baud768000x013A900076800 baud (actual rate: 76923)
Baud1152000x01D60000115200 baud (actual rate: 115108)
Baud2304000x03B00000230400 baud (actual rate: 231884)
Baud2500000x04000000250000 baud
Baud4608000x07400000460800 baud (actual rate: 457143)
Baud9216000x0F000000921600 baud (actual rate: 941176)
Baud1M0x100000001Mega baud

35.10.12 RXD.PTR

Address offset: 0x534

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

35.10.13 RXD.MAXCNT

Address offset: 0x538

Maximum number of bytes in receive buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWMAXCNT

35.10.14 RXD.AMOUNT

Address offset: 0x53C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction

35.10.15 TXD.PTR

Address offset: 0x544

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

35.10.16 TXD.MAXCNT

Address offset: 0x548

Maximum number of bytes in transmit buffer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of bytes in transmit buffer

35.10.17 TXD.AMOUNT

Address offset: 0x54C

Number of bytes transferred in the last transaction

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of bytes transferred in the last transaction

35.10.18 CONFIG

Address offset: 0x56C

Configuration of parity and hardware flow control

Bit number313029282726252423222120191817161514131211109876543210
IdBBBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWHWFC
Disabled0
Enabled1
BRWPARITY
Excluded0x0
Included0x7

35.11 Electrical specification

35.11.1 UARTE electrical specification

SymbolDescriptionMin.Typ.Max.Units
$f_{UARTE}$ Baud rate for $UARTE^{32}$ .1000kbps
$I_{UARTE1M}$ Run current at max baud rate.55μA
$I_{UARTE115k}$ Run current at 115200 bps.55μA
$I_{UARTE1k2}$ Run current at 1200 bps.55μA
$I_{UARTE,IDLE}$ Idle current for UARTE (STARTed, no XXX activity)1μA
$t_{UARTE,CTSH}$ CTS high time1μs
$t_{UARTE,START,LP}$ Time from STARTRX/STARTTX task to transmission started, low power mode $t_{UARTE,STAR}$ μs
+
$t_{START\_HFIN}$
$t_{UARTE,START,CL}$ Time from STARTRX/STARTTX task to transmission started, constant latency mode1μs

36 QDEC — Quadrature decoder

The Quadrature decoder (QDEC) provides buffered decoding of quadrature-encoded sensor signals. It is suitable for mechanical and optical sensors.

The sample period and accumulation are configurable to match application requirements. The QDEC provides the following:

• Decoding of digital waveform from off-chip quadrature encoder.

• Sample accumulation eliminating hard real-time requirements to be enforced on application.

• Optional input de-bounce filters.

• Optional LED output signal for optical encoders.


Figure 99: Quadrature decoder configuration

36.1 Sampling and decoding

The QDEC decodes the output from an incremental motion encoder by sampling the QDEC phase input pins (A and B).

The off-chip quadrature encoder is an incremental motion encoder outputting two waveforms, phase A and phase B. The two output waveforms are always 90 degrees out of phase, meaning that one always changes level before the other. The direction of movement is indicated by which of these two waveforms that changes level first. Invalid transitions may occur, that is when the two waveforms switch simultaneously. This may occur if the wheel rotates too fast relative to the sample rate set for the decoder.

The QDEC decodes the output from the off-chip encoder by sampling the QDEC phase input pins (A and B) at a fixed rate as specified in the SAMPLEPER register.

If the SAMPLEPER value needs to be changed, the QDEC shall be stopped using the STOP task. If the SAMPLEPER value needs to be changed, the QDEC shall be stopped using the STOP task.

SAMPLEPER can be then changed upon receiving the STOPPED event, and QDEC can be restarted using the START task. Failing to do so may result in unpredictable behaviour.

It is good practice to change other registers (LEDPOL, REPORTPER, DBFEN and LEDPRE) only when the QDEC is stopped.

When started, the decoder continuously samples the two input waveforms and decodes these by comparing the current sample pair (n) with the previous sample pair (n-1).

The decoding of the sample pairs is described in the table below.

Table 86: Sampled value encoding

Previous sample pair(n - 1)Current samples pair(n)SAMPLE registerACC operationACCDBL operationDescription
ABAB
00000No changeNo changeNo movement
00011IncrementNo changeMovement in positive direction
0010-1DecrementNo changeMovement in negative direction
00112No changeIncrementError: Double transition
0100-1DecrementNo changeMovement in negative direction
01010No changeNo changeNo movement
01102No changeIncrementError: Double transition
01111IncrementNo changeMovement in positive direction
10001IncrementNo changeMovement in positive direction
10012No changeIncrementError: Double transition
10100No changeNo changeNo movement
1011-1DecrementNo changeMovement in negative direction
11002No changeIncrementError: Double transition
1101-1DecrementNo changeMovement in negative direction
11101IncrementNo changeMovement in positive direction
11110No changeNo changeNo movement

36.2 LED output

The LED output follows the sample period, and the LED is switched on a given period before sampling and switched off immediately after the inputs are sampled. The period the LED is switched on before sampling is given in the LEDPRE register.

The LED output pin polarity is specified in the LEDPOL register.

For using off-chip mechanical encoders not requiring a LED, the LED output can be disabled by writing value 'Disconnected' to the CONNECT field of the PSEL.LED register. In this case the QDEC will not acquire access to a LED output pin and the pin can be used for other purposes by the CPU.

36.3 Debounce filters

Each of the two-phase inputs have digital debounce filters.

When enabled through the DBFEN register, the filter inputs are sampled at a fixed 1 MHz frequency during the entire sample period (which is specified in the SAMPLEPER register), and the filters require all of the samples within this sample period to equal before the input signal is accepted and transferred to the output of the filter.

As a result, only input signal with a steady state longer than twice the period specified in SAMPLEPER are guaranteed to pass through the filter, and any signal with a steady state shorter than SAMPLEPER will always be suppressed by the filter. (This is assumed that the frequency during the debounce period never exceeds 500 kHz (as required by the Nyquist theorem when using a 1 MHz sample frequency).

The LED will always be ON when the debounce filters are enabled, as the inputs in this case will be sampled continuously.

Note that when when the debounce filters are enabled, displacements reported by the QDEC peripheral are delayed by one SAMPLEPER period.

36.4 Accumulators

The quadrature decoder contains two accumulator registers, ACC and ACCDBL, that accumulate respectively valid motion sample values and the number of detected invalid samples (double transitions).

The ACC register will accumulate all valid values (1/-1) written to the SAMPLE register. This can be useful for preventing hard real-time requirements from being enforced on the application. When using the ACC register the application does not need to read every single sample from the SAMPLE register, but can instead fetch the ACC register whenever it fits the application. The ACC register will always hold the relative movement of the external mechanical device since the previous clearing of the ACC register. Sample values indicating a double transition (2) will not be accumulated in the ACC register.

An ACCOF event will be generated if the ACC receives a SAMPLE value that would cause the register to overflow or underflow. Any SAMPLE value that would cause an ACC overflow or underflow will be discarded, but any samples not causing the ACC to overflow or underflow will still be accepted.

The accumulator ACCDBL accumulates the number of detected double transitions since the previous clearing of the ACCDBL register.

The ACC and ACCDBL registers can be cleared by the READCLRACC and subsequently read using the ACCREAD and ACCDBLREAD registers.

The ACC register can be separately cleared by the RDCLRACC and subsequently read using the ACCREAD registers.

The ACCDBL register can be separately cleared by the RDCLRDBL and subsequently read using the ACCDBLREAD registers.

The REPORTPER register allows automating the capture of several samples before it can send out a REPORTRDY event in case a non-null displacement has been captured and accumulated, and a DBLRDY event in case one or more double-displacements have been captured and accumulated. The REPORTPER field in this register selects after how many samples the accumulators contents are evaluated to send (or not) REPORTRDY and DBLRDY events.

Using the RDCLRACC task (manually sent upon receiving the event, or using the DBLRDY_RDCLRACC shortcut), ACCREAD can then be read.

In case at least one double transition has been captured and accumulated, a DBLRDY event is sent. Using the RDCLRDBL task (manually sent upon receiving the event, or using the DBLRDY_RDCLRDBL shortcut), ACCDBLREAD can then be read.

36.5 Output/input pins

The QDEC uses a three-pin interface to the off-chip quadrature encoder.

These pins will be acquired when the QDEC is enabled in the ENABLE register. The pins acquired by the QDEC cannot be written by the CPU, but they can still be read by the CPU.

The pin numbers to be used for the QDEC are selected using the PSEL.n registers.

36.6 Pin configuration

The Phase A, Phase B, and LED signals are mapped to physical pins according to the configuration specified in the PSEL.A, PSEL.B, and PSEL.LED registers respectively.

If the CONNECT field value 'Disconnected' is specified in any of these registers, the associated signal will not be connected to any physical pin. The PSEL.A, PSEL.B, and PSEL.LED registers and their configurations are only used as long as the QDEC is enabled, and retained only as long as the device is in

ON mode. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register.

To secure correct behavior in the QDEC, the pins used by the QDEC must be configured in the GPIO peripheral as described in Table 87: GPIO configuration before enabling peripheral on page 354 before enabling the QDEC. This configuration must be retained in the GPIO for the selected IOs as long as the QDEC 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.

Table 87: GPIO configuration before enabling peripheral

QDEC signalQDEC pinDirectionOutput valueComment
Phase AAs specified in PSEL.AInputNot applicable
Phase BAs specified in PSEL.BInputNot applicable
LEDAs specified in PSEL.LEDInputNot applicable

36.7 Registers

Table 88: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40012000QDECQDECQuadrature decoder

Table 89: Register Overview

RegisterOffsetDescription
TASKS_START0x000Task starting the quadrature decoder
TASKS_STOP0x004Task stopping the quadrature decoder
TASKS_READCLRACC0x008Read and clear ACC and ACCDBL
TASKS_RDCLRACC0x00CRead and clear ACC
TASKS_RDCLRDBL0x010Read and clear ACCDBL
EVENTS_SAMPLERDY0x100Event being generated for every new sample value written to the SAMPLE register
EVENTS_REPORTRDY0x104Non-null report ready
EVENTS_ACCOF0x108ACC or ACCDBL register overflow
EVENTS_DBLRDY0x10CDouble displacement(s) detected
EVENTS_STOPPED0x110QDEC has been stopped
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500Enable the quadrature decoder
LEDPOL0x504LED output pin polarity
SAMPLEPER0x508Sample period
SAMPLE0x50CMotion sample value
REPORTPER0x510Number of samples to be taken before REPORTRDY and DBLRDY events can be generated
ACC0x514Register accumulating the valid transitions
ACCREAD0x518Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task
PSEL.LED0x51CPin select for LED signal
PSEL.A0x520Pin select for A signal
PSEL.B0x524Pin select for B signal
DBFEN0x528Enable input debounce filters
LEDPRE0x540Time period the LED is switched ON prior to sampling
ACCDBL0x544Register accumulating the number of detected double transitions
ACCDBLREAD0x548Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task

36.7.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREPORTRDY_READCLRACC
Disabled0
Enabled1
BRWSAMPLERDY_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut
CRWREPORTRDY_RDCLRACC
Disabled0
Enabled1Enable shortcut
DRWREPORTRDY_STOP
Disabled0Disable shortcut
Enabled1Disable shortcutEnable shortcut
ERWDBLRDY_RDCLRDBL
Disabled0Disable shortcutEnable shortcut
Enabled1Disable shortcutEnable shortcut
FRWDBLRDY_STOP
Disabled0Disable shortcutEnable shortcut
Enabled1Shortcut between DBLRDY event and STOP task
Disabled0See EVENTS_DBLRDY and TASKS_STOP
Enabled1Disable shortcut
GRWSAMPLERDY_READCLRACCShortcut between SAMPLERDY event and READCLRACC task
Disabled0See EVENTS_SAMPLERDY and TASKS_READCLRACC
Enabled1Disable shortcut

36.7.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSAMPLERDY
Set
Disabled
Enabled
BRWREPORTRDY
Set
Disabled
Enabled
CRWACCOF
Set
Disabled0
Enabled1
DRWDBLRDY
Set1
Disabled0
Enabled1
ERWSTOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

36.7.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSAMPLERDY
Clear1
Disabled0
Enabled1
BRWREPORTRDY
Clear1
Disabled0
Enabled1
CRWACCOFWrite &#x27;1&#x27; to Disable interrupt for ACCOF event
See EVENTS_ACCOF
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWDBLRDYWrite &#x27;1&#x27; to Disable interrupt for DBLRDY event
See EVENTS_DBLRDY
Clear1Disable
Disabled0Read: Disabled
ERWT STOPPEDWrite &#x27;1&#x27; to Disable interrupt for STOPPED event
See EVENTS_STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

36.7.4 ENABLE

Address offset: 0x500

Enable the quadrature decoder

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWENABLEEnable or disable the quadrature decoder
When enabled the decoder pins will be active. When disabled the quadrature decoder pins are not active and can be used as GPIO .
Disabled0Disable
Enabled1Enable

36.7.5 LEDPOL

Address offset: 0x504

LED output pin polarity

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWLEDPOL
ActiveLow
ActiveHigh

36.7.6 SAMPLEPER

Address offset: 0x508

Sample period

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSAMPLEPERSample period. The SAMPLE register will be updated for every new sample
128us0128 us
256us1256 us
512us2512 us
1024us31024 us
2048us42048 us
4096us54096 us
8192us68192 us
16384us716384 us
32ms832768 us
65ms965536 us
131ms10131072 us

36.7.7 SAMPLE

Address offset: 0x50C

Motion sample value

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSAMPLE[-1..2]Last motion sample
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
The value is a 2&#x27;s complement value, and the sign gives the direction of the motion. The value &#x27;2&#x27; indicates a double transition.

36.7.8 REPORTPER

Address offset: 0x510

Number of samples to be taken before REPORTRDY and DBLRDY events can be generated

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREPORTPER
The report period in [us] is given as: RPUS = SP * RP Where RPUS is the report period in [us/report], SP is the sample period in [us/sample] specified in SAMPLEPER, and RP is the report period in [samples/report] specified in REPORTPER .
10Smpl0
40Smpl1
80Smpl2
120Smpl3
160Smpl4
200Smpl5
240Smpl6
280Smpl7
1Smpl8

36.7.9 ACC

Address offset: 0x514

Register accumulating the valid transitions

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARACC[-1024..1023]
Double transitions (SAMPLE = 2) will not be accumulated in this register. The value is a 32 bit 2&#x27;s complement value. If a sample that would cause this register to overflow or underflow is received, the sample will be ignored and an overflow event (ACCOF) will be generated. The ACC register is cleared by triggering the READCLRACC or the RDCLRACC task.

36.7.10 ACCREAD

Address offset: 0x518

Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARACCREAD[-1024..1023]Snapshot of the ACC register.

The ACCREAD register is updated when the READCLRACC or

RDCLRACC task is triggered

36.7.11 PSEL.LED

Address offset: 0x51C

Pin select for LED signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

36.7.12 PSEL.A

Address offset: 0x520

Pin select for A signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

36.7.13 PSEL.B

Address offset: 0x524

Pin select for B signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

36.7.14 DBFEN

Address offset: 0x528

Enable input debounce filters

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWDBFEN
Disabled0
Enabled1

36.7.15 LEDPRE

Address offset: 0x540

Time period the LED is switched ON prior to sampling

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAA
Reset 0x00000010000000000000000000000000000010000
IdRWFieldValue IdValue
ARWLEDPRE[1..511]

36.7.16 ACCDBL

Address offset: 0x544

Register accumulating the number of detected double transitions

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARACCDBL[0..15]
When this register has reached its maximum value the accumulation of double / illegal transitions will stop. An overflow event ( ACCOF ) will be generated if any double or illegal transitions are detected after the maximum value was reached. This field is cleared by triggering the READCLRACC or RDCLRDBL task.

36.7.17 ACCDBLREAD

Address offset: 0x548

Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARACCDBLREAD[0..15]

36.8 Electrical specification

36.8.1 QDEC Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{QDEC}$ Run current5μA
$t_{SAMPLE}$ Time between sampling signals from quadrature decoder128131072μs
$t_{LED}$ Time from LED is turned on to signals are sampled0511μs

37 SAADC — Successive approximation analog-todigital converter

The ADC is a differential successive approximation register (SAR) analog-to-digital converter.

Listed here are the main features of SAADC:

• 8/10/12-bit resolution, 14-bit resolution with oversampling

• Up to eight input channels

• One channel per single-ended input and two channels per differential input

• Scan mode can be configured with both single-ended channels and differential channels.

• Full scale input range (0 to VDD)

• Sampling triggered via a task from software or a PPI channel for full flexibility on sample frequency source from low power 32.768kHz RTC or more accurate 1/16MHz Timers

• One-shot conversion mode to sample a single channel

• Scan mode to sample a series of channels in sequence. Sample delay between channels is $\mathfrak { t } _ { \mathsf { a c k } } + \mathfrak { t } _ { \mathsf { c o n v } }$ which may vary between channels according to user configuration of $\mathfrak { t } _ { \mathsf { a c k } } .$

• Support for direct sample transfer to RAM using EasyDMA

• Interrupts on single sample and full buffer events

• Samples stored as 16-bit 2’s complement values for differential and single-ended sampling

• Continuous sampling without the need of an external timer

• Internal resistor string

• Limit checking on the fly

37.1 Shared resources

The ADC can coexist with COMP and other peripherals using one of AIN0-AIN7, provided these are assigned to different pins.

It is not recommended to select the same analog input pin for both modules.

37.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 to pins, or the 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.


Figure 100: Simplified ADC block diagram

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.

37.3 Digital output

The output result of the ADC depends on the settings in the CH[n].CONFIG and RESOLUTION registers as follows:

<div class="mineru-algorithm" style="white-space: pre-wrap; font-family:monospace;"> RESULT = [V(P) - V(N)] * GAIN/REFERENCE * 2 $^{(RESOLUTION - m)}$

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 CONFIG.MODE=SE, or m=1 if CONFIG.MODE=Diff.

</div>

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].CONFIG.REFSEL=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, a CALIBRATEDONE event will be fired when the calibration is complete

37.4 Analog inputs and channels

Up to eight analog input channels, CHn, can be configured.

See Shared resources on page 361 for shared input with comparators.

Any one of the available channels can be enabled for the ADC to operate in one-shot mode. If more than one CH[n] is configured, the ADC enters scan mode.

An analog input is selected as a positive converter input if CH[n].PSELP is set, setting CH[n].PSELP also enables the particular channel.

An analog input is selected as a negative converter input if CH[n].PSELN is set. The CH[n].PSELN register will have no effect unless differential mode is enabled, see MODE field in CH[n].CONFIG register.

If more than one of the CH[n].PSELP registers is set, the device enters scan mode. Input selections in scan mode are controlled by the CH[n].PSELP and CH[n].PSELN registers, where CH[n].PSELN is only used if the particular scan channel is specified as differential, see MODE field in CH[n].CONFIG register.

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.

Table 90: Legal connectivity CH[n] vs. analog input

Channel inputSourceConnectivity
CH[n].PSELPAIN0...AIN7Yes(any)
CH[n].PSELPVDDYes
CH[n].PSELNAIN0...AIN7Yes(any)
CH[n].PSELNVDDYes

37.5 Operation modes

The ADC input configuration supports one-shot mode, continuous mode and scan mode.

Scan mode and oversampling cannot be combined.

37.5.1 One-shot mode

One-shot operation is configured by enabling only one of the available channels defined by CH[n].PSELP, CH[n].PSELN, and CH[n].CONFIG registers.

Upon a SAMPLE task, the ADC starts to sample the input voltage. The CH[n].CONFIG.TACQ controls the acquisition time.

A DONE event signals that one sample has been taken.

In this mode, the RESULTDONE event has the same meaning as DONE when no oversampling takes place. Note that both events may occur before the actual value has been transferred into RAM by EasyDMA. For more information, see EasyDMA on page 365.

37.5.2 Continuous mode

Continuous sampling can be achieved by using the internal timer in the ADC, or triggering the SAMPLE task from one of the general purpose timers through the PPI.

Care shall be taken to ensure that the sample rate fulfils the following criteria, depending on how many channels are active:

fSAMPLE < 1/[tACQ + tconv]

The SAMPLERATE register can be used as a local timer instead of triggering individual SAMPLE tasks. When SAMPLERATE.MODE is set to Timers, it is sufficient to trigger SAMPLE task only once in order to start the SAADC and triggering the STOP task will stop sampling. The SAMPLERATE.CC field controls the sample rate.

The SAMPLERATE timer mode cannot be combined with SCAN mode, and only one channel can be enabled in this mode.

A DONE event signals that one sample has been taken.

In this mode, the RESULTDONE event has the same meaning as DONE when no oversampling takes place. Note that both events may occur before the actual value has been transferred into RAM by EasyDMA.

37.5.3 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].CONFIG.BURST 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. Scan mode can be combined with BURST=1, if burst is enabled on all channels.

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.

37.5.4 Scan mode

A channel is considered enabled if CH[n].PSELP is set. If more than one channel, CH[n], is enabled, the ADC enters scan mode.

In scan mode, one SAMPLE task will trigger one conversion per enabled channel. The time it takes to sample all channels is:

Total time < Sum(CH[x].tACQ+tCONV), x=0..enabled channels

A DONE event signals that one sample has been taken.

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.

Figure 101: Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled on page 365 provides an example of results placement in Data RAM, with an even RESULT.MAXCNT. In this example, channels 1, 2 and 5 are enabled, all others are disabled.

3116150
RESULT.PTRCH[2] 1stresultCH[1] 1stresult
RESULT.PTR + 4CH[1] 2ndresultCH[5] 1stresult
RESULT.PTR + 8CH[5] 2ndresultCH[2] 2ndresult
(...)
RESULT.PTR + 2*(RESULT.MAXCNT - 2)CH[5] last resultCH[2] last result

Figure 101: Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled

Figure 102: Example of RAM placement (odd RESULT.MAXCNT), channels 1, 2 and 5 enabled on page 365 provides an example of results placement in Data RAM, with an odd RESULT.MAXCNT. 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.

3116150
RESULT.PTRCH[2] 1stresultCH[1] 1stresult
RESULT.PTR + 4CH[1] 2ndresultCH[5] 1stresult
RESULT.PTR + 8CH[5] 2ndresultCH[2] 2ndresult
(...)
RESULT.PTR + 2*(RESULT.MAXCNT - 1)CH[5] last result

Figure 102: Example of RAM placement (odd RESULT.MAXCNT), channels 1, 2 and 5 enabled

37.6 EasyDMA

After configuring RESULT.PTR and RESULT.MAXCNT, 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 RESULT.PTR register. The RESULT.PTR 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 RESULT.MAXCNT register and the ADC will generate an END event when it has filled up the Result buffer, see Figure 103: ADC on page 366. 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.


Figure 103: ADC

If the RESULT.PTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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 RESULT.AMOUNT 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, the size of the Result buffer must be large enough to have room for a minimum one result from each of the enabled channels. To secure this, RESULT.MAXCNT must be specified to RESULT.MAXCNT >= "number of channels enabled". See Scan mode on page 364 for more information about Scan mode.

37.7 Resistor ladder

The ADC has an internal resistor string for positive and negative input.

See Figure 104: Resistor ladder for positive input (negative input is equivalent, using RESN instead of RESP) on page 367. The resistors are controlled in the CH[n].CONFIG.RESP and CH[n].CONFIG.RESN registers.

Figure 104: Resistor ladder for positive input (negative input is equivalent, using RESN instead of RESP)

37.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.

Input range = (+ - 0.6 V or +-VDD/4)/Gain

For example, choosing VDD as reference, single ended input (grounded negative input), and a gain of 1/4 the input range will be:

Input range = (VDD/4)/(1/4) = VDD

With internal reference, single ended input (grounded negative input), and a gain of 1/6 the input range will be:

Input range = (0.6 V)/(1/6) = 3.6 V

The AIN0-AIN7 inputs cannot exceed VDD, or be lower than VSS.

37.9 Acquisition time

To sample the input voltage, the ADC connects a capacitor to the input.

For illustration, see Figure 105: Simplified ADC sample network on page 368. The acquisition time indicates how long the capacitor is connected, see TACQ field in CH[n].CONFIG register. The required acquisition time depends on the source $( \mathsf { R } _ { \mathsf { s o u r c e } } )$ resistance. For high source resistance the acquisition time should be increased, see Table 91: Acquisition time on page 368.

Figure 105: Simplified ADC sample network
Table 91: Acquisition time

TACQ [μs]Maximum source resistance [kOhm]
310
540
10100
15200
20400
40800

37.10 Limits event monitoring

A channel can be event monitored by configuring limit register CH[n].LIMIT.

If the conversion result is higher than the defined high limit, or lower than the defined low limit, the appropriate event will get fired.


Figure 106: Example of limits monitoring on channel 'n

Note that when setting the limits, CH[n].LIMIT.HIGH shall always be higher than or equal to CH[n].LIMIT.LOW . 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].LIMIT.LOW is lower than CH[n].LIMIT.HIGH or not.

37.11 Registers

Table 92: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40007000SAADCSAADCAnalog to digital converter

Table 93: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start the ADC and prepare the result buffer in RAM
TASKS_SAMPLE0x004Take one ADC sample, if scan is enabled all channels are sampled
TASKS_STOP0x008Stop the ADC and terminate any on-going conversion
TASKS_CALIBRATEOFFSE0x00CStarts offset auto-calibration
EVENTS_STARTED0x100The ADC has started
EVENTS_END0x104The ADC has filled up the Result buffer
EVENTS_DONE0x108A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM.
EVENTS_RESULTDONE0x10CA result is ready to get transferred to RAM.
EVENTS_CALIBRATEDON0x110Calibration is complete
EVENTS_STOPPED0x114The ADC has stopped
EVENTS_CH[0].LIMITH0x118Last results is equal or above CH[0].LIMIT.HIGH
EVENTS_CH[0].LIMITL0x11CLast results is equal or below CH[0].LIMIT.LOW
EVENTS_CH[1].LIMITH0x120Last results is equal or above CH[1].LIMIT.HIGH
EVENTS_CH[1].LIMITL0x124Last results is equal or below CH[1].LIMIT.LOW
EVENTS_CH[2].LIMITH0x128Last results is equal or above CH[2].LIMIT.HIGH
EVENTS_CH[2].LIMITL0x12CLast results is equal or below CH[2].LIMIT.LOW
EVENTS_CH[3].LIMITH0x130Last results is equal or above CH[3].LIMIT.HIGH
EVENTS_CH[3].LIMITL0x134Last results is equal or below CH[3].LIMIT.LOW
EVENTS_CH[4].LIMITH0x138Last results is equal or above CH[4].LIMIT.HIGH
EVENTS_CH[4].LIMITL0x13CLast results is equal or below CH[4].LIMIT.LOW
EVENTS_CH[5].LIMITH0x140Last results is equal or above CH[5].LIMIT.HIGH
EVENTS_CH[5].LIMITL0x144Last results is equal or below CH[5].LIMIT.LOW
EVENTS_CH[6].LIMITH0x148Last results is equal or above CH[6].LIMIT.HIGH
EVENTS_CH[6].LIMITL0x14CLast results is equal or below CH[6].LIMIT.LOW
EVENTS_CH[7].LIMITH0x150Last results is equal or above CH[7].LIMIT.HIGH
EVENTS_CH[7].LIMITL0x154Last results is equal or below CH[7].LIMIT.LOW
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
STATUS0x400Status
ENABLE0x500Enable or disable ADC
CH[0].PSELP0x510Input positive pin selection for CH[0]
CH[0].PSELN0x514Input negative pin selection for CH[0]
CH[0].CONFIG0x518Input configuration for CH[0]
CH[0].LIMIT0x51CHigh/low limits for event monitoring a channel
CH[1].PSELP0x520Input positive pin selection for CH[1]
CH[1].PSELN0x524Input negative pin selection for CH[1]
CH[1].CONFIG0x528Input configuration for CH[1]
CH[1].LIMIT0x52CHigh/low limits for event monitoring a channel
CH[2].PSELP0x530Input positive pin selection for CH[2]
CH[2].PSELN0x534Input negative pin selection for CH[2]
CH[2].CONFIG0x538Input configuration for CH[2]
CH[2].LIMIT0x53CHigh/low limits for event monitoring a channel
CH[3].PSELP0x540Input positive pin selection for CH[3]
CH[3].PSELN0x544Input negative pin selection for CH[3]
CH[3].CONFIG0x548Input configuration for CH[3]
CH[3].LIMIT0x54CHigh/low limits for event monitoring a channel
CH[4].PSELP0x550Input positive pin selection for CH[4]
CH[4].PSELN0x554Input negative pin selection for CH[4]
CH[4].CONFIG0x558Input configuration for CH[4]
CH[4].LIMIT0x55CHigh/low limits for event monitoring a channel
CH[5].PSELP0x560Input positive pin selection for CH[5]
CH[5].PSELN0x564Input negative pin selection for CH[5]
CH[5].CONFIG0x568Input configuration for CH[5]
CH[5].LIMIT0x56CHigh/low limits for event monitoring a channel
CH[6].PSELP0x570Input positive pin selection for CH[6]
CH[6].PSELN0x574Input negative pin selection for CH[6]
CH[6].CONFIG0x578Input configuration for CH[6]
CH[6].LIMIT0x57CHigh/low limits for event monitoring a channel
CH[7].PSELP0x580Input positive pin selection for CH[7]
CH[7].PSELN0x584Input negative pin selection for CH[7]
CH[7].CONFIG0x588Input configuration for CH[7]
CH[7].LIMIT0x58CHigh/low limits for event monitoring a channel
RESOLUTION0x5F0Resolution configuration
OVERSAMPLE0x5F4Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used.
SAMPLERATE0x5F8Controls normal or continuous sample rate
RESULT.PTR0x62CData pointer
RESULT.MAXCNT0x630Maximum number of buffer words to transfer
RESULT.AMOUNT0x634Number of buffer words transferred since last START

37.11.1 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTED
Disabled0
Enabled1
BRWEND
Disabled0
Enabled1
CRWDONE
Disabled0
Enabled1
DRWRESULTDONE
Disabled0
Enabled1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdV U T S R Q P O N M L K J I H G F E D C B A
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IDRWFieldValue IdValueDescription
ERWCALIBRATEDONEEnable or disable interrupt for CALIBRATEDONE event
See EVENTS_CALIBRATEDONE
Disabled0Disable
Enabled1Enable
FRWSTOPPEDEnable or disable interrupt for STOPPED event
See EVENTS_STOPPED
Disabled0Disable
Enabled1Enable
GRWCHOLIMITHEnable or disable interrupt for CH[0].LIMITH event
See EVENTS_CH[0].LIMITH
Disabled0Disable
Enabled1Enable
HRWCHOLIMITLEnable or disable interrupt for CH[0].LIMITL event
See EVENTS_CH[0].LIMITL
Disabled0Disable
Enabled1Enable
IRWCH1LIMITHEnable or disable interrupt for CH[1].LIMITH event
See EVENTS_CH[1].LIMITH
Disabled0Disable
Enabled1Enable
JRWCH1LIMITLEnable or disable interrupt for CH[1].LIMITL event
See EVENTS_CH[1].LIMITL
Disabled0Disable
Enabled1Enable
KRWCH2LIMITHEnable or disable interrupt for CH[2].LIMITL event
See EVENTS_CH[2].LIMITL
Disabled0Disable
Enabled1Enable
LRWCH2LIMITLEnable or disable interrupt for CH[2].LIMITL event
See EVENTS_CH[2].LIMITL
Disabled0Disable
Enabled1Enable
MRWCH3LIMITHEnable or disable interrupt for CH[3].LIMITL event
See EVENTS_CH[3].LIMITL
Disabled0Disable
Enabled1Enable
NRWCH3LIMITLEnable or disable interrupt for CH[3].LIMITL event
See EVENTS_CH[3].LIMITL
Disabled0Disable
Enabled1Enable
ORWCH4LIMITHEnable or disable interrupt for CH[4].LIMITL event
See EVENTS_CH[4].LIMITL
Disabled0Disable
Enabled1Enable
PRWCH4LIMITLEnable or disable interrupt for CH[4].LIMITL event
See EVENTS_CH[4].LIMITL
Disabled0Disable
Enabled1Enable
QRWCH5LIMITHEnable or disable interrupt for CH[5].LIMITH event
Bit number313029282726252423222120191817161514131211109876543210
IdV U T S R Q P O N M L K J I H G F E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
RRWCH5LIMITL
Disabled0
Enabled1
SRWCH6LIMITH
Disabled0
Enabled1
TRWCH6LIMITL
Disabled0
Enabled1
URWCH7LIMITH
Disabled0
Enabled1
VRWCH7LIMITL
Disabled0Disable
Enabled1Enable

37.11.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdV U T S R Q P O N M L K J I H G F E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTED
BRWEND
Write &#x27;1&#x27; to Enable interrupt for STARTED event
See EVENTS_STARTED
Enable
Read: Disabled
Read: Enabled
CRWDONEWrite &#x27;1&#x27; to Enable interrupt for END event
See EVENTS_DONE
Enable
Read: Disabled
Read: Enabled
DRWRESULTDONEWrite &#x27;1&#x27; to Enable interrupt for RESULTDONE event
See EVENTS_RESULTDONE
Enable
Read: Disabled
Set1Read: Enabled
Disabled0Read: Enabled
Enabled1Read: Enabled
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdV U T S R Q P O N M L K J I H G F E D C B A
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
ERWCALIBRATEDONEWrite &#x27;1&#x27; to Enable interrupt for CALIBRATEDONE event
See EVENTS_CALIBRATEDONE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWSTOPPEDWrite &#x27;1&#x27; to Enable interrupt for STOPPED event
See EVENTS_STOPPED
Set1Enable
Bit number313029282726252423222120191817161514131211109876543210
IdVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
PRWCH4LIMITL
Set1
Disabled0
Enabled1
QRWCH5LIMITH
Set1Write &#x27;1&#x27; to Enable interrupt for CH[4].LIMITL event
Disabled0
Enabled1
RRWCH5LIMITLWrite &#x27;1&#x27; to Enable interrupt for CH[5].LIMITH event
Set1
Disabled0
Enabled1Write &#x27;1&#x27; to Enable interrupt for CH[5].LIMITL event
Set1See EVENTS_CH[5].LIMITL
Disabled0Enable
Enabled1Read: Disabled
SRWCH6LIMITHWrite &#x27;1&#x27; to Enable interrupt for CH[6].LIMITH event
See EVENTS_CH[6].LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
TRWCH6LIMITLWrite &#x27;1&#x27; to Enable interrupt for CH[6].LIMITL event
See EVENTS_CH[6].LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
URWCH7LIMITHWrite &#x27;1&#x27; to Enable interrupt for CH[7].LIMITH event
See EVENTS_CH[7].LIMITH
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
VRWCH7LIMITLWrite &#x27;1&#x27; to Enable interrupt for CH[7].LIMITL event
See EVENTS_CH[7].LIMITL
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

37.11.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSTARTEDWrite &#x27;1&#x27; to Disable interrupt for STARTED event
See EVENTS_STARTED
Clear1Disable
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdV U T S R Q P O N M L K J I H G F E D C B A
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWENDWrite '1' to Disable interrupt for END event
See EVENTS_END
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWDONEWrite '1' to Disable interrupt for DONE event
See EVENTS_DONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWRESULTDONEWrite '1' to Disable interrupt for RESULTDONE event
See EVENTS_RESULTDONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWCALIBRATEDONEWrite '1' to Disable interrupt for CALIBRATEDONE event
See EVENTS_CALIBRATEDONE
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWSTOPPEDWrite '1' to Disable interrupt for STOPPED event
See EVENTS_STOPPED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWCHOLIMITHWrite '1' to Disable interrupt for CH[0].LIMITH event
CH1LIMITLClear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled1Read: Enabled
IRWCH1LIMITLClear1DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDiabilityDisabilityDisabilityDisabilityDisability
DisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisableDisable
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Enabled1Read: Enabled
LRWCH2LIMITLWrite '1' to Disable interrupt for CH[2].LIMITL event
See EVENTS_CH[2].LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRWCH3LIMITHWrite '1' to Disable interrupt for CH[3].LIMITH event
See EVENTS_CH[3].LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
NRWCH3LIMITLWrite '1' to Disable interrupt for CH[3].LIMITL event
See EVENTS_CH[3].LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ORWCH4LIMITHWrite '1' to Disable interrupt for CH[4].LIMITH event
See EVENTS_CH[4].LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
PRWCH4LIMITLWrite '1' to Disable interrupt for CH[4].LIMITL event
See EVENTS_CH[4].LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
QRWCH5LIMITHWrite '1' to Disable interrupt for CH[5].LIMITH event
See EVENTS_CH[5].LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
RRWCH5LIMITLWrite '1' to Disable interrupt for CH[5].LIMITL event
See EVENTS_CH[5].LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
SRWCH6LIMITHWrite '1' to Disable interrupt for CH[6].LIMITH event
See EVENTS_CH[6].LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
TRWCH6LIMITLWrite '1' to Disable interrupt for CH[6].LIMITL event
See EVENTS_CH[6].LIMITL
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
URWCH7LIMITHWrite '1' to Disable interrupt for CH[7].LIMITH event
See EVENTS_CH[7].LIMITH
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000O0000000000000000000000000000000000000000000000000UUTSRQPONMLKJIHGFEDCBA
IdRWFieldValue IdValueDescription
VRWCH7LIMITLWrite &#x27;1&#x27; to Disable interrupt for CH[7].LIMITL event

37.11.4 STATUS

Address offset: 0x400

Status

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSTATUSStatus
Ready0ADC is ready. No on-going conversion.
Busy1ADC is busy. Conversion in progress.

37.11.5 ENABLE

Address offset: 0x500

Enable or disable ADC

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWENABLE
Disabled0
Enabled1
When enabled, the ADC will acquire access to the analog input pins specified in the CH[n].PSELP and CH[n].PSELN registers.

37.11.6 CH[0].PSELP

Address offset: 0x510

Input positive pin selection for CH[0]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.7 CH[0].PSELN

Address offset: 0x514

Input negative pin selection for CH[0]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.8 CH[0].CONFIG

Address offset: 0x518

Input configuration for CH[0]

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
ARWRESP
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x00020000000000000000000010000000000000000
IdRWFieldValue Id
40us
FRWMODE
SE
Diff
GRWBURST
Disabled
Enabled

37.11.9 CH[0].LIMIT

Address offset: 0x51C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.10 CH[1].PSELP

Address offset: 0x520

Input positive pin selection for CH[1]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.11 CH[1].PSELN

Address offset: 0x524

Input negative pin selection for CH[1]

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWPSELN
NC
AnalogInput0
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
AnalogInput12AIN1
AnalogInput23AIN2
AnalogInput34AIN3
AnalogInput45AIN4
AnalogInput56AIN5
AnalogInput67AIN6
AnalogInput78AIN7
VDD9VDD

37.11.12 CH[1].CONFIG

Address offset: 0x528

Input configuration for CH[1]

Bit number313029282726252423222120191817161514131211109876543210
IdG
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
ARWRESP
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
GRWBURST
Disabled0

samples as fast as it can, and sends the average to Data RAM.

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x0002000000000000000000100000000000000000
IdRWFieldValue IdValueDescription
Enabled1Burst mode is enabled. SAADC takes 2AOVERSAMPLE number of

37.11.13 CH[1].LIMIT

Address offset: 0x52C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.14 CH[2].PSELP

Address offset: 0x530

Input positive pin selection for CH[2]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.15 CH[2].PSELN

Address offset: 0x534

Input negative pin selection for CH[2]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
VDD

37.11.16 CH[2].CONFIG

Address offset: 0x538

Input configuration for CH[2]

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x0002000000000000000000001000000000000000
IdRWFieldValue IdValueDescription
ARWRESP
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
GRWBURST
Disabled0
Enabled1

37.11.17 CH[2].LIMIT

Address offset: 0x53C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.18 CH[3].PSELP

Address offset: 0x540

Input positive pin selection for CH[3]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.19 CH[3].PSELN

Address offset: 0x544

Input negative pin selection for CH[3]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.20 CH[3].CONFIG

Address offset: 0x548

Input configuration for CH[3]

Bit number
Id
Reset 0x000200000000000000000000000000
IdRWFieldValue IdValueDescription
ARWRESPPositive channel resistor control
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
GRWBURST
Disabled0
Enabled1

37.11.21 CH[3].LIMIT

Address offset: 0x54C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.22 CH[4].PSELP

Address offset: 0x550

Input positive pin selection for CH[4]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.23 CH[4].PSELN

Address offset: 0x554

Input negative pin selection for CH[4]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.24 CH[4].CONFIG

Address offset: 0x558

Input configuration for CH[4]

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x00020000000000000000000100000000000000000
IdRWFieldValue IdValueDescription
ARWRESP
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
GRWBURST
Disabled0
Enabled1

37.11.25 CH[4].LIMIT

Address offset: 0x55C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.26 CH[5].PSELP

Address offset: 0x560

Input positive pin selection for CH[5]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPSELPAnalog positive input channel
NC0Not connected
AnalogInput01AIN0
AnalogInput12AIN1
AnalogInput23AIN2
AnalogInput34AIN3
AnalogInput45AIN4
AnalogInput56AIN5
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
AnalogInput67
AnalogInput78
VDD9

37.11.27 CH[5].PSELN

Address offset: 0x564

Input negative pin selection for CH[5]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.28 CH[5].CONFIG

Address offset: 0x568

Input configuration for CH[5]

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x00020000000000000000000010000000000000000
IdRWFieldValue IdValueDescription
ARWRESP
Bypass0Positive channel resistor control
Pulldown1Bypass resistor ladder
Pullup2Pull-down to GND
VDD1_23Pull-up to VDD
BRWRESNSet input at VDD/2
Bypass0Negative channel resistor control
Pulldown1Bypass resistor ladder
Pullup2Pull-down to GND
VDD1_23Pull-up to VDD
CRWGAINSet input at VDD/2
Gain1_60Gain control
Gain1_511/6
Gain1_421/5
Gain1_331/4
Gain1_241/3
Gain151/2
Gain261
Gain472
DRWREFSEL4
Internal0Reference control
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
GRWBURST
Disabled0
Enabled1

37.11.29 CH[5].LIMIT

Address offset: 0x56C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF800001111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333344444444444444444444444444444444444444444444444444555555555555555555555555555555555555555555555555556666666666666666666666666666666666666666666666666677777777777777777777777777777777777777777777777777888888888888888888888888888888888888888888888888889999999999999999999999999999999999999999999999999910101010101010101010101010101010101010101010101010101010101010101010

37.11.30 CH[6].PSELP

Address offset: 0x570

Input positive pin selection for CH[6]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.31 CH[6].PSELN

Address offset: 0x574

Input negative pin selection for CH[6]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELN
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.32 CH[6].CONFIG

Address offset: 0x578

Input configuration for CH[6]

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0002000000000000000000010000000000000000
IdRWFieldValue IdValue
ARWRESP
Bypass0
Pulldown1
Pullup2
VDD1_23
BRWRESN
Bypass0
Pulldown1
Pullup2
VDD1_23
CRWGAIN
Gain1_60
Gain1_51
Gain1_42
Gain1_33
Gain1_24
Gain15
Gain26
Gain47
DRWREFSEL
Internal0
VDD1_41
ERWTACQ
3us0
5us1
10us2
15us3
20us4
40us5
FRWMODE
SE0
Diff1
Bit number
Id
Reset 0x00020000
IdRWFieldValue IdValueDescription
GRWBURSTEnable burst mode
Disabled0Burst mode is disabled (normal operation)
Enabled1Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM.

37.11.33 CH[6].LIMIT

Address offset: 0x57C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.34 CH[7].PSELP

Address offset: 0x580

Input positive pin selection for CH[7]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSELP
NC0
AnalogInput01
AnalogInput12
AnalogInput23
AnalogInput34
AnalogInput45
AnalogInput56
AnalogInput67
AnalogInput78
VDD9

37.11.35 CH[7].PSELN

Address offset: 0x584

Input negative pin selection for CH[7]

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWPSELNAnalog negative input, enables differential channel
NC0Not connected
AnalogInput01AIN0
AnalogInput12AIN1
AnalogInput23AIN2
AnalogInput34AIN3
AnalogInput45AIN4
AnalogInput56AIN5
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
AnalogInput67
AnalogInput78
VDD9

37.11.36 CH[7].CONFIG

Address offset: 0x588

Input configuration for CH[7]

Bit number313029282726252423222120191817161514131211109876543210
IdGFEEEDCCCBBAA
Reset 0x0002000000000000000000001000000000000000
IdRWFieldValue IdValueDescription
ARWRESP
Bypass0Positive channel resistor control
Pulldown1Bypass resistor ladder
Pullup2Pull-down to GND
VDD1_23Pull-up to VDD
BRWRESNSet input at VDD/2
Bypass0Negative channel resistor control
Pulldown1Bypass resistor ladder
Pullup2Pull-down to GND
VDD1_23Pull-up to VDD
CRWGAINSet input at VDD/2
Gain1_60Gain control
Gain1_511/6
Gain1_421/5
Gain1_331/4
Gain1_241/3
Gain151/2
Gain261
Gain472
DRWREFSEL4
Internal0Reference control
VDD1_41Internal reference (0.6 V)
ERWTACQVDD/4 as reference
Acquisition time, the time the ADC uses to sample the input voltage
3us03 us
5us15 us
10us210 us
15us315 us
20us420 us
40us540 us
FRWMODEEnable differential mode
SE0Single ended, PSELN will be ignored, negative input to ADC shorted to GND
Diff1Differential
GRWBURSTEnable burst mode
Disabled0Burst mode is disabled (normal operation)
Enabled1Burst mode is enabled. SAADC takes 2^OVERSAMPLE number of samples as fast as it can, and sends the average to Data RAM.

37.11.37 CH[7].LIMIT

Address offset: 0x58C

High/low limits for event monitoring a channel

Bit number
Id
Reset 0x7FFF8000
IdRWFieldValue IdValueDescription
ARWLOW[-32768 to +32767]Low level limit
BRWHIGH[-32768 to +32767]High level limit

37.11.38 RESOLUTION

Address offset: 0x5F0

Resolution configuration

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValue
ARWVAL
8bit0
10bit1
12bit2
14bit3

37.11.39 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 number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERSAMPLE
Bypass0
Over2x1
Over4x2
Over8x3
Over16x4
Over32x5
Over64x6
Over128x7
Over256x8

37.11.40 SAMPLERATE

Address offset: 0x5F8

Controls normal or continuous sample rate

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCC[80..2047]
BRWMODE
Task0
Timers1

37.11.41 RESULT.PTR

Address offset: 0x62C

Data pointer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRData pointer

37.11.42 RESULT.MAXCNT

Address offset: 0x630

Maximum number of buffer words to transfer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTMaximum number of buffer words to transfer

37.11.43 RESULT.AMOUNT

Address offset: 0x634

Number of buffer words transferred since last START

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARAMOUNTNumber of buffer words transferred since last START. This

Number of buffer words transferred since last START. This register can be read after an END or STOPPED event.

37.12 Electrical specification

37.12.1 SAADC Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
DNLDifferential non-linearity, 10-bit resolution-0.95&lt;1LSB
INLIntegral non-linearity, 10-bit resolution1LSB
$V_{OS}$ Differential offset error (calibrated), 10-bit $resolution {}^a$ +-2LSB
$C_{EG}$ Gain error temperature coefficient0.02%/°C
$f_{SAMPLE}$ Maximum sampling rate200kHz
$t_{ACQ,10k}$ Acquisition time (configurable), source Resistance &lt;= 10kOhm3μs
$t_{ACQ,40k}$ Acquisition time (configurable), source Resistance &lt;= 40kOhm5μs
$t_{ACQ,100k}$ Acquisition time (configurable), source Resistance &lt;= 100kOhm10μs
$t_{ACQ,200k}$ Acquisition time (configurable), source Resistance &lt;= 200kOhm15μs
$t_{ACQ,400k}$ Acquisition time (configurable), source Resistance &lt;= 400kOhm20μs
$t_{ACQ,800k}$ Acquisition time (configurable), source Resistance &lt;= 800kOhm40μs
$t_{CONV}$ Conversion time&lt;2μs
$I_{ADC,CONV}$ ADC current during ACQuisition and CONVersion700μA
$I_{ADC,IDLE}$ Idle current, when not sampling, excluding clock sources andregulator base $currents^{33}$ &lt;5μA
$E_{G1/6}$ $Error^b$ for Gain = 1/6-33%
$E_{G1/4}$ $Error^b$ for Gain = 1/4-33%
$E_{G1/2}$ $Error^b$ for Gain = 1/2-34%
$E_{G1}$ $Error^b$ for Gain = 1-34%
$C_{SAMPLE}$ Sample and hold capacitance at maximum $gain^{34}$ 2.5pF
$R_{INPUT}$ Input resistance&gt;1MΩ
$E_{NOB}$ Effective number of bits, differential mode, 12-bit resolution, 1/1 gain, 3 μs acquisition time, crystal HFCLK, 200 ksps9Bit
$S_{NDR}$ Peak signal to noise and distortion ratio, differential mode, 12-bit resolution, 1/1 gain, 3 μs acquisition time, crystal HFCLK, 200 ksps56dB
$S_{FDR}$ Spurious free dynamic range, differential mode, 12-bit resolution, 1/1 gain, 3 μs acquisition time, crystal HFCLK, 200 ksps70dBc
$R_{LADDER}$ Ladder resistance160kΩ


Figure 107: Model of SAADC input (one channel)

Note: SAADC average current calculation for a given application is based on the sample period, conversion and acquisition time $( \mathsf { t } _ { \mathsf { c o n v } }$ and tACQ) and conversion and idle current (IADC,CONV and IADC,IDLE). For example, sampling at 4kHz gives a sample period of 250µs. The average current consumption would then be:

$$
I _ {A V E R A G E} = \left(\frac {\left(t _ {C O N V} + t _ {A C Q}\right)}{2 5 0}\right) \left(I _ {A D C, C O N V}\right) + \left(\frac {2 5 0 - \left(t _ {C O N V} + t _ {A C Q}\right)}{2 5 0}\right) \left(I _ {A D C, I D L E}\right)
$$


Figure 108: ADC INL vs Output Code


Figure 109: ADC DNL vs Output Code


Figure 110: FFT of a 2.8 kHz sine at 200 ksps ()

37.13 Performance factors

Clock jitter, affecting sample timing accuracy, and circuit noise can affect ADC performance.

Jitter can be between START tasks or from START task to acquisition. START timer accuracy and startup times of regulators and references will contribute to variability. Sources of circuit noise may include CPU activity and the DC/DC regulator. Best ADC performance is achieved using START timing based on the TIMER module, HFXO clock source, and Constant Latency mode.

38 COMP — Comparator

The comparator (COMP) compares an input voltage (VIN+) against a second input voltage (VIN-). VIN+ can be derived from an analog input pin (AIN0-AIN7). VIN- can be derived from multiple sources depending on the operation mode of the comparator.

Main features of the comparator are:

• Input range from 0 V to VDD

• Single-ended mode

• Fully flexible hysteresis using a 64-level reference ladder

• Differential mode

• Configurable 50 mV hysteresis

• Reference inputs (VREF):

• VDD

• External reference from AIN0 to AIN7 (between 0 V and VDD)

• Internal references 1.2 V, 1.8 V and 2.4 V

• Three speed/power consumption modes: low-power, normal and high-speed

• Single-pin capacitive sensor support

• Event generation on output changes

• UP event on VIN- > VIN+

• DOWN event on VIN- < VIN+

• CROSS event on VIN+ and VIN- crossing

• READY event on core and internal reference (if used) ready


Figure 111: Comparator overview

Once enabled (using the ENABLE register), the comparator is started by triggering the START task and stopped by triggering the STOP task. After a start-up time of tCOMP,START, the comparator will generate a READY event to indicate that it is ready for use and that its output is correct. When the COMP module is started, events will be generated every time VIN+ crosses VIN-.

38 Operation modes

The comparator can be configured to operate in two main operation modes, differential mode and singleended mode. See the MODE register for more information. In both operation modes, the comparator can operate in different speed and power consumption modes (low-power, normal and high-speed). High-speed mode will consume more power compared to low-power mode, and low-power mode will result in slower response time compared to high-speed mode.

Use the PSEL register to select any of the AIN0-AIN7 pins as VIN+ input, irregardless of the operation mode selected for the comparator. The source of VIN- depends on which operation mode is used:

• Differential mode: Derived directly from AIN0 to AIN7

• Single-ended mode: Derived from VREF. VREF can be derived from VDD, AIN0-AIN7 or internal 1.2 V, 1.8 V and 2.4 V references.

The selected analog pins will be acquired by the comparator once it is enabled.

An optional hysteresis on VIN+ and VIN- can be enabled when the module is used in differential mode through the HYST register. In single-ended mode, VUP and VDOWN thresholds can be set to implement a hysteresis using the reference ladder (see Figure 114: Comparator in single-ended mode on page 399). This hysteresis is in the order of magnitude of 50 mV, and shall prevent noise on the signal to create unwanted events. See Figure 115: Hysteresis example where VIN+ starts below VUP on page 399 for illustration of the effect of an active hysteresis on a noisy input signal.

An upward crossing will generate an UP event and a downward crossing will generate a DOWN event. The CROSS event will be generated every time there is a crossing, independent of direction.

The immediate value of the comparator can be sampled to RESULT register by triggering the SAMPLE task.

38.1 Differential mode

In differential mode, the reference input VIN- is derived directly from one of the AINx pins.

Before enabling the comparator via the ENABLE register, the following registers must be configured for the differential mode:

• PSEL

• MODE

• EXTREFSEL


Figure 112: Comparator in differential mode

Restriction: Depending on the device, not all the analog inputs may be available for each MUX. See definitions for PSEL and EXTREFSEL for more information about which analog pins are available on a particular device.

When HYST register is turned on while in this mode, the output of the comparator (and associated events) will change from ABOVE to BELOW whenever VIN+ becomes lower than VIN- - (VDIFFHYST / 2). It will also change from BELOW to ABOVE whenever VIN+ becomes higher than VIN- + (VDIFFHYST / 2). This behavior is illustrated in Figure 113: Hysteresis enabled in differential mode on page 398.


Figure 113: Hysteresis enabled in differential mode

38.2 Single-ended mode

In single-ended mode, VIN- is derived from the reference ladder.

Before enabling the comparator via the ENABLE register, the following registers must be configured for the single-ended mode:

• PSEL

• MODE

• REFSEL

• EXTREFSEL

• TH

The reference ladder uses the reference voltage (VREF) to derive two new voltage references, VUP and VDOWN. VUP and VDOWN are configured using THUP and THDOWN respectively in the TH register. VREF can be derived from any of the available reference sources, configured using the EXTREFSEL and REFSEL registers as illustrated in Figure 114: Comparator in single-ended mode on page 399. When AREF is selected in the REFSEL register, the EXTREFSEL register is used to select one of the AIN0-AIN7 analog input pins as reference input. The selected analog pins will be acquired by the comparator once it is enabled.


Figure 114: Comparator in single-ended mode

Restriction: Depending on the device, not all the analog inputs may be available for each MUX. See definitions for PSEL and EXTREFSEL for more information about which analog pins are available on a particular device.

When the comparator core detects that VIN+ > VIN-, i.e. ABOVE as per the RESULT register, VIN- wil switch to VDOWN. When VIN+ falls below VIN- again, VIN- will be switched back to VUP. By specifying VUP larger than VDOWN, a hysteresis can be generated as illustrated in Figure 115: Hysteresis example where VIN+ starts below VUP on page 399 and Figure 116: Hysteresis example where VIN+ starts above VUP on page 400.

Writing to HYST has no effect in single-ended mode, and the content of this register is ignored.


Figure 115: Hysteresis example where VIN+ starts below VUP


Figure 116: Hysteresis example where VIN+ starts above VUP

38.3 Registers

Table 94: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40013000COMPCOMPGeneral purpose comparator

Table 95: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start comparator
TASKS_STOP0x004Stop comparator
TASKS_SAMPLE0x008Sample comparator value
EVENTS_READY0x100COMP is ready and output is valid
EVENTS_DOWN0x104Downward crossing
EVENTS_UP0x108Upward crossing
EVENTS_CROSS0x10CDownward or upward crossing
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
RESULT0x400Compare result
ENABLE0x500COMP enable
PSEL0x504Pin select
REFSEL0x508Reference source select for single-ended mode
EXTREFSEL0x50CExternal reference select
TH0x530Threshold configuration for hysteresis unit
MODE0x534Mode configuration
HYST0x538Comparator hysteresis enable
ISOURCE0x53CCurrent source select on analog input

38.3.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY_SAMPLE
Disabled0
Enabled1
BRWREADY_STOP
Disabled0
Enabled1
CRWDOWN_STOP
Disabled0
Enabled1
DRWUP_STOP
Disabled0
Enabled1
ERWCROSS_STOP
Disabled0
Enabled1

38.3.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Disabled0
Enabled1
BRWDOWN
Disabled0
Enabled1
CRWUP
Disabled0
Enabled1
DRWCROSS
Disabled0See EVENTS_CROSS
Enabled1

38.3.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Set1
Disabled0
Enabled1
BRWDOWN
Set1
Disabled0
Enabled1
CRWUP
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCROSSWrite &#x27;1&#x27; to Enable interrupt for CROSS event
See EVENTS_CROSS
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

38.3.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Clear1
Disabled0
Enabled1
BRWDOWN
Clear1
Disabled0
Enabled1
CRWUPWrite &#x27;1&#x27; to Disable interrupt for DOWN event
See EVENTS_UP
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCROSSWrite &#x27;1&#x27; to Disable interrupt for CROSS event
See EVENTS_CROSS
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

38.3.5 RESULT

Address offset: 0x400

Compare result

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRESULT
Below0
Above1

38.3.6 ENABLE

Address offset: 0x500

COMP enable

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled2

38.3.7 PSEL

Address offset: 0x504

Pin select

Bit number313029282726252423222120191817161514131211109876543210
IdAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSEL
AnalogInput00
AnalogInput11
AnalogInput22
AnalogInput33
AnalogInput44
AnalogInput55
AnalogInput66
AnalogInput77

38.3.8 REFSEL

Address offset: 0x508

Reference source select for single-ended mode

Bit number313029282726252423222120191817161514131211109876543210
IdAAA
Reset 0x00000004000000000000000000000000000000100
IdRWFieldValue IdValue
ARWREFSEL
Int1V20
Int1V81
Int2V42
VDD4
ARef7

38.3.9 EXTREFSEL

Address offset: 0x50C

External reference select

Bit number313029282726252423222120191817161514131211109876543210
IdAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEXTREFSEL
AnalogReference00
AnalogReference11
AnalogReference22
AnalogReference33
AnalogReference44
AnalogReference55
AnalogReference66
AnalogReference77

38.3.10 TH

Address offset: 0x530

Threshold configuration for hysteresis unit

Bit number313029282726252423222120191817161514131211109876543210
IdBBBBBBAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTHDOWN[63:0]
BRWTHUP[63:0]

38.3.11 MODE

Address offset: 0x534

Mode configuration

Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSPSpeed and power modes
Low0Low-power mode
Normal1Normal mode
High2High-speed mode
BRWMAINMain operation modes
SE0Single-ended mode
Diff1Differential mode

38.3.12 HYST

Address offset: 0x538

Comparator hysteresis enable

Bit number
Id0
Reset 0x00000000
IdRWFieldValue Id
ARWHYST
NoHyst0
Hyst50mV

38.3.13 ISOURCE

Address offset: 0x53C

Current source select on analog input

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWISOURCE
Off0
len2mA51
len5mA2
len10mA3

38.4 Electrical specification

38.4.1 COMP Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{COMP,LP}$ Core run current in low power mode2μA
$I_{COMP,N}$ Core run current in normal mode5μA
$I_{COMP,HS}$ Core run current in high-speed mode10μA
$t_{PROP DLY,LP}$ Propagation delay, low-power $mode^a$ 0.6μS
$t_{PROP DLY,N}$ Propagation delay, normal $mode^a$ 0.2μS
$t_{PROP DLY,HS}$ Propagation delay, high-speed $mode^a$ 0.1μS
$V_{DIFFHYST}$ Optional hysteresis applied to differential input30mV
$V_{VDD-VREF}$ Required difference between VDD and a selected VREF, VDD &gt; VREF0.3V
$I_{INT\_REF}$ Current used by the internal bandgap reference when selected as source for VREF13μA
$t_{INT\_REF,START}$ Startup time for the internal bandgap reference5080μS
$E_{INT\_REF}$ Internal bandgap reference error-33%
$R_{LADDER}$ Reference ladder resistance, $I_{LADDER} = VREF / R_{LADDER}$ 550kΩ
$V_{INPUTOFFSET}$ Input offset-1010mV
$D_{NLLADDER}$ Differential non-linearity of reference ladder&lt;0.1LSB
$t_{COMP,START}$ Startup time for the comparator core3μS

Total comparator run current must be calculated from the ICOMP, IINT_REF, and ILADDER values for a given reference voltage.

39 LPCOMP — Low power comparator

LPCOMP compares an input voltage against a reference voltage.

Listed here are the main features of LPCOMP:

• 0 - VDD input range

• Ultra low power

• Eight input options (AIN0 to AIN7)

• Reference voltage options:

• Two external analog reference inputs, or

• 15-level internal reference ladder (VDD/16)

• Optional hysteresis enable on input

• Wakeup source from OFF mode

In System ON, the LPCOMP can generate separate events on rising and falling edges of a signal, or sample the current state of the pin as being above or below the selected reference. The block can be configured to use any of the analog inputs on the device. Additionally, the low power comparator can be used as an analog wakeup source from System OFF or System ON. The comparator threshold can be programmed to a range of fractions of the supply voltage.

Restriction: LPCOMP cannot be used (STARTed) at the same time as COMP. Only one comparator can be used at a time.


Figure 117: Low power comparator

The wakeup comparator (LPCOMP) compares an input voltage (VIN+), which comes from an analog input pin selected via the PSEL register against a reference voltage (VIN-) selected via the REFSEL on page 411 and EXTREFSEL registers.

The PSEL, REFSEL, and EXTREFSEL registers must be configured before the LPCOMP is enabled through the ENABLE register.

The HYST register allows enabling an optional hysteresis in the comparator core. This hysteresis is in the order of magnitude of 50 mV, and shall prevent noise on the signal to create unwanted events. See Figure 118: Effect of hysteresis on a noisy input signal on page 407 for illustration of the effect of an active hysteresis on a noisy input signal. It is disabled by default, and shall be configured before enabling LPCOMP as well.

The LPCOMP is started by triggering the START task. After a start-up time of tLPCOMP,STARTUP the LPCOMP will generate a READY event to indicate that the comparator is ready to use and the output of the LPCOMP is correct. The LPCOMP will generate events every time VIN+ crosses VIN-. More specifically, every time VIN+ rises above VIN- (upward crossing) an UP event is generated along with a CROSS event. Every time VIN+ falls below VIN- (downward crossing), a DOWN event is generated along with a CROSS event. When hysteresis is enabled, the upward crossing level becomes (VIN- + VHYST/2), and the downward crossing level becomes (VIN- - VHYST/2).

The LPCOMP is stopped by triggering the STOP task.


Figure 118: Effect of hysteresis on a noisy input signal

LPCOMP will be operational in both System ON and System OFF mode when it is enabled through the ENABLE register. See POWER — Power supply on page 81 for more information about power modes. Note that it is not allowed to go to System OFF when a READY event is pending to be generated.

All LPCOMP registers, including ENABLE, are classified as retained registers when the LPCOMP is enabled. However, when the device wakes up from System OFF, all LPCOMP registers will be reset.

The LPCOMP can wake up the system from System OFF by asserting the ANADETECT signal. The ANADETECT signal can be derived from any of the event sources that generate the UP, DOWN and CROSS events. In case of wakeup from System OFF, no events will be generated, only the ANADETECT signal. See the ANADETECT register ( ANADETECT on page 411) for more information on how to configure the ANADETECT signal.

The immediate value of the LPCOMP can be sampled to RESULT on page 410 by triggering the SAMPLE task.

See RESETREAS on page 88 for more information on how to detect a wakeup from LPCOMP.

39.1 Shared resources

The LPCOMP shares resources with other peripherals.

The LPCOMP shares analog resources with SAADC and COMP. While it is possible to use SAADC a the same time as COMP or LPCOMP, COMP and LPCOMP are mutually exclusive: enabling one will automatically disable the other. In addition, when using SAADC and COMP or LPCOMP simultaneously, it is not possible to select the same analog input pin for both modules.

The LPCOMP peripheral shall not be disabled (by writing to the ENABLE register) before the peripheral has been stopped. Failing to do so may result in unpredictable behaviour.

39.2 Pin configuration

You can use the LPCOMP.PSEL register to select one of the analog input pins, AIN0 through AIN7, as the analog input pin for the LPCOMP.

See GPIO — General purpose input/output on page 114 for more information about the pins. Similarly, you can use EXTREFSEL on page 411 to select one of the analog reference input pins, AIN0 and AIN1, as input for AREF in case AREF is selected in EXTREFSEL on page 411. The selected analog pins will be acquired by the LPCOMP when it is enabled through ENABLE on page 410.

39.3 Registers

Table 96: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40013000LPCOMPLPCOMPLow power comparator

Table 97: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start comparator
TASKS_STOP0x004Stop comparator
TASKS_SAMPLE0x008Sample comparator value
EVENTS_READY0x100LPCOMP is ready and output is valid
EVENTS_DOWN0x104Downward crossing
EVENTS_UP0x108Upward crossing
EVENTS_CROSS0x10CDownward or upward crossing
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
RESULT0x400Compare result
ENABLE0x500Enable LPCOMP
PSEL0x504Input pin select
REFSEL0x508Reference select
EXTREFSEL0x50CExternal reference select
ANADETECT0x520Analog detect configuration
HYST0x538Comparator hysteresis enable

39.3.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY_SAMPLE
Disabled0
Enabled1
BRWREADY_STOP
Disabled0
Enabled1
CRWDOWN_STOP
Disabled0
Enabled1
DRWUP_STOP
Disabled0
Enabled1
ERWCROSS_STOP
Disabled0
Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
Enabled

39.3.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Set1
Disabled0
Enabled1
BRWDOWN
Set1
Disabled0
Enabled1
CRWUP
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWCROSSWrite &#x27;1&#x27; to Enable interrupt for CROSS event
See EVENTS_CROSS
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

39.3.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Clear1
Disabled0
Enabled1
BRWDOWN
Clear1
Disabled0
Enabled1
CRWUPWrite '1' to Disable interrupt for UP event
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Clear1
Disabled0
Enabled1
DRWCROSS
Clear1
Disabled0
Enabled1Read: Enabled

39.3.4 RESULT

Address offset: 0x400

Compare result

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARRESULT
Bellow0
Below0
Above1

39.3.5 ENABLE

Address offset: 0x500

Enable LPCOMP

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled1

39.3.6 PSEL

Address offset: 0x504

Input pin select

Bit number313029282726252423222120191817161514131211109876543210
IdAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPSEL
AnalogInput00
AnalogInput11
AnalogInput22
AnalogInput33
AnalogInput44
AnalogInput55
AnalogInput66
AnalogInput77

39.3.7 REFSEL

Address offset: 0x508

Reference select

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000400000000000000000000000000000100
IdRWFieldValue IdValue
ARWREFSEL
Ref1_8Vdd0
Ref2_8Vdd1
Ref3_8Vdd2
Ref4_8Vdd3
Ref5_8Vdd4
Ref6_8Vdd5
Ref7_8Vdd6
ARef7
Ref1_16Vdd8
Ref3_16Vdd9
Ref5_16Vdd10
Ref7_16Vdd11
Ref9_16Vdd12
Ref11_16Vdd13
Ref13_16Vdd14
Ref15_16Vdd15

39.3.8 EXTREFSEL

Address offset: 0x50C

External reference select

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWEXTREFSEL
AnalogReference00
AnalogReference11

39.3.9 ANADETECT

Address offset: 0x520

Analog detect configuration

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWANADETECT
Cross0
Up1
Down2

39.3.10 HYST

Address offset: 0x538

Comparator hysteresis enable

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWHYST
NoHyst
Hyst50mV

39.4 Electrical specification

39.4.1 LPCOMP Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{LPC}$ Run current for low power comparator0.5μA
$t_{LPCANADET}$ Time from VIN crossing (&gt;=50mV above threshold) to ANADETECT signal generated.5μs
$E_{REFLADDER}$ Error in reference ladder threshold voltage-3030mV
$V_{HYST}$ Optional hysteresis30mV

40 WDT — Watchdog timer

A countdown watchdog timer using the low-frequency clock source (LFCLK) offers configurable and robust protection against application lock-up.

The watchdog timer is started by triggering the START task.

The watchdog can be paused during long CPU sleep periods for low power applications and when the debugger has halted the CPU. The watchdog is implemented as a down-counter that generates a TIMEOUT event when it wraps over after counting down to 0. When the watchdog timer is started through the START task, the watchdog counter is loaded with the value specified in the CRV register. This counter is also reloaded with the value specified in the CRV register when a reload request is granted.

The watchdog’s timeout period is given by:

$$
\text { timeout } [ s ] = (\mathrm{CRV} + 1) / 3 2 7 6 8
$$

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 104.

40.1 Reload criteria

The watchdog has eight separate reload request registers, which shall be used to request the watchdog to reload its counter with the value specified in the CRV register. To reload the watchdog counter, the specia value 0x6E524635 needs to be written to all enabled reload registers.

One or more RR registers can be individually enabled through the RREN register.

40.2 Temporarily pausing the watchdog

By default, the watchdog will be active counting down the down-counter while the CPU is sleeping and when it is halted by the debugger. It is however possible to configure the watchdog to automatically pause while the CPU is sleeping as well as when it is halted by the debugger.

40.3 Watchdog reset

A TIMEOUT event will automatically lead to a watchdog reset.

See Reset on page 85 for more information about reset sources. If the watchdog is configured to generate an interrupt on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending watchdog reset will always be effectuated.

The watchdog must be configured before it is started. After it is started, the watchdog’s configuration registers, which comprise registers CRV, RREN, and CONFIG, will be blocked for further configuration.

The watchdog can be reset from several reset sources, see Reset behavior on page 86.

When the device starts running again, after a reset, or waking up from OFF mode, the watchdog configuration registers will be available for configuration again.

40.4 Registers

Table 98: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40010000WDTWDTWatchdog timer

Table 99: Register Overview

RegisterOffsetDescription
TASKS_START0x000Start the watchdog
EVENTS_TIMEOUT0x100Watchdog timeout
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
RUNSTATUS0x400Run status
REQSTATUS0x404Request status
CRV0x504Counter reload value
RREN0x508Enable register for reload request registers
CONFIG0x50CConfiguration register
RR[0]0x600Reload request 0
RR[1]0x604Reload request 1
RR[2]0x608Reload request 2
RR[3]0x60CReload request 3
RR[4]0x610Reload request 4
RR[5]0x614Reload request 5
RR[6]0x618Reload request 6
RR[7]0x61CReload request 7

40.4.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTIMEOUTWrite &#x27;1&#x27; to Enable interrupt for TIMEOUT event
See EVENTS_TIMEOUT
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

40.4.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTIMEOUTWrite &#x27;1&#x27; to Disable interrupt for TIMEOUT event
See EVENTS_TIMEOUT
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

clock

40.4.3 RUNSTATUS

Address offset: 0x400

Run status

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRUNSTATUS
NotRunning0
Running1

40.4.4 REQSTATUS

Address offset: 0x404

Request status

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000100000000000000000000000000000001
IdRWFieldValue IdValue
ARRR0
DisabledOrRequested0
EnabledAndUnrequested1
BRRR1
DisabledOrRequested0
EnabledAndUnrequested1
CRRR2
DisabledOrRequested0
EnabledAndUnrequested1Request status for RR[0] register
DRRR3
DisabledOrRequested0
EnabledAndUnrequested1
ERRR4
DisabledOrRequested0
EnabledAndUnrequested1
FRRR5
DisabledOrRequested0
EnabledAndUnrequested1
GRRR6
DisabledOrRequested0
EnabledAndUnrequested1
HRRR7
DisabledOrRequested0
EnabledAndUnrequested1

40.4.5 CRV

Address offset: 0x504

Counter reload value

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWCRV[0x0000000F..0xFFFFFFF Counter reload value in number of cycles of the 32.768 kHz

40.4.6 RREN

Address offset: 0x508

Enable register for reload request registers

Bit number313029282726252423222120191817161514131211109876543210
IdHGFEDCBA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValue
ARWRR0
Disabled0
Enabled1
BRWRR1
Disabled0
Enabled1
CRWRR2
Disabled0
Enabled1
DRWRR3
Disabled0
Enabled1
ERWRR4
Disabled0
Enabled1
FRWRR5
Disabled0
Enabled1
GRWRR6
Disabled0
Enabled1Enable RR[6] register
HRWRR7
Disabled0
Enabled1

40.4.7 CONFIG

Address offset: 0x50C

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IdCA
Reset 0x0000000100000000000000000000000000000001
IdRWFieldValue IdValue
ARWSLEEP
Pause0
Run1
CRWHALT
Pause0
Run1Pause watchdog while the CPU is halted by the debugger

40.4.8 RR[0]

Address offset: 0x600

Reload request 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.9 RR[1]

Address offset: 0x604

Reload request 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.10 RR[2]

Address offset: 0x608

Reload request 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.11 RR[3]

Address offset: 0x60C

Reload request 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.12 RR[4]

Address offset: 0x610

Reload request 4

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.13 RR[5]

Address offset: 0x614

Reload request 5

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.14 RR[6]

Address offset: 0x618

Reload request 6

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.4.15 RR[7]

Address offset: 0x61C

Reload request 7

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

40.5 Electrical specification

40.5.1 Watchdog Timer Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{WDT}$ Run current for watchdog timer0.32μA
$t_{WDT}$ Time out interval458 μs36 h

41 SWI — Software interrupts

A set of interrupts have been reserved for use as software interrupts.

41.1 Registers

Table 100: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40014000SWISWI0Software interrupt 0
0x40015000SWISWI1Software interrupt 1
0x40016000SWISWI2Software interrupt 2
0x40017000SWISWI3Software interrupt 3
0x40018000SWISWI4Software interrupt 4
0x40019000SWISWI5Software interrupt 5

42 NFCT — Near field communication tag

The NFCT peripheral (referred to as the 'NFC peripheral' from now on) supports communication signal interface type A and 106 kbps bit rate from the NFC Forum.

With appropriate software, the NFC peripheral can be used to emulate the listening device NFC-A as specified by the NFC Forum.

Listed here are the main features for the NFC peripheral:

• NFC-A listen mode operation

• 13.56 MHz input frequency

• Bit rate 106 kbps

• Wake-on-field low power field detection (SENSE) mode

• Frame assemble and disassemble for the NFC-A frames specified by the NFC Forum

• Programmable frame timing controller

• Integrated automatic collision resolution, CRC and parity functions

42.1 Overview

The NFC peripheral is an implementation of an NFC Forum compliant listening device NFC-A.


Figure 119: NFC block diagram

The NFC peripheral contains a 13.56 MHz AM receiver and a 13.56 MHz load modulator compatible with the NFC-A technology defined in the NFC Forum with 106 kbps data rate.

The received frames will be automatically disassembled and the data part of the frame transferred to RAM. When transmitting, the frame data will be transferred directly from RAM and transmitted with configurable frame type and delay timing. The system will be notified by an event whenever a complete frame is received or sent.

It also supports the collision detection and resolution ("anticollision") as defined by the NFC Forum.

Wake-on-field is supported in SENSE mode while the device is either in System OFF or System ON mode. When the antenna enters an NFC field, an event will be triggered notifying the system to activate the NFC functionality for incoming frames. In System ON, if the energy detected at the antenna increases beyond a threshold value, the module will generate a FIELDDETECTED event. The module will generate a FIELDLOST event when the quality or strength of the field no longer support NFC communication. Please refer to NFCT Electrical Specification on page 439 for the Low Power Field Detect threshold values.

In system OFF, the NFC Low Power Field Detect function can wake the system up through a reset. The NFC bit in register RESETREAS on page 88 will be set as cause of the wake-up.

If the system is put into system OFF mode while a field is already present, the NFC Low Power Field Detect function will wake the system up right away and generate a reset.

Note that as a consequence of reset, NFC is disabled, so the reset handler will have to activate NFC again and set it up properly

The HFXO must be running before the NFC peripheral goes into ACTIVATED state. Note that the NFC peripheral calibration is automatically done on ACTIVATE task. The HFXO can be turned off when the NFC peripheral goes into SENSE mode. The shortcut FIELDDETECTED_ACTIVATE can be used when the HFXO is already running while in SENSE mode.

Outgoing data will be collected from RAM with the EasyDMA function and assembled according to the TXD.FRAMECONFIG register. Incoming data will be disassembled according to the RXD.FRAMECONFIG register and the data section in the frame will be written to RAM via the EasyDMA function.

The NFC peripheral includes a frame timing controller that can be used to accurately control the inter-frame delay between the incoming frame and a corresponding outgoing frame. It also includes optional CRC functionality.

The NFC peripheral has a set of different states. The module can change state by triggering a task, or when specific operations are finalized. Events and tasks allow software to keep track of and change the current state.

See Figure 119: NFC block diagram on page 420 and Figure 120: NFC state diagram on page 422 for more information.

Notes:

• FIELDLOST event will not be reflected in the state machine (for instance by going back to the DISABLE state), it is up to software to decide on the actions to take when a field lost occurs.

• FIELDLOST event is not generated in SENSE mode.

• FIELDDETECTED event is generated only on the transition from FIELDLOST event to energy detected by the NFC peripheral. So, sending SENSE task while field is still present does not generate FIELDDETECTED event.

• If the FIELDDETECTED event is cleared before sending the ACTIVATE task, then the FIELDDETECTED event shows up again after sending the ACTIVATE task. The shortcut FIELDDETECTED_ACTIVATE can be used to avoid this condition.


Figure 120: NFC state diagram

42.2 Pin configuration

NFC uses two pins to connect the antenna.

These pins are shared with GPIOs, and the PROTECT field in the NFCPINS register in UICR defines the usage of these pins and their protection level against excessive voltages. The content of the NFCPINS register is reloaded at every reset.

When NFCPINS.PROTECT=NFC, a protection circuit will be enabled on the dedicated pins, preventing the chip from being damaged in the presence of a strong NFC field. The GPIO function will be disabled on those pins as well.

When NFCPINS.PROTECT=Disabled, the device will not be protected against strong NFC field damages caught by a connected NFC antenna, and the NFCT peripheral will not operate as expected, as it will never leave the DISABLE state.

The pins dedicated to the NFC antenna function will have some limitation when the pins are configured for normal GPIO operation. The pin capacitance will be higher on those (refer to $C _ { P A D _ N F C }$ in the GPIO Electrical Specification on page 157 below), and some increased leakage current between the two pins is to be expected if they are used in GPIO mode, and are driven to different logical values. To save power the two pins should always be set to the same logical value whenever entering one of the device power saving modes. Please refer to I in GPIO Electrical Specification on page 157 for details.

42.3 EasyDMA

The NFC peripheral implements EasyDMA for reading and writing of data packets from and to the Data RAM without CPU involvement.

The NFC EasyDMA utilizes one pointer called PACKETPTR for receiving and transmitting packets.

The EasyDMA can either read or write between the NFC peripheral and the RAM, but not at the same time. The event RXFRAMESTART indicates that the EasyDMA has started writing to the RAM for a receive frame and the event RXFRAMEND indicates that the EasyDMA has completed writing to the RAM. Similarly, the event TXFRAMESTART indicates that the EasyDMA has started reading from the RAM for a transmit frame and the event TXFRAMEND indicates that the EasyDMA has completed reading from the RAM. If a transmit and a receive operation is issued at the same time, the transmit operation would be prioritized.

Starting a transmit operation while the EasyDMA has already started writing a receive frame to the RAM will result in unpredictable behavior. Starting an EasyDMA operation whilst there is an ongoing EasyDMA operation may result in unpredictable behavior. It is recommended to wait for the TXFRAMEEND or

RXFRAMEND event for the respective ongoing transmit or receive before starting a new receive or transmit operation.

The MAXLEN register determines the maximum number of bytes that can be read from or written to the RAM. This feature can be used to secure that the NFC peripheral does not overwrite, or read beyond, the RAM assigned to a packet. Note that if the RXD.AMOUNT or TXD.AMOUNT register indicates longer data packets than set in MAXLEN, the frames sent to or received from the physical layer will be incomplete. In RX, the OVERRUN bit in the FRAMESTATUS.RX register will be set and an RXERROR event will be triggered in that situation.

Note that RXD.AMOUNT and TXD.AMOUNT define a frame length in bytes and bits excluding SoF, EoF and parity, but including CRC for RXD.AMOUNT only, make sure to take potential additional bits into account when setting MAXLEN.

Only sending task ENABLERXDATA ensures that a new value in PACKETPTR pointing to the RX buffer in Data RAM is taken into account.

If PACKETPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Chapter Memory on page 24 for more information about the different memory regions.

The NFC peripherals normally do alternative receive and transmit frames. So, to prepare for the next frame, the PACKETPTR, MAXLEN, TXD.FRAMECONFIG and TXD.AMOUNT can be updated while the receive is in progress, and, similarly, the PACKETPTR, MAXLEN and RXD.FRAMECONFIG can be updated while the transmit is in progress. They can be updated and prepared for the next NFC frame immediately after the STARTED event of the current frame has been received. Updating the TXD.FRAMECONFIG and TXD.AMOUNT during the current transmit frame or updating RXD.FRAMECONFIG during current receive frame may cause unpredictable behaviour.

In accordance with NFC Forum, NFC Digital Protocol Technical Specification, the least a significant bit from the least significant byte is sent on air first. The bytes are stored in increasing order, starting at the lowest address in the EasyDMA buffer in RAM.

42.4 Collision resolution

The NFC peripheral implements an automatic collision resolution function as defined by the NFC Forum.

The SENSRES and SELRES registers need to be programmed upfront in order for the collision resolution to behave correctly. Depending on the NFCIDSIZE field in SENSRES, the following registers also need to be programmed upfront:

• NFCID1_LAST if NFCID1SIZE=NFCID1Single (ID = 4 bytes);

• NFCID1_2ND_LAST and NFCID1_LAST if NFCID1SIZE=NFCID1Double (ID = 7 bytes);

• NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST if NFCID1SIZE=NFCID1Triple (ID = 10 bytes);

Table 101: NFCID1 byte allocation (top sent first on air) on page 423 explains the position of the ID bytes in NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST, depending on the ID size, and as compared to the definition used in the NFC Forum, NFC Digital Protocol Technical Specification.

Table 101: NFCID1 byte allocation (top sent first on air)

ID = 4 bytesID = 7 bytesID = 10 bytes
NFCID1_Q $nfcid_{1_0}$
NFCID1_R $nfcid_{1_1}$
NFCID1_S $nfcid_{1_2}$
NFCID1_T $nfcid_{1_0}$ $nfcid_{1_3}$
NFCID1_U $nfcid_{1_1}$ $nfcid_{1_4}$
NFCID1_V $nfcid_{1_2}$ $nfcid_{1_5}$
NFCID1_W $nfcid_{1_0}$ $nfcid_{1_3}$ $nfcid_{1_6}$
NFCID1_X $nfcid_{1_1}$ $nfcid_{1_4}$ $nfcid_{1_7}$
NFCID1_Y $nfcid_{1_2}$ $nfcid_{1_5}$ $nfcid_{1_8}$
NFCID1_Z $nfcid_{1_3}$ $nfcid_{1_6}$ $nfcid_{1_9}$

Automatic collision resolution is enabled by default.

The hardware implementation can handle the states from IDLE to ACTIVE_A automatically as defined in the NFC Forum, NFC Activity Technical Specification, and the other states are to be handled by software. The software keeps track of the state through events. The collision resolution will trigger an AUTOCOLRESSTARTED event when it has started. Reaching the ACTIVE_A state is indicated by the SELECTED event.

If collision resolution fails, a COLLISION event is triggered. Note that errors occurring during automatic collision resolution may also cause ERROR and/or RXERROR events to be generated. Also, other events may get generated. It is recommended that the software ignores any event except COLLISION, SELECTED and FIELDLOST during automatic collision resolution. Software shall also make sure that any unwanted SHORT or PPI shortcut are disabled during automatic collision resolution.

A pre-defined set of registers, NFC.TAGHEADER0..3, containing a valid NFCID1 value, is available in FICR, and can be used by software to populate the NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST registers. Refer to the release notes of the NFC stack for more details on the format.

The automatic collision resolution will be restarted, if the packets are received with CRC or parity errors while in ACTIVE_A state.

The SLP_REQ is automatically handled by the NFC peripheral. However, this results in an ERROR event (with FRAMEDELAYTIMEOUT cause in ERRORSTATUS) since the SLP_REQ has no response. This error must be ignored until the SELECTED event is triggered and this error should be cleared by the software when the SELECTED event is triggered.

42.5 Frame timing controller

The NFC peripheral includes a frame timing controller that continuously keeps track of the number of the 13.56 MHz RF-carrier clock periods since the end of the EoF of the last received frame.

The NFC peripheral can be programmed to send a responding frame within a time window or at an exact count of RF carrier periods. In case of FRAMEDELAYMODE = Window a STARTTX task triggered before the frame timing controller counter is equal to FRAMEDELAYMIN will force the transmission to halt until the counter is equal to FRAMEDELAYMIN. If the counter is within FRAMEDELAYMIN and FRAMEDELAYMAX when the STARTTX task is triggered, the peripheral will start the transmission straight away. In case of FRAMEDELAYMODE = ExactVal, a STARTTX task, triggered before the frame delay counter is equal to FRAMEDELAYMAX, will halt the actual transmission start until the counter is equal to FRAMEDELAYMAX.

In case of FRAMEDELAYMODE = WindowGrid, the behaviour is similar to the FRAMEDELAYMODE = Window, but the actual transmission between FRAMEDELAYMIN and FRAMEDELAYMAX starts on a bit grid as defined for NFC-A Listen frames (slot duration of 128 RF carrier periods).

The FRAMEDELAYMIN and FRAMEDELAYMAX values shall only be updated before the STARTTX task is triggered. Failing to do so may cause unpredictable behaviour. An ERROR event (with FRAMEDELAYTIMEOUT cause in ERRORSTATUS) will be asserted if the frame timing controller counter reaches FRAMEDELAYMAX without any STARTTX task triggered. This may happen even when the response is not required as per NFC Forum, NFC Digital Protocol Technical Specification. Any commands handled by the automatic collision resolution that don't involve a response being generated may also result in an ERROR event (with FRAMEDELAYTIMEOUT cause in ERRORSTATUS).

The frame timing controller operation is illustrated in Figure 121: Frame timing controller (FRAMEDELAYMODE=Window) on page 425. The frame timing controller automatically adjusts the frame timing counter based on the last received data bit according to NFC-A technology in the NFC Forum, NFC Digital Protocol Technical Specification.


Figure 121: Frame timing controller (FRAMEDELAYMODE=Window)

42.6 Frame assembler

The NFC peripheral implements a frame assembler in hardware.

When the NFC peripheral is in the ACTIVE_A state, the software can decide to enter RX or TX mode. For RX, see Frame disassembler on page 426. For TX, the software must indicate the address of the source buffer in Data RAM and its size through programming the PACKETPTR and MAXCNT registers respectively, then issuing a TXSTART task.

MAXCNT must be set so that it matches the size of the frame to be sent.

The STARTED event indicates that the PACKETPTR and MAXCNT registers have been captured by the frame assembler's EasyDMA.

When asserting the STARTTX task, the frame assembler module will start reading TXD.AMOUNT.TXDATABYTES bytes (plus one additional byte if TXD.AMOUNT.TXDATABITS > 0) from the RAM position set by the PACKETPTR.

The NFC peripheral transmits the data as read from RAM, adding framing and the CRC calculated on the fly. The NFC peripheral will take (8*TXD.AMOUNT.TXDATABYTES + TXD.AMOUNT.TXDATABITS) bits and assemble a frame according to settings in TXD.FRAMECONFIG. Both short frames, standard frames and bit oriented SDD frames as specified in the NFC Forum, NFC Digital Protocol Technical Specification can be assembled by correct setting of the TXD.FRAMECONFIG register.

The bytes will be transmitted on air in the same order as they are read from RAM with a rising bit order within each byte (least significant bit first). That is, b0 will be transmitted on air before b1, and so on. The bits read from RAM will be coded into symbols as defined in the NFC Forum, NFC Digital Protocol Technical Specification.

Important: Some NFC Forum documents, such as NFC Forum, NFC Digital Protocol Technical Specification, define bit numbering in a byte from b1 (LSB) to b8 (MSB), while most other technical documents from the NFC Forum, and also the Nordic Semiconductor documentation, traditionally numbers them from b0 to b7. The present document uses the b0 to b7 numbering scheme. Be aware of this when comparing with the NFC Forum, NFC Digital Protocol Technical Specification to others.

The frame assembler can be configured in TXD.FRAMECONFIG to add Start of Frame (SoF) symbol, calculate and add parity bits, and calculate and add CRC to the data read from RAM when assembling the frame. The total frame will then be longer than what is defined by TXD.AMOUNT.TXDATABYTES and TXDATABITS. DISCARDMODE will select if the first bits in the first byte read from RAM or the last bits in the last byte read from RAM will be discarded if TXD.AMOUNT.TXDATABITS are not equal to zero. Note that if TXD.FRAMECONFIG.PARITY = Parity and TXD.FRAMECONFIG.DISCARDMODE=DiscardStart, a parity bit will be included after the non-complete first byte. No parity will be added after a non-complete last byte.

The Frame Assemble operation is illustrated in Figure 122: Frame assemble on page 426 for different settings in TXD.FRAMECONFIG. All shaded bits fields are added by the frame assembler. Some of these bits are optional and appearances are configured in TXD.FRAMECONFIG. Please note that the frames illustrated do not necessarily comply with the NFC specification. The figure is only to illustrate the behavior of the NFC peripheral.


Figure 122: Frame assemble
The accurate timing for transmitting the frame on air is set using the frame timing controller settings.

42.7 Frame disassembler

The NFC peripheral implements a frame disassembler in hardware.

When the NFC peripheral is in the ACTIVE_A state, the software can decide to enter RX or TX mode. For TX, see Frame assembler on page 425. For RX, the software must indicate the address of the destination buffer in Data RAM and its size through programming the PACKETPTR and MAXCNT registers respectively, then issuing a ENABLERXDATA task.

The STARTED event indicates that the PACKETPTR and MAXCNT registers have been captured by the frame disassembler's EasyDMA.

When an incoming frame starts, the RXFRAMESTART event will get issued and data will be written to the buffer in Data RAM. The frame disassembler will verify and remove on the fly any parity bits and SoF and End of Frame (EoF) symbols based on RXD.FRAMECONFIG register configuration. It will, however, verify and transfer the CRC bytes into RAM, if the CRC is was enabled through RXD.FRAMECONFIG.

When an EoF symbol is detected, the NFC peripheral will assert the RXFRAMEEND event and write the RXD.AMOUNT register to indicate numbers of received bytes and bits in the data packet. The module does not interpret the content of the data received from the remote NFC device, except for SoF, EoF, parity and CRC checking, as described above. The Frame disassemble operation is illustrated in Figure 123: Frame disassemble illustration on page 426.

Per NFC specification, the time between end of frame to the next start of frame can be as short as 86 µs, so care must be taken that PACKETPTR and MAXCNT are ready and ENABLERXDATA is issued on time after the end of previous frame. The use of a PPI shortcut from TXFRAMEEND to ENABLERXDATA is recommended.


Figure 123: Frame disassemble illustration

42.8 Antenna interface

In ACTIVATED state, an amplitude regulator will adjust the voltage swing on the antenna pins to a value that is within the $\mathsf { V } _ { \mathsf { s w i n g } }$ limit.

Refer to NFCT Electrical Specification on page 439.

42.9 NFCT antenna recommendations

The NFCT antenna coil must be connected differential between NFC1 and NFC2 pins of the device. Two external capacitors should be used to tune the resonance of the antenna circuit to 13.56 MHz.


Figure 124: NFCT antenna recommendations

The required tuning capacitor value is given by the below equations:

$$
C _ {\text { tune }} ^ {\prime} = \frac {1}{(2 \pi \cdot 1 3 . 5 6 \mathrm{MHz}) ^ {2} \cdot L _ {\text { ant }}} \quad \text { where } C _ {\text { tune }} ^ {\prime} = \frac {1}{2} \cdot \left(C _ {p} + C _ {\text { int }} + C _ {\text { tune }}\right)
$$

$$
a n d C _ {t u n e 1} = C _ {t u n e 2} = C _ {t u n e} \quad C _ {p 1} = C _ {p 2} = C _ {p} \quad C _ {\text {int1}} = C _ {\text {int2}} = C _ {\text {int}}
$$

$$
C _ {t u n e} = \frac {2}{(2 \pi \cdot 1 3 . 5 6 M H z) ^ {2} \cdot L _ {a n t}} - C _ {p} - C _ {\text { int }}
$$

An antenna inductance of $\mathsf { L } _ { \mathsf { a n t } } = 2$ µH will give tuning capacitors in the range of 130 pF on each pin. For good performance, match the total capacitance on and .

42.10 Battery protection

If the antenna is exposed to a strong NFC field, current may flow in the opposite direction on the supply due to parasitic diodes and ESD structures.

If the battery used does not tolerate return current, a series diode must be placed between the battery and the device in order to protect the battery.

42.11 References

NFC Forum, NFC Analog Specification version 1.0, www.nfc-forum.org

NFC Forum, NFC Digital Protocol Technical Specification version 1.1, www.nfc-forum.org

NFC Forum, NFC Activity Technical Specification version 1.1, www.nfc-forum.org

42.12 Registers

Table 102: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40005000NFCTNFCTNear Field Communication Tag

Table 103: Register Overview

RegisterOffsetDescription
TASKS_ACTIVATE0x000Activate NFC peripheral for incoming and outgoing frames, change state to activated
TASKS_DISABLE0x004Disable NFC peripheral
TASKS_SENSE0x008Enable NFC sense field mode, change state to sense mode
TASKS_STARTTX0x00CStart transmission of a outgoing frame, change state to transmit
TASKS_ENABLERXDATA0x01CInitializes the EasyDMA for receive.
TASKS_GOIDLE0x024Force state machine to IDLE state
TASKS_GOSLEEP0x028Force state machine to SLEEP_A state
EVENTS_READY0x100The NFC peripheral is ready to receive and send frames
EVENTS_FIELDDETECTED0x104Remote NFC field detected
EVENTS_FIELDLOST0x108Remote NFC field lost
EVENTS_TXFRAMESTART0x10CMarks the start of the first symbol of a transmitted frame
EVENTS_TXFRAMEEND0x110Marks the end of the last transmitted on-air symbol of a frame
EVENTS_RXFRAMESTART0x114Marks the end of the first symbol of a received frame
EVENTS_RXFRAMEEND0x118Received data have been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer
EVENTS_ERROR0x11CNFC error reported. The ERRORSTATUS register contains details on the source of the error.
EVENTS_RXERROR0x128NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.
EVENTS_ENDRX0x12CRX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.
EVENTS_ENDTX0x130Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer
EVENTS_AUTOCOLRESST0x138Auto collision resolution process has started
EVENTS_COLLISION0x148NFC Auto collision resolution error reported.
EVENTS_SELECTED0x14CNFC Auto collision resolution successfully completed
EVENTS_STARTED0x150EasyDMA is ready to receive or send frames.
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSTATUS0x404NFC Error Status register
FRAMESTATUS.RX0x40CResult of last incoming frames
CURRENTLOADCTRL0x430Current value driven to the NFC Load Control
FIELDPRESENT0x43CIndicates the presence or not of a valid field
FRAMEDELAYMIN0x504Minimum frame delay
FRAMEDELAYMAX0x508Maximum frame delay
FRAMEDELAYMODE0x50CConfiguration register for the Frame Delay Timer
PACKETPTR0x510Packet pointer for TXD and RXD data storage in Data RAM
MAXLEN0x514Size of allocated for TXD and RXD data storage buffer in Data RAM
TXD.FRAMECONFIG0x518Configuration of outgoing frames
TXD.AMOUNT0x51CSize of outgoing frame
RXD.FRAMECONFIG0x520Configuration of incoming frames
RXD.AMOUNT0x524Size of last incoming frame
NFCID1_LAST0x590Last NFCID1 part (4, 7 or 10 bytes ID)
NFCID1_2ND_LAST0x594Second last NFCID1 part (7 or 10 bytes ID)
NFCID1_3RD_LAST0x598Third last NFCID1 part (10 bytes ID)
SENSRES0x5A0NFC-A SENS_RES auto-response settings
SELRES0x5A4NFC-A SEL_RES auto-response settings

42.12.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWFIELDDETECTED_ACTIVATE
Disabled0
Enabled1
BRWFIELDLOST_SENSE
Disabled0
Enabled1

42.12.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdT
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
Disabled0
Enabled1
BRWFIELDDETECTED
Disabled0
Enabled1
CRWFIELDLOST
Disabled0
Enabled1
DRWTXFRAMESTART
Disabled0
Enabled1
ERWTXFRAMEEND
Disabled0Disable
Enabled1Enable
FRWRXFRAMESTARTEnable or disable interrupt for RXFRAMESTART event

See EVENTS_READY

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
GRWRXFRAMEEND
Disabled0
Enabled1
HRWERROR
Disabled0Disable
Enabled1Enable
KRWRXERROR
Disabled0
Enabled1Disable
LRWENDRX
Disabled0Disable
Enabled1
MRWENDTX
Disabled0
Enabled1Disable
NRWAUTOCOLRESSTARTED
Disabled0Disable
Enabled1Enable
RRWCOLLISION
Disabled0
Enabled1Disable
SRWSELECTED
Disabled0
Enabled1Disable
TRWSTARTED
Disabled0
Enabled1Disable

42.12.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWREADYWrite &#x27;1&#x27; to Enable interrupt for READY event
Bit number313029282726252423222120191817161514131211109876543210
IdT S R N M L K H G F E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
BRWFIELDDETECTED
Set1
Disabled0
Enabled1Write '1' to Enable interrupt for FIELDDETECTED event
CRWFIELDLOST
Set1
Disabled0
Enabled1
DRWTXFRAMESTART
Set1Write '1' to Enable interrupt for TXFRAMESTART event
Disabled0See EVENTS_TXFRAMESTART
Enabled1Write '1' to Enable interrupt for TXFRAMEEND event
ERWTXFRAMEEND
Write '1' to Enable interrupt for RXFRAMESTART event
Set1See EVENTS_RXFRAMESTART
Disabled0Write '1' to Enable interrupt for RXFRAMEEND event
Enabled1See EVENTS_RXFRAMEEND
FRWRXFRAMESTARTWrite '1' to Enable interrupt for RXFRAMEEND event
See EVENTS_RXFRAMEEND
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWRXFRAMEENDWrite '1' to Enable interrupt for RXFRAMEEND event
See EVENTS_RXFRAMEEND
Set1EnableWrite '1' to Enable interrupt for ERROR event
Disabled0Read: DisabledSee EVENTS_ERROR
Enabled1Read: EnabledEnable
HRWERRORWrite '1' to Enable interrupt for ERROR event
See EVENTS_RXERROR
Set1EnableEnable
Disabled0Read: DisabledRead: Enabled
Enabled1Read: EnabledWrite '1' to Enable interrupt for RXERROR event
KRWRXERRORSee EVENTS_ENDRX
Write '1' to Enable interrupt for ENDRX event
Set1EnableSee EVENTS_ENDRX
Disabled0Read: DisabledM RW ENDTX
Enabled1Read: EnabledWrite '1' to Enable interrupt for ENDTX event
LRWENDRXSee EVENTS_ENDTX
Set1EnableWrite '1' to Enable interrupt for ENDTX event
Disabled0Read: DisabledM RW ENDTX
Enabled1Read: EnabledSet1
IdT
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
NRWAUTOCOLRESSTARTED
Set1
Disabled0
Enabled1
RRWCOLLISION
Set1
Disabled0
Enabled1
SRWSELECTED
Set1
Disabled0
Enabled1
TRWSTARTED
Set1
Disabled0
Enabled1

42.12.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdT
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREADY
BRWFIELDDETECTED
Write &#x27;1&#x27; to Disable interrupt for FIELDDETECTED event
See EVENTS_FIELDDETECTED
Disable
Read: Disabled
Read: Enabled
CRWFIELDLOSTWrite &#x27;1&#x27; to Disable interrupt for FIELDLOST event
See EVENTS_FIELDLOST
Disable
Read: Disabled
Read: Enabled
DRWTXFRAMESTARTWrite &#x27;1&#x27; to Disable interrupt for TXFRAMESTART event
See EVENTS_TXFRAMESTART
Disable
Read: Disabled
Read: Enabled
Bit number313029282726252423222120191817161514131211109876543210
IdT S R N M L K H G F E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ERWTXFRAMEEND
Clear1
Disabled0
Enabled1
FRWRXFRAMESTART
Clear1
Disabled0
Enabled1
GRWRXFRAMEEND
Clear1
Disabled0
Enabled1
HRWERROR
Clear1
Disabled0
Enabled1
KRWRXERROR
Clear1
Disabled0
Enabled1
LRWENDRX
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
MRWENDTXWrite '1' to Disable interrupt for ENDTX event
See EVENTS_ENDTX
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: EnabledNRWAUTOCOLRESSTARTED
NRWAUTOCOLRESSTARTEDWrite '1' to Disable interrupt for AUTOCOLRESSTARTED event
See EVENTS_COLLISION
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: EnabledRRWCOLLISION
SRWSELECTEDWrite '1' to Disable interrupt for SELECTED event
See EVENTS_SELECTED
Clear1Disable
Disabled0Read: Disabled
Enabled1TRWSTARTEDWrite '1' to Disable interrupt for STARTED event
IdTSRNMLKHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_STARTED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

42.12.5 ERRORSTATUS

Address offset: 0x404

NFC Error Status register

Write a bit to '1' to clear it. Writing '0' has no effect.

Bit number313029282726252423222120191817161514131211109876543210
IdDCA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWFRAMEDELAYTIMEOUT
CRWNFCFIELDTOOSTRONG
DRWNFCFIELDTOOWEAK

42.12.6 FRAMESTATUS.RX

Address offset: 0x40C

Result of last incoming frames

Write a bit to '1' to clear it. Writing '0' has no effect.

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCRCERROR
CRCCorrect0
CRCError1
BRWPARITYSTATUS
ParityOK0
ParityError1
CRWOVERRUN
NoOverrun0
Overrun1

42.12.7 CURRENTLOADCTRL

Address offset: 0x430

Current value driven to the NFC Load Control

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARCURRENTLOADCTRL

42.12.8 FIELDPRESENT

Address offset: 0x43C

A RW FRAMEDELAYMIN

Indicates the presence or not of a valid field

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARFIELDPRESENTIndicates the presence or not of a valid field. Available only inthe activated state.
NoField0No valid field detected
FieldPresent1Valid field detected
BRLOCKDETECTIndicates if the low level has locked to the field
NotLocked0Not locked to field
Locked1Locked to field

42.12.9 FRAMEDELAYMIN

Address offset: 0x504

Minimum frame delay

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAA
Reset 0x0000048000000000000000000000001001000000
IdRWFieldValue IdValue

Minimum frame delay in number of 13.56 MHz clocks

42.12.10 FRAMEDELAYMAX

Address offset: 0x508

Maximum frame delay

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAA
Reset 0x0000100000000000000000000000100000000000
IdRWFieldValue IdValue

A RW FRAMEDELAYMAX
Maximum frame delay in number of 13.56 MHz clocks

42.12.11 FRAMEDELAYMODE

Address offset: 0x50C

Configuration register for the Frame Delay Timer

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValue
ARWFRAMEDELAYMODE
FreeRun0
Window1
ExactVal2
WindowGrid3

42.12.12 PACKETPTR

Address offset: 0x510

Packet pointer for TXD and RXD data storage in Data RAM

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRPacket pointer for TXD and RXD data storage in Data RAM. This

42.12.13 MAXLEN

Address offset: 0x514

Size of allocated for TXD and RXD data storage buffer in Data RAM

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXLEN[0..257]Size of allocated for TXD and RXD data storage buffer in Data

42.12.14 TXD.FRAMECONFIG

Address offset: 0x518

Configuration of outgoing frames

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000017000000000000000000000000000010111
IdRWFieldValue IdValue
ARWPARITY
NoParity0
Parity1
BRWDISCARDMODE
DiscardEnd0
DiscardStart1
CRWSOF
NoSoF0
SoF1
DRWCRCMODETX
NoCRCTX0
CRC16TX1

42.12.15 TXD.AMOUNT

Address offset: 0x51C

Size of outgoing frame

Bit number313029282726252423222120191817161514131211109876543210
IdBBBBBBBBAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTXDATABITS[0..7]
BRWTXDATABYTES[0..257]

42.12.16 RXD.FRAMECONFIG

Address offset: 0x520

Configuration of incoming frames

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000015000000000000000000000000000010101
IdRWFieldValue IdValue
ARWPARITY
NoParity0
Parity1
BRWSOF
NoSoF0
SoF1
CRWCRCMODERX
NoCRCRX0
CRC16RX1

42.12.17 RXD.AMOUNT

Address offset: 0x524

Size of last incoming frame

Bit number313029282726252423222120191817161514131211109876543210
IdBBBBBBBBAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARRXDATABITS
BRRXDATABYTES

42.12.18 NFCID1_LAST

Address offset: 0x590

Last NFCID1 part (4, 7 or 10 bytes ID)

Bit number313029282726252423222120191817161514131211109876543210
IdDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA
Reset 0x0000636300000000000000000110001101100011
IdRWFieldValue IdValueDescription
ARWNFCID1_ZNFCID1 byte Z (very last byte sent)
BRWNFCID1_YNFCID1 byte Y
CRWNFCID1_XNFCID1 byte X
DRWNFCID1_WNFCID1 byte W

42.12.19 NFCID1_2ND_LAST

Address offset: 0x594

Second last NFCID1 part (7 or 10 bytes ID)

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWNFCID1_VNFCID1 byte V
BRWNFCID1_UNFCID1 byte U
CRWNFCID1_TNFCID1 byte T

42.12.20 NFCID1_3RD_LAST

Address offset: 0x598

Third last NFCID1 part (10 bytes ID)

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWNFCID1_SNFCID1 byte S
BRWNFCID1_RNFCID1 byte R
CRWNFCID1_QNFCID1 byte Q

42.12.21 SENSRES

Address offset: 0x5A0

NFC-A SENS_RES auto-response settings

Bit number313029282726252423222120191817161514131211109876543210
IdEEEEDDDDCCBAAAA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValue
ARWBITFRAMESDD
Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification
SDD00000
SDD00001
SDD00010
SDD00100
SDD01000
SDD10000
BRWRFU5
CRWNFCIDSIZE
NFCID1Single
NFCID1Double
NFCID1Triple
DRWPLATFCONFIG
ERWRFU74

42.12.22 SELRES

Address offset: 0x5A4

NFC-A SEL_RES auto-response settings

Bit number313029282726252423222120191817161514131211109876543210
IdEDDCCBAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWRFU10
BRWCASCADE
Complete0
NotComplete1
CRWRFU43
DRWPROTOCOL
ERWRFU7

42.13 Electrical specification

42.13.1 NFCT Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$f_c$ Frequency of operation13.56MHz
$C_{MI}$ Carrier modulation index95%
DRData Rate106kbps
$f_s$ Modulation sub-carrier frequency $f_c/16$ MHz
$V_{swing}$ Peak differential Input voltage swing on NFC1 and NFC2VDDVp
$V_{sense}$ Peak differential Field detect threshold level on $NFC1-NFC2^{35}$ 1.0Vp
$I_{sense}$ Current in SENSE STATE100nA
$I_{activated}$ Current in ACTIVATED STATE480μA
$R_{in\_min}$ Minimum input resistance when regulating voltage swing40Ω
$R_{in\_max}$ Maximum input resistance when regulating voltage swing1.0kΩ
$R_{in\_loadmod}$ Input resistance when load modulating822Ω
$I_{max}$ Maximum input current on NFC pins80mA

42.13.2 NFCT Timing Parameters

SymbolDescriptionMin.Typ.Max.Units
$t_{activate}$ Time from task_ACTIVATE in SENSE or DISABLE state to ACTIVATE_A or IDLE state $^{36}$ 500us
$t_{sense}$ Time from remote field is present in SENSE mode to FIELDDETECTED event is asserted20us


Figure 125: NFCT timing parameters (Shortcuts for FIELDDETECTED and FIELDLOST are disabled)

43 PDM — Pulse density modulation interface

The pulse density modulation (PDM) module enables input of pulse density modulated signals from external audio frontends, for example, digital microphones. The PDM module generates the PDM clock and supports single-channel or dual-channel (Left and Right) data input. Data is transferred directly to RAM buffers using EasyDMA.

Listed here are the main features for PDM:

• Up to two PDM microphones configured as a Left/Right pair using the same data input

• 16 kHz output sample rate, 16-bit samples

• EasyDMA support for sample buffering

• HW decimation filters

The PDM module illustrated in Figure 126: PDM module on page 440 is interfacing up to two digital microphones with the PDM interface. It implements EasyDMA, which relieves real-time requirements associated with controlling the PDM slave from a low priority CPU execution context. It also includes all the necessary digital filter elements to produce PCM samples. The PDM module allows continuous audio streaming.


Figure 126: PDM module

43.1 Master clock generator

The FREQ field in the master clock's PDMCLKCTRL register allows adjusting the PDM clock's frequency.

The master clock generator does not add any jitter to the HFCLK source chosen. It is recommended (but not mandatory) to use the Xtal as HFCLK source.

43.2 Module operation

By default, bits from the left PDM microphone are sampled on PDM_CLK falling edge, bits for the right are sampled on the rising edge of PDM_CLK, resulting in two bitstreams. Each bitstream is fed into a digital 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.

43.3 Decimation filter

In order to convert the incoming data stream into PCM audio samples, a decimation filter is included in the PDM interface module.

The input of the filter is the two-channel PDM serial stream (with left channel on clock high, right channel on clock low), its output is 2 × 16-bit PCM samples at a sample rate 64 times lower than the PDM clock rate.

The filter stage of each channel is followed by a digital volume control, to attenuate or amplify the output samples in a range of -20 dB to +20 dB around the default (reset) setting, defined by GPDM,default. The gain is controlled by the GAINL and GAINR registers.

As an example, if the goal is to achieve 2500 RMS output samples (16 bit) with a 1 kHz 90 dBA signal into a -26 dBFS sensitivity PDM microphone, the user will have to sum the PDM module's default gain ( GPDM,default ) and the gain introduced by the microphone and acoustic path of his implementation (an attenuation would translate into a negative gain), and adjust GAINL and GAINR by this amount. Assuming that only the PDM module influences the gain, GAINL and GAINR must be set to -GPDM,default dB to achieve the requirement.

With $\mathsf { G } _ { \mathsf { P D M , d e f a u l t } } = 3 . 2$ dB, and as GAINL and GAINR are expressed in 0.5 dB steps, the closest value to program would be 3.0 dB, which can be calculated as:

GAINL = GAINR = (DefaultGain - (2 * 3))

Remember to check that the resulting values programmed into GAINL and GAINR fall within MinGain and MaxGain.

43.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 SAMPLE.PTR register. If the destination address set in SAMPLE.PTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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.

Table 104: DMA sample storage

MODE.OPERATIONBits per sampleResult stored per RAM wordPhysical RAM allocated (32 bit words)Result boundary indexes in RAMNote
Stereo32 (2x16)L+Rceil(SAMPLE.MAXCNT/2)R0=[31:16]; L0=[15:0]Default
Mono162xLceil(SAMPLE.MAXCNT/2)L1=[31:16]; L0=[15:0]

The destination buffer in RAM consists of one block, the size of which is set in SAMPLE.MAXCNT register. Format is number of 16-bit samples. The physical RAM allocated is always:

(RAM allocation, in bytes) = SAMPLE.MAXCNT * 2;

(but the mapping of the samples depends on MODE.OPERATION.

If OPERATION=Stereo, RAM will contain a succession of Left and Right samples.

If OPERATION=Mono, RAM will contain a succession of mono samples.

For a given value of SAMPLE.MAXCNT, the buffer in RAM can contain half the stereo sampling time as compared to the mono sampling time.

The PDM acquisition can be started by the START task, after the SAMPLE.PTR and SAMPLE.MAXCNT registers have been written. When starting the module, it will take some time for the filters to start outputting valid data. Transients from the PDM microphone itself may also occur. The first few samples (typically around 50) might hence contain invalid values or transients. It is therefore advised to discard the first few samples after a PDM start.

As soon as the STARTED event is received, the firmware can write the next SAMPLE.PTR value (this register is double-buffered), to ensure continuous operation.

When the buffer in RAM is filled with samples, an END event is triggered. The firmware can start processing the data in the buffer. Meanwhile, the PDM module starts acquiring data into the new buffer pointed to by SAMPLE.PTR, and sends a new STARTED event, so that the firmware can update SAMPLE.PTR to the next buffer address.

43.5 Hardware example

Connect the microphone clock to CLK, and data to DIN.


Figure 127: Example of a single PDM microphone, wired as left


Figure 128: Example of a single PDM microphone, wired as right

Note that in a single-microphone (mono) configuration, depending on the microphone’s implementation, either the left or the right channel (sampled at falling or rising CLK edge respectively) will contain reliable data. If two microphones are used, one of them has to be set as left, the other as right (L/R pin tied high or 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.


Figure 129: Example of two PDM microphones

43.6 Pin configuration

The CLK and DIN signals associated to the PDM module are mapped to physical pins according to the configuration specified in the PSEL.CLK and PSEL.DIN registers respectively. If the CONNECT field in any PSEL register is set to Disconnected, the associated PDM module signal will not be connected to the required physical pins, and will not operate properly.

The PSEL.CLK and PSEL.DIN registers and their configurations are only used as long as the PDM module is enabled, and retained only as long as the device is in System ON mode. See POWER — Power supply on page 81 for more information about power modes. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register.

To ensure correct behaviour in the PDM module, the pins used by the PDM module must be configured in the GPIO peripheral as described in Table 105: GPIO configuration before enabling peripheral on page 443 before enabling the PDM module. This is to ensure that the pins used by the PDM module are driven correctly if the PDM module itself is temporarily disabled or the device temporarily enters System OFF. This configuration must be retained in the GPIO for the selected I/Os as long as the PDM module is supposed to be connected to an external PDM circuit.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behaviour.

Table 105: GPIO configuration before enabling periphera

PDM signalPDM pinDirectionOutput valueComment
CLKAs specified in PSEL.CLKOutput0
DINAs specified in PSEL.DINInputNot applicable

43.7 Registers

Table 106: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4001D000PDMPDMPulse Density Modulation (Digital Microphone Interface)

Table 107: Register Overview

RegisterOffsetDescription
TASKS_START0x000Starts continuous PDM transfer
TASKS_STOP0x004Stops PDM transfer
EVENTS_STARTED0x100PDM transfer has started
EVENTS_STOPPED0x104PDM transfer has finished
EVENTS_END0x108The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500PDM module enable register
PDMCLKCTRL0x504PDM clock generator control
MODE0x508Defines the routing of the connected PDM microphones&#x27; signals
GAINL0x518Left output gain adjustment
GAINR0x51CRight output gain adjustment
PSEL.CLK0x540Pin number configuration for PDM CLK signal
PSEL.DIN0x544Pin number configuration for PDM DIN signal
SAMPLE.PTR0x560RAM address pointer to write samples to with EasyDMA
SAMPLE.MAXCNT0x564Number of samples to allocate memory for in EasyDMA mode

43.7.1 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTED
Enable or disable interrupt for STARTED event
EEVENTS_STARTED
Disabled0Disable
Enabled1Enable
BRWSTOPPEDEnable or disable interrupt for STOPPED event
See EVENTS_STOPPED
Disabled0Disable
Enabled1Enable
CRWENDEnable or disable interrupt for END event
See EVENTS_END
Disabled0Disable
Enabled1Enable

43.7.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTED
Set1
Disabled0
Enabled1
BRWSTOPPED
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWENDWrite &#x27;1&#x27; to Enable interrupt for END event
See EVENTS_END
Set1Enable
Disabled0Read: Disabled
Enabled11Read: Enabled

43.7.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTED
BRWSTOPPED
Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Clear1
Disabled0
Enabled1
CRWEND
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

43.7.4 ENABLE

Address offset: 0x500

PDM module enable register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled1

43.7.5 PDMCLKCTRL

Address offset: 0x504

PDM clock generator control

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0840000000001000010000000000000000000000
IdRWFieldValue IdValueDescription
ARWFREQPDM_CLK frequency
1000K0x08000000PDM_CLK = 32 MHz / 32 = 1.000 MHz
Default0x08400000PDM_CLK = 32 MHz / 31 = 1.032 MHz
1067K0x08800000PDM_CLK = 32 MHz / 30 = 1.067 MHz

43.7.6 MODE

Address offset: 0x508

Defines the routing of the connected PDM microphones' signals

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOPERATION
Stereo0
Mono1
BRWEDGE
LeftFalling0
LeftRising1

43.7.7 GAINL

Address offset: 0x518

Left output gain adjustment

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000028000000000000000000000000000101000
IdRWFieldValue IdValue
ARWGAINL
module gain (see electrical parameters)
0x00 -20 dB gain adjust
0x01 -19.5 dB gain adjust
(...)
0x27 -0.5 dB gain adjust
0x28 0 dB gain adjust
0x29 +0.5 dB gain adjust
(...)
0x4F +19.5 dB gain adjust
0x50 +20 dB gain adjust
MinGain0x00-20dB gain adjustment (minimum)
DefaultGain0x280dB gain adjustment (&#x27;2500 RMS&#x27; requirement)
MaxGain0x50+20dB gain adjustment (maximum)

43.7.8 GAINR

Address offset: 0x51C

Right output gain adjustment

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAA
Reset 0x00000028000000000000000000000000000101000
IdRWFieldValue IdValue
ARWGAINR
MinGain0x00
DefaultGain0x28
MaxGain0x50

43.7.9 PSEL.CLK

Address offset: 0x540

Pin number configuration for PDM CLK signal

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

43.7.10 PSEL.DIN

Address offset: 0x544

Pin number configuration for PDM DIN signa

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
BRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

43.7.11 SAMPLE.PTR

Address offset: 0x560

RAM address pointer to write samples to with EasyDMA

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSAMPLEPTRAddress to write PDM samples to over DMA

43.7.12 SAMPLE.MAXCNT

Address offset: 0x564

Number of samples to allocate memory for in EasyDMA mode

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWBUFFSIZE[0..32767]

43.8 Electrical specification

43.8.1 PDM Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{PDM, stereo}$ PDM module active current, stereo operation $^{37}$ 1.4mA
$f_{PDM, CLK}$ PDM clock speed1.032MHz
$t_{PDM, JITTER}$ Jitter in PDM clock output20ns
$T_{dPDM, CLK}$ PDM clock duty cycle405060%
$t_{PDM, DATA}$ Decimation filter delay5ms
$t_{PDM, cv}$ Allowed clock edge to data valid125ns
$t_{PDM, ci}$ Allowed (other) clock edge to data invalid0ns
$t_{PDM, s}$ Data setup time at $f_{PDM, CLK}=1.024$ MHz65ns
$t_{PDM, h}$ Data hold time at $f_{PDM, CLK}=1.024$ MHz0ns
$G_{PDM, default}$ Default (reset) absolute gain of the PDM module3.2dB


Figure 130: PDM timing diagram

44 I2S — Inter-IC sound interface

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ (Inter-IC Sound) module, supports the original two-channel ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ format, and left or right-aligned formats. It implements EasyDMA for sample transfer directly to and from RAM without CPU intervention.

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ peripheral has the following main features:

• Master and Slave mode

• Simultaneous bi-directional (TX and RX) audio streaming

• Original ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ and left- or right-aligned format

• 8, 16 and 24-bit sample width

• Low-jitter Master Clock generator

• Various sample rates

Figure 131: $\boldsymbol { \mathsf { I } } ^ { 2 } \boldsymbol { \mathsf { S } }$ master

44.1 Mode

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ protocol specification defines two modes of operation, Master and Slave.

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ 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.

44.2 Transmitting and receiving

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module supports both transmission (TX) and reception (RX) of serial data. In both cases the serial data is shifted synchronously to the clock signals SCK and LRCK.

TX data is written to the SDOUT pin on the falling edge of SCK, and RX data is read from the SDIN pin on the rising edge of SCK. The most significant bit (MSB) is always transmitted first.

TX and RX are available in both Master and Slave modes and can be enabled/disabled independently in the CONFIG.TXEN on page 459 and CONFIG.RXEN on page 459.

Transmission and/or reception is started by triggering the START task. When started and transmission is enabled (in CONFIG.TXEN on page 459), the TXPTRUPD event will be generated for every RXTXD.MAXCNT on page 462 number of transmitted data words (containing one or more samples). Similarly, when started and reception is enabled (in CONFIG.RXEN on page 459), the RXPTRUPD event will be generated for every RXTXD.MAXCNT on page 462 received data words.


Figure 132: Transmitting and receiving. CONFIG.FORMAT = Aligned, CONFIG.SWIDTH = 8Bit, CONFIG.CHANNELS = Stereo, RXTXD.MAXCNT = 1.

44.3 Left right clock (LRCK)

The Left Right Clock (LRCK), often referred to as "word clock", "sample clock" or "word select" in I2S context, is the clock defining the frames in the serial bit streams sent and received on SDOUT and SDIN, respectively.

In I2S mode, each frame contains one left and right sample pair, with the left sample being transferred during the low half period of LRCK followed by the right sample being transferred during the high period of LRCK.

In Aligned mode, each frame contains one left and right sample pair, with the left sample being transferred during the high half period of LRCK followed by the right sample being transferred during the low period of LRCK.

Consequently, the LRCK frequency is equivalent to the audio sample rate.

When operating in Master mode, the LRCK is generated from the MCK, and the frequency of LRCK is then given as:

LRCK = MCK / CONFIG.RATIO

LRCK always toggles around the falling edge of the serial clock SCK.

44.4 Serial clock (SCK)

The serial clock (SCK), often referred to as the serial bit clock, pulses once for each data bit being transferred on the serial data lines SDIN and SDOUT.

When operating in Master mode the SCK is generated from the MCK, and the frequency of SCK is then given as:

SCK = 2 * LRCK * CONFIG.SWIDTH

The falling edge of the SCK falls on the toggling edge of LRCK.

When operating in Slave mode SCK is provided by the external ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ master.

44.5 Master clock (MCK)

The master clock (MCK) is the clock from which LRCK and SCK are derived when operating in Master mode.

The MCK is generated by an internal MCK generator. This generator always needs to be enabled when in Master mode, but the generator can also be enabled when in Slave mode. Enabling the generator when in slave mode can be useful in the case where the external Master is not able to generate its own master clock.

The MCK generator is enabled/disabled in the register CONFIG.MCKEN on page 460, and the generator is started or stopped by the START or STOP tasks.

In Master mode the LRCK and the SCK frequencies are closely related, as both are derived from MCK and set indirectly through CONFIG.RATIO on page 460 and CONFIG.SWIDTH on page 461.

When configuring these registers, the user is responsible for fulfilling the following requirements:

  1. SCK frequency can never exceed the MCK frequency, which can be formulated as:
CONFIG.RATIO >= 2 * CONFIG.SWIDTH
  1. The MCK/LRCK ratio shall be a multiple of $2 ^ { \star }$ CONFIG.SWIDTH, which can be formulated as:
Integer = (CONFIG.RATIO / (2 * CONFIG.SWIDTH))

The MCK signal can be routed to an output pin (specified in PSEL.MCK) to supply external ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ devices that require the MCK to be supplied from the outside.

When operating in Slave mode, the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module does not use the MCK and the MCK generator does not need to be enabled.

Figure 133: Relation between RATIO, MCK and LRCK.

Table 108: Configuration examples

Desired LRCK [Hz]CONFIG.SWIDTHCONFIG.RATIOCONFIG.MCKFREQMCK [Hz]LRCK [Hz]LRCK error [%]
1600016Bit32X32MDIV63507936.515873.0-0.8
1600016Bit64X32MDIV311032258.116129.00.8
1600016Bit256X32MDIV84000000.015625.0-2.3
3200016Bit32X32MDIV311032258.132258.10.8
3200016Bit64X32MDIV162000000.031250.0-2.3
3200016Bit256X32MDIV48000000.031250.0-2.3
4410016Bit32X32MDIV231391304.343478.3-1.4
4410016Bit64X32MDIV112909090.945454.53.1
4410016Bit256X32MDIV310666666.741666.7-5.5

44.6 Width, alignment and format

The CONFIG.SWIDTH register primarily defines the sample width of the data written to memory. In master mode, it then also sets the amount of bits per frame. In Slave mode it controls padding/trimming if required. Left, right, transmitted, and received samples always have the same width. The CONFIG.FORMAT register specifies the position of the data frames with respect to the LRCK edges in both Master and Slave modes.

When using I2S format, the first bit in a half-frame (containing one left or right sample) gets sampled on the second rising edge of the SCK after a LRCK edge. When using Aligned mode, the first bit in a half-frame gets sampled on the first rising edge of SCK following a LRCK edge.

For data being received on SDIN the sample value can be either right or left-aligned inside a half-frame, as specified in CONFIG.ALIGN on page 461. CONFIG.ALIGN on page 461 affects only the decoding of the incoming samples (SDIN), while the outgoing samples (SDOUT) are always left-aligned (or justified).

When using left-alignment, each half-frame starts with the MSB of the sample value (both for data being sent on SDOUT and received on SDIN).

When using right-alignment, each half-frame of data being received on SDIN ends with the LSB of the sample value, while each half-frame of data being sent on SDOUT starts with the MSB of the sample value (same as for left-alignment).

In Master mode, the size of a half-frame (in number of SCK periods) equals the sample width (in number of bits), and in this case the alignment setting does not care as each half-frame in any case will start with the MSB and end with the LSB of the sample value.

In slave mode, however, the sample width does not need to equal the frame size. This means you might have extra or fewer SCK pulses per half-frame than what the sample width specified in CONFIG.SWIDTH requires.

In the case where we use left-alignment and the number of SCK pulses per half-frame is higher than the sample width, the following will apply:

• For data received on SDIN, all bits after the LSB of the sample value will be discarded.

• For data sent on SDOUT, all bits after the LSB of the sample value will be 0.

In the case where we use left-alignment and the number of SCK pulses per frame is lower than the sample width, the following will apply:

• Data sent and received on SDOUT and SDIN will be truncated with the LSBs being removed first.

In the case where we use right-alignment and the number of SCK pulses per frame is higher than the sample width, the following will apply:

• 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 leftalignment).

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 leftalignment).

frame
LRCKleftrightleft
SCK
SDIN or SDOUTLSBMSBLSBMSBLSB

Figure 134: I2S format. CONFIG.SWIDTH equalling half-frame size.

frame
LRCKleftrightleft
SCK
SDATAMSBLSB MSB

Figure 135: Aligned format. CONFIG.SWIDTH equalling half-frame size.

44.7 EasyDMA

The ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ 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 TXD.PTR on page 462 and RXD.PTR on page 462. The memory pointed to by these pointers will only be read or written when TX or RX are enabled in CONFIG.TXEN on page 459 and CONFIG.RXEN on page 459.

The addresses written to the pointer registers TXD.PTR on page 462 and RXD.PTR on page 462 are double-buffered in hardware, and these double buffers are updated for every RXTXD.MAXCNT on page 462 words (containing one or more samples) read/written from/to memory. The events TXPTRUPD and RXPTRUPD are generated whenever the TXD.PTR and RXD.PTR are transferred to these double buffers.

If TXD.PTR on page 462 is not pointing to the Data RAM region when transmission is enabled, or RXD.PTR on page 462 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 24 for more information about the different memory regions.

Due to the nature of ${ \mathsf { I } } ^ { 2 } { \mathsf { S } } ,$ 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 RXTXD.MAXCNT on page 462 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 (CONFIG.CHANNELS=Stereo), the samples are stored as "left and right sample pairs" in memory. Figure Figure 136: Memory mapping for 8 bit stereo. CONFIG.SWIDTH = 8Bit, CONFIG.CHANNELS = Stereo. on page 453, Figure 138: Memory mapping for 16 bit stereo. CONFIG.SWIDTH = 16Bit, CONFIG.CHANNELS = Stereo. on page 454 and Figure 140: Memory mapping for 24 bit stereo. CONFIG.SWIDTH = 24Bit, CONFIG.CHANNELS = Stereo. on page 454 show how the samples are mapped to memory in this mode. The mapping is valid for both RX and TX.

In mono mode (CONFIG.CHANNELS=Left or Right), RX sample from only one channel in the frame is stored in memory, the other channel sample is ignored. Illustrations Figure 137: Memory mapping for 8 bit mono. CONFIG.SWIDTH = 8Bit, CONFIG.CHANNELS = Left. on page 454, Figure 139: Memory mapping for 16 bit mono, left channel only. CONFIG.SWIDTH = 16Bit, CONFIG.CHANNELS = Left. on page 454 and Figure 141: Memory mapping for 24 bit mono, left channel only. CONFIG.SWIDTH = 24Bit, CONFIG.CHANNELS = Left. on page 455 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.

3124 2316 158 70
x.PTRRight sample 1Left sample 1Right sample 0Left sample 0
x.PTR + 4Right sample 3Left sample 3Right sample 2Left sample 2
x.PTR + (n*2) - 4Left samplen-1Right samplen-1Right samplen-2Left samplen-2

Figure 136: Memory mapping for 8 bit stereo. CONFIG.SWIDTH = 8Bit, CONFIG.CHANNELS = Stereo.

3124231615870
x.PTRLeft sample 3Left sample 2Left sample 1Left sample 0
x.PTR + 4Left sample 7Left sample 6Left sample 5Left sample 4
x.PTR + n - 4
Left samplen-1Left samplen-2Left samplen-3Left samplen-4

Figure 137: Memory mapping for 8 bit mono. CONFIG.SWIDTH = 8Bit, CONFIG.CHANNELS = Left.

3116150
x.PTRRight sample 0Left sample 0
x.PTR + 4Right sample 1Left sample 1
x.PTR + (n*4) - 4Right sample n - 1Left sample n - 1

Figure 138: Memory mapping for 16 bit stereo. CONFIG.SWIDTH = 16Bit, CONFIG.CHANNELS = Stereo.

3116150
x.PTRLeft sample 1Left sample 0
x.PTR + 4Left sample 3Left sample 2
x.PTR + (n*2) - 4Left sample n - 1Left sample n - 2

Figure 139: Memory mapping for 16 bit mono, left channel only. CONFIG.SWIDTH = 16Bit, CONFIG.CHANNELS = Left.

31230
x.PTRSign ext.Left sample 0
x.PTR + 4Sign ext.Right sample 0
x.PTR + (n*8) - 8Sign ext.Left sample n - 1
x.PTR + (n*8) - 4Sign ext.Right sample n - 1
x.PTR + 4Sign ext.Left sample 1
x.PTR + (n*4) - 4Sign ext.Left sample n - 1

Figure 140: Memory mapping for 24 bit stereo. CONFIG.SWIDTH = 24Bit, CONFIG.CHANNELS = Stereo.

Figure 141: Memory mapping for 24 bit mono, left channel only. CONFIG.SWIDTH = 24Bit, CONFIG.CHANNELS = Left.

44.8 Module operation

Described here is a typical operating procedure for the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module.

  1. Configure the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module using the CONFIG registers
// Enable reception
NRF_I2S->CONFIG.RXEN = (I2S_CONFIG_RXEN_RXEN_Enabled << I2S_CONFIG_RXEN_RXEN_Pos);
// Enable transmission
NRF_I2S->CONFIG.TXEN = (I2S_CONFIG_TXEN_TXEN_Enabled << I2S_CONFIG_TXEN_TXEN_Pos);
// Enable MCK generator
NRF_I2S->CONFIG.MCKEN = (I2S_CONFIG_MCKEN_MCKEN_Enabled << I2S_CONFIG_MCKEN_MCKEN_Pos);
// MCKFREQ = 4 MHz
NRF_I2S->CONFIG.MCKFREQ = I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV8 << I2S_CONFIG_MCKFREQ_MCKFREQ_Pos;
// Ratio = 256
NRF_I2S->CONFIG.RATIO = 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->CONFIG.SWIDTH = I2S_CONFIG_SWIDTH_SWIDTH_16Bit << I2S_CONFIG_SWIDTH_SWIDTH_Pos;
// Alignment = Left
NRF_I2S->CONFIG.ALIGN = I2S_CONFIG_ALIGN_ALIGN_Left << I2S_CONFIG_ALIGN_ALIGN_Pos;
// Format = I2S
NRF_I2S->CONFIG.FORMAT = I2S_CONFIG_FORMAT_FORMAT_I2S << I2S_CONFIG_FORMAT_FORMAT_Pos;
// Use stereo
NRF_I2S->CONFIG.CHANNELS = I2S_CONFIG_CHANNELS_CHANNELS_Stereo << I2S_CONFIG_CHANNELS_CHANNELS_Pos;
  1. Map IO pins using the PINSEL registers
// MCK routed to pin 0
NRF_I2S->PSEL.MCK = (0 << I2S_PSEL_MCK_PIN_Pos) |
(I2S_PSEL_MCK_CONNECT_Connected << I2S_PSEL_MCK_CONNECT_Pos);
// SCK routed to pin 1
NRF_I2S->PSEL.SCK = (1 << I2S_PSEL_SCK_PIN_Pos) |
(I2S_PSEL_SCK_CONNECT_Connected <<
I2S_PSEL_SCK_CONNECT_Pos);
// LRCK routed to pin 2
NRF_I2S->PSEL.LRCK = (2 << I2S_PSEL_LRCK_PIN_Pos) |
(I2S_PSEL_LRCK_CONNECT_Connected <<
I2S_PSEL_LRCK_CONNECT_Pos);
// SDOUT routed to pin 3
NRF_I2S->PSEL.SDOUT = (3 << I2S_PSEL_SDOUT_PIN_Pos) |
(I2S_PSEL_SDOUT_CONNECT_Connected <<
I2S_PSEL_SDOUT_CONNECT_Pos);
// SDIN routed on pin 4
NRF_I2S->PSEL.SDIN = (4 << I2S_PSEL_SDIN_PIN_Pos) |
(I2S_PSEL_SDIN_CONNECT_Connected <<
I2S_PSEL_SDIN_CONNECT_Pos);

3. Configure TX and RX data pointers using the TXD, RXD and RXTXD registers

NRF_I2S->TXD.PTR = my_tx_buf;
NRF_I2S->RXD.PTR = my_rx_buf;
NRF_I2S->TXD.MAXCNT = MY_BUF_SIZE;
  1. Enable the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module using the ENABLE register
NRF_I2S->ENABLE = 1;

5. Start audio streaming using the START task

NRF_I2S->TASKS_START = 1;
  1. Handle received and transmitted data when receiving the TXPTRUPD and RXPTRUPD events
if(NRF_I2S->EVENTS_TXPTRUPD != 0)
{
    NRF_I2S->TXD.PTR = my_next_tx_buf;
    NRF_I2S->EVENTS_TXPTRUPD = 0;
}
if(NRF_I2S->EVENTS_RXPTRUPD != 0)
{
    NRF_I2S->RXD.PTR = my_next_rx_buf;
    NRF_I2S->EVENTS_RXPTRUPD = 0;
}

44.9 Pin configuration

The MCK, SCK, LRCK, SDIN and SDOUT signals associated with the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module are mapped to physical pins according to the pin numbers specified in the PSEL.x registers.

These pins are acquired whenever the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module is enabled through the register ENABLE on page 459.

When a pin is acquired by the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module, the direction of the pin (input or output) will be configured automatically, and any pin direction setting done in the GPIO module will be overridden. The directions for the various ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ pins are shown below in Table 109: GPIO configuration before enabling peripheral (master mode) on page 456 and Table 110: GPIO configuration before enabling peripheral (slave mode) on page 457.

To secure correct signal levels on the pins when the system is in OFF mode, and when the ${ \mathsf { I } } ^ { 2 } { \mathsf { S } }$ module is disabled, these pins must be configured in the GPIO peripheral directly.

Table 109: GPIO configuration before enabling peripheral (master mode)

$I^{2}S$ signal $I^{2}S$ pinDirectionOutput valueComment
MCKAs specified in PSEL.MCKOutput0
LRCKAs specified in PSEL.LRCKOutput0
SCKAs specified in PSEL.SCKOutput0
SDINAs specified in PSEL.SDINInputNot applicable
SDOUTAs specified in PSEL.SDOUTOutput0

Table 110: GPIO configuration before enabling peripheral (slave mode)

$I^{2}S$ signal $I^{2}S$ pinDirectionOutput valueComment
MCKAs specified in PSEL.MCKOutput0
LRCKAs specified in PSEL.LRCKInputNot applicable
SCKAs specified in PSEL.SCKInputNot applicable
SDINAs specified in PSEL.SDINInputNot applicable
SDOUTAs specified in PSEL.SDOUTOutput0

44.10 Registers

Table 111: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40025000I2SI2SInter-IC Sound Interface

Table 112: Register Overview

RegisterOffsetDescription
TASKS_START0x000Starts continuous I2S transfer. Also starts MCK generator when this is enabled.
TASKS_STOP0x004Stops I2S transfer. Also stops MCK generator. Triggering this task will cause the {event:STOPPED} event to be generated.
EVENTS_RXPTRUPD0x104The RXD.PTR 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 RXTXD.MAXCNT words that are received on the SDIN pin.
EVENTS_STOPPED0x108I2S transfer stopped.
EVENTS_TXPTRUPD0x114The TDX.PTR 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 RXTXD.MAXCNT words that are sent on the SDOUT pin.
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500Enable I2S module.
CONFIG.MODE0x504I2S mode.
CONFIG.RXEN0x508Reception (RX) enable.
CONFIG.TXEN0x50CTransmission (TX) enable.
CONFIG.MCKEN0x510Master clock generator enable.
CONFIG.MCKFREQ0x514Master clock generator frequency.
CONFIG.RATIO0x518MCK / LRCK ratio.
CONFIG.SWIDTH0x51CSample width.
CONFIG.ALIGN0x520Alignment of sample within a frame.
CONFIG.FORMAT0x524Frame format.
CONFIG.CHANNELS0x528Enable channels.
RXD.PTR0x538Receive buffer RAM start address.
TXD.PTR0x540Transmit buffer RAM start address.
RXTXD.MAXCNT0x550Size of RXD and TXD buffers.
PSEL.MCK0x560Pin select for MCK signal.
PSEL.SCK0x564Pin select for SCK signal.
PSEL.LRCK0x568Pin select for LRCK signal.
PSEL.SDIN0x56CPin select for SDIN signal.
PSEL.SDOUT0x570Pin select for SDOUT signal.

44.10.1 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdFCB
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWRXPTRUPD
EEVENTS_RXPTRUPD
Disabled0
Enabled1
CRWSTOPPED
Disabled0
Enabled1
FRWTXPTRUPDEEVENTS_STOPPED
Disabled0EEVENTS_TXPTRUPD
Enabled1EEVENTS_TXPTRUPD

44.10.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWRXPTRUPD
Set1
Disabled0
Enabled1
CRWSTOPPED
Set1
Disabled0
Enabled1
FRWTXPTRUPD
Set1
Disabled0
Enabled1

44.10.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWRXPTRUPD
Clear1
Disabled0
Enabled1
CRWSTOPPED
Bit number313029282726252423222120191817161514131211109876543210
IdFCB
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Clear1
Disabled0
Enabled1
FRWTXPTRUPD
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

44.10.4 ENABLE

Address offset: 0x500

Enable I2S module.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled1

44.10.5 CONFIG.MODE

Address offset: 0x504

I2S mode.

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWMODE
Master0
Slave1

44.10.6 CONFIG.RXEN

Address offset: 0x508

Reception (RX) enable.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWRXEN
Disabled0
Enabled1

44.10.7 CONFIG.TXEN

Address offset: 0x50C

Transmission (TX) enable.

Bit number313029282726252423222120191817161514131211109876543210
IdA
Reset 0x0000000100000000000000000000000000000001
IdRWFieldValue IdValue
ARWTXEN
Disabled0
Enabled1

44.10.8 CONFIG.MCKEN

Address offset: 0x510

Master clock generator enable.

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValueDescription
ARWMCKEN
Disabled0
Enabled1

44.10.9 CONFIG.MCKFREQ

Address offset: 0x514

Master clock generator frequency.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x2000000000100000000000000000000000000000
IdRWFieldValue IdValue
ARWMCKFREQ
32MDIV20x80000000
32MDIV30x50000000
32MDIV40x40000000
32MDIV50x30000000
32MDIV60x28000000
32MDIV80x20000000
32MDIV100x18000000
32MDIV110x16000000
32MDIV150x11000000
32MDIV160x10000000
32MDIV210x0C000000
32MDIV230x0B000000
32MDIV300x08800000
32MDIV310x08400000
32MDIV320x08000000
32MDIV420x06000000
32MDIV630x04100000
32MDIV1250x020C0000

44.10.10 CONFIG.RATIO

Address offset: 0x518

MCK / LRCK ratio.

Bit number313029282726252423222120191817161514131211109876543210
IdAAAA
Reset 0x00000006000000000000000000000000000000110
IdRWFieldValue IdValue
ARWRATIO
32X0
48X1
64X2
96X3
128X4
192X5
256X6
384X7
512X8

44.10.11 CONFIG.SWIDTH

Address offset: 0x51C

Sample width.

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x00000001000000000000000000000000000000001
IdRWFieldValue IdValueDescription
ARWSWIDTHSample width.
8Bit08 bit.
16Bit116 bit.
24Bit224 bit.

44.10.12 CONFIG.ALIGN

Address offset: 0x520

Alignment of sample within a frame.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARWALIGN
Left0
Right1

44.10.13 CONFIG.FORMAT

Address offset: 0x524

Frame format.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWFORMATFrame format.
I2S0Original I2S format.
Aligned1Alternate (left- or right-aligned) format.

44.10.14 CONFIG.CHANNELS

Address offset: 0x528

Enable channels.

Bit number313029282726252423222120191817161514131211109876543210
IdAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCHANNELSEnable channels.
Stereo0Stereo.
Left1Left only.
Right2Right only.

44.10.15 RXD.PTR

Address offset: 0x538

Receive buffer RAM start address.

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARW Field Value Id DescriptionReceive 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.
IdRWFieldValue IdDescription
ARWPTR

44.10.16 TXD.PTR

Address offset: 0x540

Transmit buffer RAM start address.

Bit number
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARWFieldValue IdValueDescription
IdRWField
ARWPTRTransmit buffer Data RAM start address. When transmitting,words containing samples will be fetched from this address. Thisaddress is a word aligned Data RAM address.

44.10.17 RXTXD.MAXCNT

Address offset: 0x550

Size of RXD and TXD buffers.

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWMAXCNTSize of RXD and TXD buffers in number of 32 bit words.

44.10.18 PSEL.MCK

Address offset: 0x560

Pin select for MCK signal.

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

44.10.19 PSEL.SCK

Address offset: 0x564

Pin select for SCK signal.

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

44.10.20 PSEL.LRCK

Address offset: 0x568

Pin select for LRCK signal.

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

44.10.21 PSEL.SDIN

Address offset: 0x56C

Pin select for SDIN signal.

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

44.10.22 PSEL.SDOUT

Address offset: 0x570

Pin select for SDOUT signal.

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF11111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

44.11 Electrical specification

44.11.1 I2S timing specification

SymbolDescriptionMin.Typ.Max.Units
$t_{S\_SDIN}$ SDIN setup time before SCK rising20ns
$t_{H\_SDIN}$ SDIN hold time after SCK rising15ns
$t_{S\_SDOUT}$ SDOUT setup time after SCK falling40ns
$t_{H\_SDOUT}$ SDOUT hold time before SCK falling6ns
$t_{SCK\_LRCK}$ SCLK falling to LRCK edge-505ns
$f_{MCK}$ MCK frequency4000kHz
$f_{LRCK}$ LRCK frequency48kHz
$f_{SCK}$ SCK frequency2000kHz
$DC_{CK}$ Clock duty cycle (MCK, LRCK, SCK)4555%


Figure 142: I2S timing diagram

45 MWU — Memory watch unit

The Memory watch unit (MWU) can be used to generate events when a memory region is accessed by the CPU. The MWU can be configured to trigger events for access to Data RAM and Peripheral memory segments. The MWU allows an application developer to generate memory access events during development for debugging or during production execution for failure detection and recovery.

Listed here are the main features for MWU:

• Six memory regions, four user-configurable and two fixed regions in peripheral address space

• Flexible configuration of regions with START and END addresses

• Generate events on CPU read and/or write to a defined region of Data RAM or peripheral memory address space

• Programmable maskable or non-maskable (NMI) interrupt on events

• Peripheral interfaces can be watched for read and write access using subregions of the two fixed memory regions

Table 113: Memory regions

Memory regionSTART addressEND address
REGION[0..3]ConfigurableConfigurable
PREGION[0]0x400000000x4001FFFF
PREGION[1]0x400200000x4003FFFF

Each MWU region is defined by a start address and an end address, configured by the START and END registers respectively. These addresses are byte aligned and inclusive. The END register value has to be greater or equal to the START register value. Each region is associated with a pair of events that indicate that either a write access or a read access from the CPU has been detected inside the region.

For regions containing subregions (see below), a set of status registers PERREGION[0..1].SUBSTATWA and PERREGION[0..1].SUBSTATRA indicate which subregion(s) caused the EVENT_PREGION[0..1].WA and EVENT_PREGION[0..1].RA respectively.

The MWU is only able to detect memory accesses in the Data RAM and Peripheral memory segments from the CPU, see Memory on page 24 for more information about the different memory segments. EasyDMA accesses are not monitored by the MWU. The MWU requires two HCLK cycles to detect and generate the event.

The peripheral regions, PREGION[0...1], are divided into 32 equally sized subregions, SR[0...31]. All subregions are excluded in the main region by default, and any can be included by specifying them in the SUBS register. When a subregion is excluded from the main region, the memory watch mechanism will not trigger any events when that subregion is accessed.

Subregions in PREGION[0..1] cannot be individually configured for read or write access watch. Watch configuration is only possible for a region as a whole. The PRGNiRA and PRGNiWA (i=0..1) fields in the REGIONEN register control watching read and write access.

REGION[0..3] can be individually enabled for read and/or write access watching through their respective RGNiRA and RGNiWA (i=0..3) fields in the REGIONEN register.

REGIONENSET and REGIONENCLR allow respectively enabling and disabling one or multiple REGIONs or PREGIONs watching in a single write access.

45.1 Registers

Table 114: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40020000MWUMWUMemory Watch Unit

Table 115: Register Overview

RegisterOffsetDescription
EVENTS_REGION[0].WA0x100Write access to region 0 detected
EVENTS_REGION[0].RA0x104Read access to region 0 detected
EVENTS_REGION[1].WA0x108Write access to region 1 detected
EVENTS_REGION[1].RA0x10CRead access to region 1 detected
EVENTS_REGION[2].WA0x110Write access to region 2 detected
EVENTS_REGION[2].RA0x114Read access to region 2 detected
EVENTS_REGION[3].WA0x118Write access to region 3 detected
EVENTS_REGION[3].RA0x11CRead access to region 3 detected
EVENTS_PREGION[0].WA0x160Write access to peripheral region 0 detected
EVENTS_PREGION[0].RA0x164Read access to peripheral region 0 detected
EVENTS_PREGION[1].WA0x168Write access to peripheral region 1 detected
EVENTS_PREGION[1].RA0x16CRead access to peripheral region 1 detected
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
NMIEN0x320Enable or disable non-maskable interrupt
NMIENSET0x324Enable non-maskable interrupt
NMIENCLR0x328Disable non-maskable interrupt
PERREGION[0].SUBSTATI0x400Source of event/interrupt in region 0, write access detected while corresponding subregion was enabled for watching
PERREGION[0].SUBSTATI0x404Source of event/interrupt in region 0, read access detected while corresponding subregion was enabled for watching
PERREGION[1].SUBSTATI0x408Source of event/interrupt in region 1, write access detected while corresponding subregion was enabled for watching
PERREGION[1].SUBSTATI0x40CSource of event/interrupt in region 1, read access detected while corresponding subregion was enabled for watching
REGIONEN0x510Enable/disable regions watch
REGIONENSET0x514Enable regions watch
REGIONENCLR0x518Disable regions watch
REGION[0].START0x600Start address for region 0
REGION[0].END0x604End address of region 0
REGION[1].START0x610Start address for region 1
REGION[1].END0x614End address of region 1
REGION[2].START0x620Start address for region 2
REGION[2].END0x624End address of region 2
REGION[3].START0x630Start address for region 3
REGION[3].END0x634End address of region 3
PREGION[0].START0x6C0Reserved for future use
PREGION[0].END0x6C4Reserved for future use
PREGION[0].SUBS0x6C8Subregions of region 0
PREGION[1].START0x6D0Reserved for future use
PREGION[1].END0x6D4Reserved for future use
PREGION[1].SUBS0x6D8Subregions of region 1

45.1.1 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWREGION0WAEnable or disable interrupt for REGION[0].WA event
See EVENTS_REGION[0].WA
Disabled0Disable
Bit number313029282726252423222120191817161514131211109876543210
IdL
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Enabled1
BRWREGION0RA
Disabled0
Enabled1
CRWREGION1WA
Disabled0
Enabled1
DRWREGION1RA
Disabled0Disable
Enabled1Enable
ERWREGION2WA
Disabled0
Enabled1Enable
FRWREGION2RA
Disabled0Disable
Enabled1Enable
GRWREGION3WA
Disabled0Disable
Enabled1Enable
HRWREGION3RA
Disabled0Enable or disable interrupt for PREGION[0].WA event
Enabled1See EVENTS_PREGION[0].WA
IRWPREGION0WADisable or disable interrupt for PREGION[0].RA event
See EVENTS_PREGION[0].RA
Disabled0Disable or disable interrupt for PREGION[0].WA event
Enabled1See EVENTS_PREGION[0].WA
JRWPREGION0RADisable or disable interrupt for PREGION[0].RA event
See EVENTS_PREGION[0].RA
DisabledODisable or disable interrupt for PREGION[0].WA event
Enabled1Enable or disable interrupt for PREGION[0].RA event
KRWPREGION1WASee EVENTS_PREGION[0].RA
Disabled0Disable or disable interrupt for PREGION[0].RA event
Enabled1Enable or disable interrupt for PREGION[0].RA event
LRWPREGION1RASee EVENTS_PREGION[0].RA
Disabled0Disable or disable interrupt for PREGION[0].RA event
Enabled1Enable or disable interrupt for PREGION[0].RA event

45.1.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x0000000000000000000
IdRWFieldValue IdValueDescription
ARWREGION0WAWrite &#x27;1&#x27; to Enable interrupt for REGION[0].WA event
See EVENTS_REGION[0].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWREGION0RAWrite &#x27;1&#x27; to Enable interrupt for REGION[0].RA event
See EVENTS_REGION[0].RA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWREGION1WAWrite &#x27;1&#x27; to Enable interrupt for REGION[1].WA event
See EVENTS_REGION[1].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWREGION1RAWrite &#x27;1&#x27; to Enable interrupt for REGION[1].RA event
See EVENTS_REGION[1].RA
Set1Enable
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
ERWREGION2WAWrite &#x27;1&#x27; to Enable interrupt for REGION[2].WA event
See EVENTS_REGION[2].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWREGION2RAWrite &#x27;1&#x27; to Enable interrupt for REGION[2].RA event
See EVENTS_REGION[2].RA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWREGION3WAWrite &#x27;1&#x27; to Enable interrupt for REGION[3].WA event
See EVENTS_REGION[3].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREGION3RAWrite &#x27;1&#x27; to Enable interrupt for REGION[3].RA event
See EVENTS_REGION[3].RA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRWPREGION0WAWrite &#x27;1&#x27; to Enable interrupt for PREGION[0].WA event
See EVENTS_PREGION[0].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
JRWPREGION0RAWrite &#x27;1&#x27; to Enable interrupt for PREGION[0].RA event
See EVENTS_PREGION[0].RA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
KRWPREGION1WAWrite &#x27;1&#x27; to Enable interrupt for PREGION[1].WA event
Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_PREGION[1].WA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRWPREGION1RAWrite &#x27;1&#x27; to Enable interrupt for PREGION[1].RA event
See EVENTS_PREGION[1].RA
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

45.1.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREGION0WA
Clear1
Disabled0
Enabled1
BRWREGION0RA
Clear1
Disabled0
Enabled1
CRWREGION1WA
Clear1
Disabled0
Enabled1
DRWREGION1RA
Clear1Disable
Disabled0
Enabled1Read: Disabled
ERWREGION2WA
Clear1
Disabled0
Enabled1
FRWREGION2RAWrite &#x27;1&#x27; to Disable interrupt for REGION[2].RA event
Clear1
Disabled0
Enabled1
GRWREGION3WAWrite &#x27;1&#x27; to Disable interrupt for REGION[3].WA event
See EVENTS_REGION[3].WA
Clear1Disable
Bit number313029282726252423222120191817161514131211109876543210
IdLKJI
Reset 0x00000000000000000
IdRWFieldValue IdValueDescription
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWREGION3RAWrite &#x27;1&#x27; to Disable interrupt for REGION[3].RA event
See EVENTS_REGION[3].RA
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
IRWPREGION0WAWrite &#x27;1&#x27; to Disable interrupt for PREGION[0].WA event
See EVENTS_PREGION[0].WA
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
JRWPREGION0RAWrite &#x27;1&#x27; to Disable interrupt for PREGION[0].RA event
See EVENTS_PREGION[0].RA
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
KRWPREGION1WAWrite &#x27;1&#x27; to Disable interrupt for PREGION[1].WA event
See EVENTS_PREGION[1].WA
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
LRWPREGION1RAWrite &#x27;1&#x27; to Disable interrupt for PREGION[1].RA event
See EVENTS_PREGION[1].RA
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

45.1.4 NMIEN

Address offset: 0x320

Enable or disable non-maskable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREGION0WA
Event
See EVENTS_REGION[0].WA
Disabled0Disable
Enabled1Enable
BRWREGION0RAEnable or disable non-maskable interrupt for REGION[0].RA event
See EVENTS_REGION[0].RA
Disabled0Disable
Enabled1EnableDisable or disable non-maskable interrupt for REGION[1].WA event
CRWREGION1WASee EVENTS_REGION[1].WA
Disabled0Disable
Enabled1EnableDisable
Bit number313029282726252423222120191817161514131211109876543210
IdLKJI
Reset 0x00000000000000000
IdRWFieldValue IdValue
DRWREGION1RA
0
ERWREGION2WA
0
1
FRWREGION2RA
0
1
GRWREGION3WA0
1
HRWREGION3RA0
0
1
IRWPREGION0WA0
1
JRWPREGION0RA0
0
1
KRWPREGION1WA0
1
LRWPREGION1RA0
1

45.1.5 NMIENSET

Address offset: 0x324

Enable non-maskable interrupt

Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdL K J I
Reset 0x0000000000000000000000000000000000000000000000000000000000WEFDCBA
IdRWFieldValue IdValueDescription000000000000000000000000000000000000000000000000.00000000000000000000000000000000000000000000000000.0WEFDCBA
ARWREGION0WAWrite &#x27;1&#x27; to Enable non-maskable interrupt for REGION[0].WA event
See EVENTS_REGION[0].WA

See EVENTS_PREGION[0].WA

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Set1
Disabled0
Enabled1
JRWPREGION0RA
Set1
Disabled0
Enabled1Write &#x27;1&#x27; to Enable non-maskable interrupt for PREGION[0].RA event
KRWPREGION1WA
Set1Write &#x27;1&#x27; to Enable non-maskable interrupt for PREGION[1].WA event
Disabled0See EVENTS_PREGION[1].WA
Enabled1Write &#x27;1&#x27; to Enable non-maskable interrupt for PREGION[1].RA event
LRWPREGION1RA
Set1See EVENTS_PREGION[1].RA
Disabled0Enable
Enabled1Read: Disabled

45.1.6 NMIENCLR

Address offset: 0x328

Disable non-maskable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWREGION0WA
Event
Clear
Disabled
Enabled
BRWREGION0RA
Clear
Disabled
Enabled
CRWREGION1WA
Clear
Disabled
Enabled
DRWREGION1RA
Disabled
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdL K J I
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWREGION2WAWrite &#x27;1&#x27; to Disable non-maskable interrupt for REGION[2].WA event
See EVENTS_REGION[2].WA
Clear1DisableRead: Disabled
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
FRWREGION2RAWrite &#x27;1&#x27; to Disable non-maskable interrupt for REGION[2].RA event
See EVENTS_REGION[2].RA
Clear1DisableRead: Disabled
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
GRWREGION3WAWrite &#x27;1&#x27; to Disable non-maskable interrupt for REGION[3].RA event
See EVENTS_REGION[3].RA
Clear1DisableRead: Disabled
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
HRWREGION3RAWrite &#x27;1&#x27; to Disable non-maskable interrupt for REGION[3].RA event
See EVENTS_REGION[3].RA
Clear1DisableRead: Disabled
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
IRWPREGION0WAWrite &#x27;1&#x27; to Disable non-maskable interrupt for PREGION[0].RA event
See EVENTS_PREGION[0].RA
Clear1DisableRead: Disabled
Disabled0Read: DisabledRead: Enabled
Enabled1Read: Enabled
JRWPREGION0RAWrite &#x27;1&#x27; to Disable non-maskable interrupt for PREGION[0].RA eventSee EVENTS_PREGION[0].RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. R. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RC. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RE. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. P. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. PA. Pa.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.PPA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P A.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P PA.P P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A. P.A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.PA.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P AA.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.PAA.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P A.P C.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.B.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.RA.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.R.A.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA,RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA(RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA. RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA.RRA. $\mathrm{{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf}$ $\mathrm{{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}$ $\mathrm{{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf~{}}\;{\bf}$ $\mathrm{{R.W.PREGION1WA}}$ Write &#x27;1&#x27; to Disable non-maskable interrupt for PREGION[1].RA event See EVENTS_PREGION[1].RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. RA. Ra.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EV.AVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA.EVA

45.1.7 PERREGION[0].SUBSTATWA

Address offset: 0x400

Source of event/interrupt in region 0, write access detected while corresponding subregion was enabled for watching

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSR0Subregion 0 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
BRWSR1Subregion 1 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
CRWSR2Subregion 2 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1
DRWSR3Subregion 3 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
ERWSR4Subregion 4 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
FRWSR5Subregion 5 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
GRWSR6Subregion 6 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Water access(es) occurred in this subregion
HRWSR7Subregion 7 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Weit access(es) occurred in this subregion
IRWSR8Subregion 8 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Writte access(es) occurred in this subregion
JRWSR9Subregion 9 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Writte access(es) occurred in this subregion
KRWSR10Subregion 10 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Writte access(es) occurred in this subregion
LRWSR11Subregion 11 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Weit access(es) occurred in this subregion
MRWSR12Subregion 12 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
NRWSR13Subregion 13 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1WEit access(es) occurred in this subregion
ORWSR14Subregion 14 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1WRitte access(es) occurred in this subregion
PRWSR15Subregion 15 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1WPitte access(es) occurred in this subregion
QRWSR16Subregion 16 in region 0 (write &#x27;1&#x27; to clear)
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
NoAccess0
Access1
RRWSR17
NoAccess0
Access1
SRWSR18
NoAccess0
Access1
TRWSR19
NoAccess0
Access1Write access(es) occurred in this subregion
URWSR20
NoAccess0
Access1
VRWSR21
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
WRWSR22Subregion 20 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
XRWSR23Subregion 23 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
YRWSR24Subregion 24 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
ZRWSR25Subregion 25 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
aRWSR26Subregion 26 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
bRWSR27Subregion 27 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
cRWSR28Subregion 28 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1
dRWSR29Subregion 29 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
eRWSR30Subregion 30 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
fRWSR31Subregion 31 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion

45.1.8 PERREGION[0].SUBSTATRA

Address offset: 0x404

Source of event/interrupt in region 0, read access detected while corresponding subregion was enabled for watching

Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
ARWSR0Subregion 0 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
BRWSR1Subregion 1 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
CRWSR2Subregion 2 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
DRWSR3Subregion 3 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
ERWSR4Subregion 4 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
FRWSR5Subregion 5 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
GRWSR6Subregion 6 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
HRWSR7Subregion 7 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
IRWSR8Subregion 8 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
JRWSR9Subregion 9 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
KRWSR10Subregion 10 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
LRWSR11Subregion 11 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
MRWSR12Subregion 12 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
NRWSR13Subregion 13 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
ORWSR14Subregion 14 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
PRWSR15Subregion 15 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
QRWSR16Subregion 16 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
RRWSR17Subregion 17 in region 0 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
SRWSR18Subregion 18 in region 0 (write &#x27;1&#x27; to clear)
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
NoAccess0
Access1
TRWSR19
NoAccess0
Access1
URWSR20
NoAccess0
Access1
VRWSR21
NoAccess0
Access1
WRWSR22
NoAccess0
Access1Read access(es) occurred in this subregion
XRWSR23
NoAccess0Subregion 23 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
YRWSR24
NoAccess0Subregion 24 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
ZRWSR25
NoAccess0Subregion 25 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
aRWSR26
NoAccess0Subregion 26 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
bRWSR27
NoAccess0Subregion 27 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
cRWSR28
NoAccess0Subregion 28 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
dRWSR29
NoAccess0Subregion 29 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
eRWSR30
NoAccess0Subregion 30 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
fRWSR31
NoAccess0Subregion 31 in region 0 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion

45.1.9 PERREGION[1].SUBSTATWA

Address offset: 0x408

Source of event/interrupt in region 1, write access detected while corresponding subregion was enabled for watching

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSROSubregion 0 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
BRWSR1Subregion 1 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
CRWSR2Subregion 2 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
DRWSR3Subregion 3 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
ERWSR4Subregion 4 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
FRWSR5Subregion 5 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
GRWSR6Subregion 6 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
HRWSR7Subregion 7 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
IRWSR8Subregion 8 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
JRWSR9Subregion 9 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
KRWSR10Subregion 10 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
LRWSR11Subregion 11 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
MRWSR12Subregion 12 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
NRWSR13Subregion 13 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
ORWSR14Subregion 14 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
PRWSR15Subregion 15 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
QRWSR16Subregion 16 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
RRWSR17Subregion 17 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
SRWSR18Subregion 18 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
TRWSR19Subregion 19 in region 1 (write &#x27;1&#x27; to clear)
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
NoAccess0
Access1
URWSR20
NoAccess0
Access1
VRWSR21
NoAccess0
Access1
WRWSR22
NoAccess0
Access1Subregion 22 in region 1 (write &#x27;1&#x27; to clear)
XRWSR23
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion
YRWSR24Subregion 24 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No write access occurred in this subregion
Access1Write access(es) occurred in this subregion

45.1.10 PERREGION[1].SUBSTATRA

Address offset: 0x40C

Source of event/interrupt in region 1, read access detected while corresponding subregion was enabled for watching

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWSROSubregion 0 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
BRWSR1Subregion 1 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
CRWSR2Subregion 2 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
DRWSR3Subregion 3 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
ERWSR4Subregion 4 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
FRWSR5Subregion 5 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
GRWSR6Subregion 6 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
HRWSR7Subregion 7 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
IRWSR8Subregion 8 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
JRWSR9Subregion 9 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
KRWSR10Subregion 10 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
LRWSR11Subregion 11 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
MRWSR12Subregion 12 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
NRWSR13Subregion 13 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
ORWSR14Subregion 14 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
PRWSR15Subregion 15 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
QRWSR16Subregion 16 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
RRWSR17Subregion 17 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
SRWSR18Subregion 18 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
TRWSR19Subregion 19 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
URWSR20Subregion 20 in region 1 (write &#x27;1&#x27; to clear)
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
NoAccess0
Access1
VRWSR21
NoAccess0
Access1
WRWSR22
NoAccess0
Access1
XRWSR23
NoAccess0
Access1Read access(es) occurred in this subregion
YRWSR24
NoAccess0Subregion 24 in region 1 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
ZRWSR25Subregion 25 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1Read access(es) occurred in this subregion
aRWSR26Subregion 26 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1
bRWSR27Read access(es) occurred in this subregion
NoAccess0Subregion 27 in region 1 (write &#x27;1&#x27; to clear)
Access1Read access(es) occurred in this subregion
cRWSR28Subregion 28 in region 1 (write &#x27;1&#x27; to clear)
NoAccess0No read access occurred in this subregion
Access1
dRWSR29Read access(es) occurred in this subregion
NoAccess0Subregion 29 in region 1 (write &#x27;1&#x27; to clear)
Access1No read access occurred in this subregion
eRWSR30Read access(es) occurred in this subregion
NoAccess0Subregion 30 in region 1 (write &#x27;1&#x27; to clear)
Access1No read access occurred in this subregion
fRWSR31Read access(es) occurred in this subregion
NoAccess0Subregion 31 in region 1 (write &#x27;1&#x27; to clear)
Access1No read access occurred in this subregion

45.1.11 REGIONEN

Address offset: 0x510

Enable/disable regions watch

Bit number313029282726252423222120191817161514131211109876543210
IdLHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWRGN0WA
Disable0
Enable1
BRWRGN0RA
Disable0
Enable1
CRWRGN1WA
Disable0
Enable1
DRWRGN1RA
Bit number313029282726252423222120191817161514131211109876543210
IdLHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disable0
Enable1
ERWRGN2WA
Disable0
Enable1
FRWRGN2RA
Disable0
Enable1
GRWRGN3WA
Disable0
Enable1
HRWRGN3RA
Disable0
Enable1
IRWPRGN0WA
Disable0
Enable1
JRWPRGN0RA
Disable0
Enable1
KRWPRGN1WA
Disable0
Enable1
LRWPRGN1RA
Disable0
Enable1

45.1.12 REGIONENSET

Address offset: 0x514

Enable regions watch

Bit number313029282726252423222120191817161514131211109876543210
IdLHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWRGN0WAEnable write access watch in region[0]
Set1Enable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
BRWRGN0RAEnable read access watch in region[0]
Set1Enable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
CRWRGN1WAEnable write access watch in region[1]
Set1Enable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
DRWRGN1RAEnable read access watch in region[1]
Set1Enable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
ERWRGN2WAEnable write access watch in region[2]
Set1Enable write access watch in this region
Disabled0Write access watch in this region is disabled
Bit number313029282726252423222120191817161514131211109876543210
IdLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Enabled1Write access watch in this region is enabled
FRWRGN2RAEnable read access watch in region[2]
Set1Enable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
GRWRGN3WAEnable write access watch in region[3]
Set1Enable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
HRWRGN3RAEnable read access watch in region[3]
Set1Enable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
IRWPRGN0WAEnable write access watch in PREGION[0]
Set1Enable write access watch in this PREGION
Disabled0Write access watch in this PREGION is disabled
Enabled1Write access watch in this PREGION is enabled
JRWPRGN0RAEnable read access watch in PREGION[0]
Set1Enable read access watch in this PREGION
Disabled0Read access watch in this PREGION is disabled
Enabled1Read access watch in this PREGION is enabled
KRWPRGN1WAEnable write access watch in PREGION[1]
Set1Enable write access watch in this PREGION
Disabled0Write access watch in this PREGION is disabled
Enabled1Write access watch in this PREGION is enabled
LRWPRGN1RAEnable read access watch in PREGION[1]
Set1Enable read access watch in this PREGION
Disabled0Read access watch in this PREGION is disabled
Enabled1Read access watch in this PREGION is enabled

45.1.13 REGIONENCLR

Address offset: 0x518

Disable regions watch

Bit number313029282726252423222120191817161514131211109876543210
IdLHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWRGN0WADisable write access watch in region[0]
Clear1Disable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
BRWRGN0RADisable read access watch in region[0]
Clear1Disable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
CRWRGN1WADisable write access watch in region[1]
Clear1Disable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
DRWRGN1RADisable read access watch in region[1]
Clear1Disable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IdL K J I
Reset 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
ERWRGN2WADisable write access watch in region[2]
Clear1Disable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
FRWRGN2RADisable read access watch in region[2]
Clear1Disable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
GRWRGN3WADisable write access watch in region[3]
Clear1Disable write access watch in this region
Disabled0Write access watch in this region is disabled
Enabled1Write access watch in this region is enabled
HRWRGN3RADisable read access watch in region[3]
Clear1Disable read access watch in this region
Disabled0Read access watch in this region is disabled
Enabled1Read access watch in this region is enabled
IRWPRGN0WADisable write access watch in PREGION[0]
Clear1Disable write access watch in this PREGION
Disabled0Write access watch in this PREGION is disabled
Enabled1Write access watch in this PREGION is enabled
JRWPRGN0RADisable read access watch in PREGION[0]
Clear1Disable read access watch in this PREGION
Disabled0Read access watch in this PREGION is disabled
Enabled1Read access watch in this PREGION is enabled
KRWPRGN1WADisable write access watch in PREGION[1]
Clear1Disable write access watch in this PREGION
Disabled0Write access watch in this PREGION is disabled
Enabled1Write access watch in this PREGION is enabled
LRWPRGN1RADisable read access watch in PREGION[1]
Clear1Disable read access watch in this PREGION
Disabled0Read access watch in this PREGION is disabled
Enabled1Read access watch in this PREGION is enabled

45.1.14 REGION[0].START

Address offset: 0x600

Start address for region 0

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSTARTStart address for region

45.1.15 REGION[0].END

Address offset: 0x604

End address of region 0

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEND

45.1.16 REGION[1].START

Address offset: 0x610

Start address for region 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSTARTStart address for region

45.1.17 REGION[1].END

Address offset: 0x614

End address of region 1

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWEND

45.1.18 REGION[2].START

Address offset: 0x620

Start address for region 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue Id
ARWSTART

45.1.19 REGION[2].END

Address offset: 0x624

End address of region 2

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENDEnd address of region.

45.1.20 REGION[3].START

Address offset: 0x630

Start address for region 3

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTARTStart address for region

45.1.21 REGION[3].END

Address offset: 0x634

End address of region 3

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENDEnd address of region.

45.1.22 PREGION[0].START

Address offset: 0x6C0

Reserved for future use

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSTARTReserved for future use

45.1.23 PREGION[0].END

Address offset: 0x6C4

Reserved for future use

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARENDReserved for future use

45.1.24 PREGION[0].SUBS

Address offset: 0x6C8

Subregions of region 0

Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSR0
Exclude0
Include1
BRWSR1
Exclude0
Include1
CRWSR2
Exclude0
Include1Include or exclude subregion 2 in region
DRWSR3Include or exclude subregion 3 in region
Exclude0Exclude
Include1Include or exclude subregion 4 in region
ERWSR4Include or exclude subregion 5 in region
Exclude0Exclude
Include1Include or exclude subregion 6 in region
FRWSR5Include or exclude subregion 5 in region
Exclude0Exclude
Include1Include or exclude subregion 6 in region
GRWSR6Exclude
Exclude0Include or exclude subregion 6 in region
Include1Include or exclude subregion 6 in region
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
HRWSR7
Exclude0
Include1
IRWSR8
Exclude0
Include1Include
JRWSR9
Exclude0Exclude
Include1Include
KRWSR10Include or exclude subregion 10 in region
Exclude0Exclude
Include1Include
LRWSR11Include or exclude subregion 11 in region
Exclude0Exclude
Include1Include
MRWSR12Include or exclude subregion 12 in region
Exclude0Exclude
Include1Include
NRWSR13Include or exclude subregion 13 in region
Exclude0Exclude
Include1Include
ORWSR14Include or exclude subregion 14 in region
Exclude0Exclude
Include1Include
PRWSR15Include or exclude subregion 15 in region
Exclude0Exclude
Include1IncludeQRWSR16
Exclude0Exclude
Include1Include
RRWSR17Include or exclude subregion 17 in region
Exclude0Exclude
Include1Include
SRWSR18Include or exclude subregion 18 in region
Exclude0Exclude
Include1Include
TRWSR19Include or exclude subregion 19 in region
Exclude0Exclude
Include1Include
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
Exclude0
Include1
aRWSR26
Exclude0
Include1
bRWSR27
Exclude0
Include1
cRWSR28
Exclude0
Include1
dRWSR29
Exclude0
Include1
eRWSR30
Exclude0
Include1
fRWSR31
Exclude0
Include1Include or exclude subregion 31 in region

45.1.25 PREGION[1].START

Address offset: 0x6D0

Reserved for future use

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARSTARTReserved for future use

45.1.26 PREGION[1].END

Address offset: 0x6D4

Reserved for future use

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARENDReserved for future use

45.1.27 PREGION[1].SUBS

Address offset: 0x6D8

Subregions of region 1

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWSROInclude or exclude subregion 0 in region
Exclude0Exclude
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Idf 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 0x000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IdRWFieldValue IdValueDescription
Include1Include
BRWSR1Include or exclude subregion 1 in region
Exclude0Exclude
Include1Include
CRWSR2Include or exclude subregion 2 in region
Exclude0Exclude
Include1Include
DRWSR3Include or exclude subregion 3 in region
Exclude0Exclude
Include1Include
ERWSR4Include or exclude subregion 4 in region
Exclude0Exclude
Include1Include
FRWSR5Include or exclude subregion 5 in region
Exclude0Exclude
Include1Include
GRWSR6Include or exclude subregion 6 in region
Exclude0Exclude
Include1Include
HRWSR7Include or exclude subregion 7 in region
Exclude0Exclude
Include1Include
IRWSR8Include or exclude subregion 8 in region
Exclude0Exclude
Include1Include
JRWSR9Include or exclude subregion 9 in region
Exclude0Exclude
Include1Include
KRWSR10Include or exclude subregion 10 in region
Exclude0Exclude
Include1Include
LRWSR11Include or exclude subregion 11 in region
Exclude0Exclude
Include1Include
MRWSR12Include or exclude subregion 12 in region
Exclude0Exclude
Include1Include
NRWSR13Include or exclude subregion 13 in region
Exclude0Exclude
Include1Include
ORWSR14Include or exclude subregion 14 in region
Exclude0Exclude
Include1Include
PRWSR15Include or exclude subregion 15 in region
Exclude0Exclude
Include1Include
QRWSR16Include or exclude subregion 16 in region
Exclude0Exclude
Include1Include
RRWSR17Include or exclude subregion 17 in region
Exclude0Exclude
Include1Include
SRWSR18Include or exclude subregion 18 in region
Exclude0Exclude
Include1Include
Bit number313029282726252423222120191817161514131211109876543210
IdfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
TRWSR19
Exclude0
Include1
URWSR20
Exclude0
Include1
VRWSR21
Exclude0
Include1Include or exclude subregion 21 in region
WRWSR22
Exclude0Exclude or exclude subregion 22 in region
Include1Include or exclude subregion 23 in region
XRWSR23Include or exclude subregion 24 in region
Exclude0Exclude or exclude subregion 25 in region
Include1Include or exclude subregion 26 in region
YRWSR24Include or exclude subregion 27 in region
Exclude0Exclude or exclude subregion 28 in region
Include1Include or exclude subregion 29 in region
ZRWSR25Include or exclude subregion 30 in region
Exclude0Exclude or exclude subregion 31 in region
Include1Exclude or exclude subregion 32 in region
aRWSR26Include or exclude subregion 33 in region
Exclude0Exclude or exclude subregion 34 in region
Include1Include or exclude subregion 35 in region
bRWSR27Include or exclude subregion 36 in region
Exclude0Exclude or exclude subregion 37 in region
Include1Include or exclude subregion 38 in region
cRWSR28Include or exclude subregion 39 in region
Exclude0Exclude or exclude subregion 40 in region
Include1Include or exclude subregion 41 in region
dRWSR29Include or exclude subregion 42 in region
Exclude0Exclude or exclude subregion 43 in region
Include1Include or exclude subregion 44 in region
eRWSR30Include or exclude subregion 45 in region
Exclude0Exclude or exclude subregion 46 in region
Include1Include or exclude subregion 47 in region
fRWSR31Include or exclude subregion 48 in region
Exclude0Exclude or exclude subregion 49 in region
Include1Include or exclude subregion 50 in region

46 EGU — Event generator unit

The Event generator unit (EGU) provides support for inter-layer signaling. This means support for atomic triggering of both CPU execution and hardware tasks from both firmware (by CPU) and hardware (by PPI). This feature can, for instance, be used for triggering CPU execution at a lower priority execution from a higher priority execution, or to handle a peripheral's ISR execution at a lower priority for some of its events. However, triggering any priority from any priority is possible.

Listed here are the main EGU features:

• Enables SW triggering of interrupts

• 6 EGU instances – separate interrupt vectors

• Up to 16 separate event flags per interrupt for multiplexing

The EGU implements a set of tasks which can individually be triggered to generate the corresponding event, i.e., the corresponding event for TASKS_TRIGGER[n] is EVENTS_TRIGGERED[n].

Table 116: EGU configuration

EGU instanceNumber of event flags
0-516

46.1 Registers

Table 117: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40014000EGUEGU0Event Generator Unit 0
0x40015000EGUEGU1Event Generator Unit 1
0x40016000EGUEGU2Event Generator Unit 2
0x40017000EGUEGU3Event Generator Unit 3
0x40018000EGUEGU4Event Generator Unit 4
0x40019000EGUEGU5Event Generator Unit 5

Table 118: Register Overview

RegisterOffsetDescription
TASKS_TRIGGER[0]0x000Trigger 0 for triggering the corresponding TRIGGERED[0] event
TASKS_TRIGGER[1]0x004Trigger 1 for triggering the corresponding TRIGGERED[1] event
TASKS_TRIGGER[2]0x008Trigger 2 for triggering the corresponding TRIGGERED[2] event
TASKS_TRIGGER[3]0x00CTrigger 3 for triggering the corresponding TRIGGERED[3] event
TASKS_TRIGGER[4]0x010Trigger 4 for triggering the corresponding TRIGGERED[4] event
TASKS_TRIGGER[5]0x014Trigger 5 for triggering the corresponding TRIGGERED[5] event
TASKS_TRIGGER[6]0x018Trigger 6 for triggering the corresponding TRIGGERED[6] event
TASKS_TRIGGER[7]0x01CTrigger 7 for triggering the corresponding TRIGGERED[7] event
TASKS_TRIGGER[8]0x020Trigger 8 for triggering the corresponding TRIGGERED[8] event
TASKS_TRIGGER[9]0x024Trigger 9 for triggering the corresponding TRIGGERED[9] event
TASKS_TRIGGER[10]0x028Trigger 10 for triggering the corresponding TRIGGERED[10] event
TASKS_TRIGGER[11]0x02CTrigger 11 for triggering the corresponding TRIGGERED[11] event
TASKS_TRIGGER[12]0x030Trigger 12 for triggering the corresponding TRIGGERED[12] event
TASKS_TRIGGER[13]0x034Trigger 13 for triggering the corresponding TRIGGERED[13] event
TASKS_TRIGGER[14]0x038Trigger 14 for triggering the corresponding TRIGGERED[14] event
TASKS_TRIGGER[15]0x03CTrigger 15 for triggering the corresponding TRIGGERED[15] event
EVENTS_TRIGGERED[0]0x100Event number 0 generated by triggering the corresponding TRIGGER[0] task
EVENTS_TRIGGERED[1]0x104Event number 1 generated by triggering the corresponding TRIGGER[1] task
EVENTS_TRIGGERED[2]0x108Event number 2 generated by triggering the corresponding TRIGGER[2] task
EVENTS_TRIGGERED[3]0x10CEvent number 3 generated by triggering the corresponding TRIGGER[3] task
EVENTS_TRIGGERED[4]0x110Event number 4 generated by triggering the corresponding TRIGGER[4] task
EVENTS_TRIGGERED[5]0x114Event number 5 generated by triggering the corresponding TRIGGER[5] task
EVENTS_TRIGGERED[6]0x118Event number 6 generated by triggering the corresponding TRIGGER[6] task
EVENTS_TRIGGERED[7]0x11CEvent number 7 generated by triggering the corresponding TRIGGER[7] task
EVENTS_TRIGGERED[8]0x120Event number 8 generated by triggering the corresponding TRIGGER[8] task
EVENTS_TRIGGERED[9]0x124Event number 9 generated by triggering the corresponding TRIGGER[9] task
EVENTS_TRIGGERED[10]0x128Event number 10 generated by triggering the corresponding TRIGGER[10] task
EVENTS_TRIGGERED[11]0x12CEvent number 11 generated by triggering the corresponding TRIGGER[11] task
EVENTS_TRIGGERED[12]0x130Event number 12 generated by triggering the corresponding TRIGGER[12] task
EVENTS_TRIGGERED[13]0x134Event number 13 generated by triggering the corresponding TRIGGER[13] task
EVENTS_TRIGGERED[14]0x138Event number 14 generated by triggering the corresponding TRIGGER[14] task
EVENTS_TRIGGERED[15]0x13CEvent number 15 generated by triggering the corresponding TRIGGER[15] task
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt

46.1.1 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdP O N M L K J I H G F E D C B A
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTRIGGERED0
BRWTRIGGERED1
CRWTRIGGERED2
DRWTRIGGERED3
ERWTRIGGERED4
FRWTRIGGERED5
GRWTRIGGERED6
HRWTRIGGERED7
See EVENTSTriggerED[6]
Enabled1
IRWTRIGGERED8
Disabled0
Enabled1
JRWTRIGGERED9
Disabled0
Enabled1
KRWTRIGGERED10
Disabled0Enable or disable interrupt for TRIGGERED[10] event
Enabled1See EVENTSTriggerERED[10]
LRWTRIGGERED11Enable or disable interrupt for TRIGGERED[11] event
See EVENTSTriggerERED[11]
Disabled0Disable
Enabled1Enable
MRWTRIGGERED12Enable or disable interrupt for TRIGGERED[12] event
See EVENTSTriggerERED[12]
Disabled0Disable
Enabled1Enable
NRWTRIGGERED13Enable or disable interrupt for TRIGGERED[13] event
See EVENTSTriggerERED[13]
Disabled0Disable
Enabled1Enable
ORWTRIGGERED14Enable or disable interrupt for TRIGGERED[14] event
See EVENTSTriggerERED[14]
Disabled0Disable
Enabled1Enable
PRWTRIGGERED15Enable or disable interrupt for TRIGGERED[15] event
See EVENTSTriggerERED[15]
Disabled0Disable
Enabled1Enable

46.1.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdPONMLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWTRIGGERED0Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[0] event
See EVENTS_TRIGGERED[0]
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWTRIGGERED1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[1] event
See EVENTS_TRIGGERED[1]
Set1Enable
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000O0000000000000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription0
Disabled0Read: Disabled0
Enabled1Read: Enabled0
CRWTRIGGERED2
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
DRWTRIGGERED3
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWTRIGGERED4
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
FRWTRIGGERED5
Set1Enable
Disabled0Read: Disabled1Read: Enabled
Enabled1Read: Enabled
GRWTRIGGERED6
Set1Enable1Read: DisabledEnable1Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[6] event
Disabled0Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[6] event
Enabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[6] event
HRWTRIGGERED7Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[7] event
Set1Enable1Read: Disabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[7] event
Disabled0Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[7] event
Enabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[7] event
IRWTRIGGERED8Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[8] event
Set1Enable1Read: Disabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[8] event
Disabled0Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[8] event
Enabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[8] event
JRWTRIGGERED9Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[9] event
Set1Enable1Read: Disabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[9] event
Disabled0Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[9] event
Enabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[9] event
KRWTRIGGERED10Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[10] event
Set1Enable1Read: Disabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[10] event
Disabled0Read: Disabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[10] event
Enabled1Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[10] event
LRWTRIGGERED11Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[11] event
Set1Enable1Read: Disabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[11] event
Disabled0Read:Enabled1Read:Enabled1Read:Enabled1Write &#x27;1&#x27; to Enable interrupt for TRIGGERED[11] event
Bit number313029282726252423222120191817161514131211109876543210
IdP
Reset 0x000000000
IdRWFieldValue IdValue
Enabled1
MRWTRIGGERED12
Set1
Disabled0
Enabled1
NRWTRIGGERED13
Set1
Disabled0
Enabled1
ORWTRIGGERED14
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
PRWTRIGGERED15
Set1
Disabled0Read: Disabled
Enabled1Read: Enabled

46.1.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWTRIGGERED0
Clear1
Disabled0
Enabled1
BRWTRIGGERED1
Clear1
Disabled0
Enabled1
CRWTRIGGERED2
Clear1
Disabled0
Enabled1
DRWTRIGGERED3
Clear1
Disabled0
Enabled1
ERWTRIGGERED4
Bit number31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Id
Reset 0x0000000000000000000000000000000000000000000000000000000000ORWFieldValue IdValueDescription
Clear1

See EVENTS_TRIGGERED[14]

Bit number313029282726252423222120191817161514131211109876543210
IdPONMLKJIHGFEDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
PRWTRIGGERED15Write &#x27;1&#x27; to Disable interrupt for TRIGGERED[15] event
See EVENTSTriggerERED[15]
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

46.2 Electrical specification

46.2.1 EGU Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$t_{EGU,EVT}$ Latency between setting an EGU event flag and the system setting an interrupt1cycles

47 PWM — Pulse width modulation

The PWM module enables the generation of pulse width modulated signals on GPIO. The module implements an up or up-and-down counter with four PWM channels that drive assigned GPIOs.

Three PWM modules can provide up to 12 PWM channels with individual frequency control in groups of up to four channels. Furthermore, a built-in decoder and EasyDMA capabilities make it possible to manipulate the PWM duty cycles without CPU intervention. Arbitrary duty-cycle sequences are read from Data RAM and can be chained to implement ping-pong buffering or repeated into complex loops.

Listed here are the main features of one PWM module:

• Fixed PWM base frequency with programmable clock divider

• Up to four PWM channels with individual polarity and duty-cycle values

• Edge or center-aligned pulses across PWM channels

• Multiple duty-cycle arrays (sequences) defined in Data RAM

• Autonomous and glitch-free update of duty cycle values directly from memory through EasyDMA

• Change of polarity, duty-cycle, and base frequency possibly on every PWM period

• Data RAM sequences can be repeated or connected into loops


Figure 143: PWM Module

47.1 Wave counter

The wave counter is responsible for generating the pulses at a duty-cycle that depends on the compare values, and at a frequency that depends on COUNTERTOP.

There is one common 15-bit counter with four compare channels. Thus, all four channels will share the same period (PWM frequency), but can have individual duty-cycle and polarity. The polarity is set by the value read from RAM (see Figure 146: Decoder memory access modes on page 502), while the MODE register controls if the counter counts up, or up and down. 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. Respectively, OUT[n] is held high, given that the polarity is set to FallingEdge. All the compare registers are internal and can only be configured through the decoder presented later.

COUNTERTOP can be safely written at any time. It will get sampled following a START task. If DECODER.LOAD is anything else than WaveForm, it will also get sampled following a STARTSEQ[n] task, and when loading a new value from RAM during a sequence playback. If DECODER.LOAD=WaveForm, the register value is ignored, and taken from RAM instead (see Decoder with EasyDMA on page 502 below).

Figure 144: PWM up counter example - FallingEdge polarity on page 500 shows the counter operating in up (MODE=PWM_MODE_Up) mode with three PWM channels with the same frequency but different duty cycle. 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 respectively if set to COUNTERTOP given that the polarity is set to FallingEdge. Running in up counter mode will result in pulse widths that are edge-aligned. See the code example below:

uint16_t pwm_seq[4] = {PWM_CH0_DUTY, PWM_CH1_DUTY, PWM_CH2_DUTY, PWM_CH3_DUTY};
NRF_PWM0->PSEL.OUT[0] = (first_pin << PWM_PSEL_OUT_PIN_Pos) | (PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->PSEL.OUT[1] = (second_pin << PWM_PSEL_OUT_PIN_Pos) | (PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->ENABLE = (PWM_ENABLE_ENABLE_Enabled << PWM_ENABLE_ENABLE_Pos);
NRF_PWM0->MODE = (PWM_MODE_UPDOWN_Up << PWM_MODE_UPDOWN_Pos);
NRF_PWM0->PRESCALER = (PWM_PRESCALER_PRESCALER_DIV_1 << PWM_PRESCALER_PRESCALER_Pos);
NRF_PWM0->COUNTERTOP = (16000 << PWM_COUNTERTOP_COUNTERTOP_Pos); //1 msec
NRF_PWM0->LOOP = (PWM_LOOP_CNT_Disabled << PWM_LOOP_CNT_Pos);
NRF_PWM0->DECODER = (PWM_DECODER_LOAD_Individual << PWM_DECODER_LOAD_Pos) | (PWM_DECODER_MODE_RefreshCount << PWM_DECODER_MODE_Pos);
NRF_PWM0->SEQ[0].PTR = ((uint32_t)(pwm_seq) << PWM_SEQ_PTR_PTR_Pos);
NRF_PWM0->SEQ[0].CNT = ((sizeof(pwm_seq) / sizeof(uint16_t)) << PWM_SEQ_CNT_CNT_Pos);
NRF_PWM0->SEQ[0].REFRESH = 0;
NRF_PWM0->SEQ[0].ENDDDELAY = 0;
NRF_PWM0->TASKS_SEQSTART[0] = 1;


Figure 144: PWM up counter example - FallingEdge polarity

In up counting mode, the following formula can be used to compute PWM period and step size:

<div class="mineru-algorithm" style="white-space: pre-wrap; font-family:monospace;"> PWM period: $T_{PWM}(Up) = T_{PWM\_CLK} * COUNTERTOP$ </div>

Step width/Resolution: $\mathrm { T _ { S } \ t e p s ^ { = } \Delta T _ { P W M } _ C L K }$

Figure 145: PWM up-and-down counter example on page 501 shows the counter operating in up and down mode with (MODE=PWM_MODE_UpAndDown) two PWM channels with the same frequency but different duty cycle and output polarity. 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.

uint16_t pwm_seq[4] = {PWM_CH0_DUTY, PWM_CH1_DUTY, PWM_CH2_DUTY, PWM_CH3_DUTY};
NRF_PWM0->PSEL.OUT[0] = (first_pin << PWM_PSEL_OUT_PIN_Pos) | (PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->PSEL.OUT[1] = (second_pin << PWM_PSEL_OUT_PIN_Pos) | (PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->ENABLE = (PWM_ENABLE_ENABLE_Enabled << PWM_ENABLE_ENABLE_Pos);
NRF_PWM0->MODE = (PWM_MODE_UPDOWN_UpAndDown << PWM_MODE_UPDOWN_Pos);
NRF_PWM0->PRESCALER = (PWM_PRESCALER_PRESCALER_DIV_1 << PWM_PRESCALER_PRESCALER_Pos);
NRF_PWM0->COUNTERTOP = (16000 << PWM_COUNTERTOP_COUNTERTOP_Pos); //1 msec
NRF_PWM0->LOOP = (PWM_LOOP_CNT_Disabled << PWM_LOOP_CNT_Pos);
NRF_PWM0->DECODER = (PWM_DECODER_LOAD_Individual << PWM_DECODER_LOAD_Pos) | (PWM_DECODER_MODE_RefreshCount << PWM_DECODER_MODE_Pos);
NRF_PWM0->SEQ[0].PTR = ((uint32_t)(pwm_seq) << PWM_SEQ_PTR_PTR_Pos);
NRF_PWM0->SEQ[0].CNT = ((sizeof(pwm_seq) / sizeof(uint16_t)) << PWM_SEQ_CNT_CNT_Pos);
NRF_PWM0->SEQ[0].REFRESH = 0;
NRF_PWM0->SEQ[0].ENDDDELAY = 0;
NRF_PWM0->TASKS_SEQSTART[0] = 1;

Figure 145: PWM up-and-down counter example

In up-and-down counting modes, the following formula can be used to compute PWM period and step size: TPWM(Up And Down) = TPWM_CLK * 2 * COUNTERTOP

<div class="mineru-algorithm" style="white-space: pre-wrap; font-family:monospace;"> Step width/Resolution: $T_{steps} = T_{PWM\_CLK} * 2$ </div>

47.2 Decoder with EasyDMA

The decoder uses EasyDMA to take PWM parameters stored in Data RAM by ways of EasyDMA and updates the internal compare registers of the wave counter based on the mode of operation.

The mentioned PWM parameters are organized into a sequence containing at least one half word (16 bit). Its most significant bit[15] denotes the polarity of the OUT[n] while bit[14:0] is the 15-bit compare value. See below for further details of these RAM defined registers.

Bit number313029282726252423222120191817161514131211109876543210
IdBAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
ARWCOMPAREDuty cycle setting - value loaded to internal compare register
BRWPOLARITYEdge polarity of GPIO.
RisingEdge0First edge within the PWM period is rising
FallingEdge1First edge within the PWM period is falling

The DECODER register controls how the RAM content is interpreted and loaded to the internal compare registers. The LOAD field can be used to control if the RAM values are loaded to all compare channels - or alternatively to update a group or all channels with individual values. Figure 146: Decoder memory access modes on page 502 illustrates how the parameters stored in RAM are organized and routed to the various compare channels in the different modes.

A special mode of operation is available when DECODER.LOAD 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 DECODER.MODE=NextStep . The next value is loaded upon receiving every NEXTSTEP task.


Figure 146: Decoder memory access modes

SEQ[n].PTR is the pointer used to fetch COMPARE values from RAM. If the SEQ[n].PTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory on page 24 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 the number of 16-bit half words in the sequence. It is important to observe that the Grouped and Single modes require one half word per group or one half word per channel respectively, and thus increases RAM size occupation. If PWM generation was not running yet at that point, sending the SEQSTART[n] task will load the first value from RAM, 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 LOOP.CNT=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. See Figure 147: Simple sequence example on page 504 for an example of such simple playback.

To completely stop the PWM generation and force the associated pins to a defined state, a STOP task can be fired 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. 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 provides indication of when specific registers get sampled by the hardware. Care should be taken when updating these registers to avoid values to be applied earlier than expected.

Table 119: When to safely update PWM registers

RegisterTaken into account by hardwareRecommended (safe) update
SEQ[n].PTRWhen sending the SEQSTART[n] taskAfter having received the SEQSTARTED[n] event
SEQ[n].CNTWhen sending the SEQSTART[n] taskAfter having received the SEQSTARTED[n] event
SEQ[0].ENDDELAYWhen sending the SEQSTART[0] taskBefore starting sequence [0] through a SEQSTART[0] task
Every time a new value from sequence [0] has been loaded from RAM and gets applied to the Wave Counter (indicated by the PWMPERIODEND event)When no more value from sequence [0] gets loaded from RAM (indicated by the SEQEND[0] event)
At any time during sequence [1] (which starts when the SEQSTARTED[1] event is fired)
SEQ[1].ENDDELAYWhen sending the SEQSTART[1] taskBefore starting sequence [1] through a SEQSTART[1] task
Every time a new value from sequence [1] has been loaded from RAM and gets applied to the Wave Counter (indicated by the PWMPERIODEND event)When no more value from sequence [1] gets loaded from RAM (indicated by the SEQEND[1] event)
At any time during sequence [0] (which starts when the SEQSTARTED[0] event is fired)
SEQ[0].REFRESHWhen sending the SEQSTART[0] taskBefore starting sequence [0] through a SEQSTART[0] task
Every time a new value from sequence [0] has been loaded from RAM and gets applied to the Wave Counter (indicated by the PWMPERIODEND event)At any time during sequence [1] (which starts when the SEQSTARTED[1] event is fired)
SEQ[1].REFRESHWhen sending the SEQSTART[1] taskBefore starting sequence [1] through a SEQSTART[1] task
Every time a new value from sequence [1] has been loaded from RAM and gets applied to the Wave Counter (indicated by the PWMPERIODEND event)At any time during sequence [0] (which starts when the SEQSTARTED[0] event is fired)
COUNTERTOPIn DECODER.LOAD=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 (indicated by the PWMPERIODEND event)After a STOP task has been issued, and the STOPPED event has been received.
MODEImmediatelyBefore starting PWM generation through a SEQSTART[n] task
After a STOP task has been issued, and the STOPPED event has been received.
DECODERImmediatelyBefore starting PWM generation through a SEQSTART[n] task
After a STOP task has been issued, and the STOPPED event has been received.
PRESCALERImmediatelyBefore starting PWM generation through a SEQSTART[n] task
After a STOP task has been issued, and the STOPPED event has been received.
LOOPImmediatelyBefore starting PWM generation through a SEQSTART[n] task
After a STOP task has been issued, and the STOPPED event has been received.
PSEL.OUT[n]ImmediatelyBefore enabling the PWM instance through the ENABLE register

Important: 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).

Figure 147: Simple sequence example on page 504 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.

NRF_PWM0->PSEL.OUT[0] = (first_pin << PWM_PSEL_OUT_PIN_Pos) | (PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->ENABLE = (PWM_ENABLE_ENABLE_Enabled << PWM_ENABLE_ENABLE_Pos);
NRF_PWM0->MODE = (PWM_MODE_UPDOWN_Up << PWM_MODE_UPDOWN_Pos);
NRF_PWM0->PRESCALER = (PWM_PRESCALER_PRESCALER_DIV_1 << PWM_PRESCALER_PRESCALER_Pos);
NRF_PWM0->COUNTERTOP = (16000 << PWM_COUNTERTOP_COUNTERTOP_Pos); //1 msec
NRF_PWM0->LOOP = (PWM_LOOP_CNT_Disabled << PWM_LOOP_CNT_Pos);
NRF_PWM0->DECODER = (PWM_DECODER_LOAD_Common << PWM_DECODER_LOAD_Pos) | (PWM_DECODER_MODE_RefreshCount << PWM_DECODER_MODE_Pos);
NRF_PWM0->SEQ[0].PTR = ((uint32_t)(seq0_ram) << PWM_SEQ_PTR_PTR_Pos);
NRF_PWM0->SEQ[0].CNT = ((sizeof(seq0_ram) / sizeof(uint16_t)) << PWM_SEQ_CNT_CNT_Pos);
NRF_PWM0->SEQ[0].REFRESH = 0;
NRF_PWM0->SEQ[0].ENDDDELAY = 0;
NRF_PWM0->TASKS_SEQSTART[0] = 1;


Figure 147: Simple sequence example

A more complex example is shown in Figure 148: Example using two sequences on page 505, where LOOP.CNT>0 . 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 with address of values tables in Data RAM (pointed by SEQ[n].PTR) and respective 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 sequence 0 is implicit, the LOOP.CNT 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 example below, sequence 0 is defined with SEQ[0].REFRESH set to one - that means 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 LOOP.CNT is one, the playback stops after having played only once SEQ[1], and both SEQEND[1] and LOOPSDONE are generated (their order is not guaranteed in this case).

NRF_PWM0->PSEL.OUT[0] = (first_pin << PWM_PSEL_OUT_PIN_Pos) |
(PWM_PSEL_OUT_CONNECT_Connected << PWM_PSEL_OUT_CONNECT_Pos);
NRF_PWM0->ENABLE = (PWM_ENABLE_ENABLE_Enabled << PWM_ENABLE_ENABLE_Pos);
NRF_PWM0->MODE = (PWM_MODE_UPDOWN_Up << PWM_MODE_UPDOWN_Pos);
NRF_PWM0->PRESCALER = (PWM_PRESCALER_PRESCALER_DIV_1 << PWM_PRESCALER_PRESCALER_Pos);
NRF_PWM0->COUNTERTOP = (16000 << PWM_COUNTERTOP_COUNTERTOP_Pos); //1 msec
NRF_PWM0->LOOP = (1 << PWM_LOOP_CNT_Pos);
NRF_PWM0->DECODER = (PWM_DECODER_LOAD_Common << PWM_DECODER_LOAD_Pos) |
(PWM_DECODER_MODE_RefreshCount << PWM_DECODER_MODE_Pos);
NRF_PWM0->SEQ[0].PTR = ((uint32_t)(seq0_ram) << PWM_SEQ_PTR_PTR_Pos);
NRF_PWM0->SEQ[0].CNT = ((sizeof(seq0_ram) / sizeof(uint16_t)) << PWM_SEQ_CNT_CNT_Pos);
NRF_PWM0->SEQ[0].REFRESH = 1;
NRF_PWM0->SEQ[0].ENDDDELAY = 1;
NRF_PWM0->SEQ[1].PTR = ((uint32_t)(seq1_ram) << PWM_SEQ_PTR_PTR_Pos);
NRF_PWM0->SEQ[1].CNT = ((sizeof(seq1_ram) / sizeof(uint16_t)) << PWM_SEQ_CNT_CNT_Pos);
NRF_PWM0->SEQ[1].REFRESH = 0;
NRF_PWM0->SEQ[1].ENDDDELAY = 0;
NRF_PWM0->TASKS_SEQSTART[0] = 1;


Figure 148: Example using two sequences

The decoder can also be configured to asynchronously load a new PWM duty cycle. If the DECODER.MODE register is set to NextStep - then the NEXTSTEP task will cause an update of the internal compare registers on the next PWM period.

The figures below provide an overview of each part of an arbitrary sequence, in various modes (LOOP.CNT=0 and LOOP.CNT>0). In particular are represented:

• Initial and final duty cycle on the PWM output(s)

• Chaining of SEQ[0] and SEQ[1] if LOOP.CNT>0

• Influence of registers on the sequence

• Events fired during a sequence

• DMA activity (loading of next value and applying it to the output(s))

Note that the single-shot example applies also to SEQ[1], only SEQ[0] is represented for simplicity.


Figure 149: Single shot (LOOP.CNT=0)


Figure 150: Complex sequence (LOOP.CNT>0) starting with SEQ[0]


Figure 151: Complex sequence (LOOP.CNT>0) starting with SEQ[1]
Note that if a sequence is in use in a simple or complex sequence, it must have a length of SEQ[n].CNT > 0

47.3 Limitations

The previous compare value will be repeated if the PWM period is selected to be shorter than the time it takes for the EasyDMA to fetch from RAM and update the internal compare registers.

This is to ensure a glitch-free operation even if very short PWM periods are chosen.

47.4 Pin configuration

The OUT[n] (n=0..3) signals associated to each channel of the PWM module are mapped to physical pins according to the configuration specified in the respective PSEL.OUT[n] registers. If a PSEL.OUT[n].CONNECT is set to Disconnected, the associated PWM module signal will not be connected to any physical pins.

The PSEL.OUT[n] registers and their configurations are only used as long as the PWM module is enabled and PWM generation is active (wave counter started), and retained only as long as the device is in System ON mode, see POWER chapter for more information about power modes.

To ensure correct behaviour in the PWM module, the pins used by the PWM module must be configured in the GPIO peripheral as described in Table 120: Recommended GPIO configuration before starting PWM generation on page 508 before enabling the PWM module. The pins' idle state is defined by the OUT registers in the GPIO module. This is to ensure that the pins used by the PWM module are driven correctly, if PWM generation is stopped through 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 IOs 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 behaviour.

Table 120: Recommended GPIO configuration before starting PWM generation

PWM signalPWM pinDirectionOutput valueComment
OUT[n]As specified in PSEL.OUT[n](n=0..3)Output0Idle state defined in GPIO-&gt;OUT

47.5 Registers

Table 121: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x4001C000PWMPWM0Pulse Width Modulation Unit 0
0x40021000PWMPWM1Pulse Width Modulation Unit 1
0x40022000PWMPWM2Pulse Width Modulation Unit 2

Table 122: Register Overview

RegisterOffsetDescription
TASKS_STOP0x004Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback
TASKS_SEQSTART[0]0x008Loads the first PWM value on all enabled channels from sequence 0, and starts playing that sequence at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.
TASKS_SEQSTART[1]0x00CLoads the first PWM value on all enabled channels from sequence 1, and starts playing that sequence at the rate defined in SEQ[1]REFRESH and/or DECODER.MODE. Causes PWM generation to start it was not running.
TASKS_NEXTSTEP0x010Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep.Does not cause PWM generation to start it was not running.
EVENTS_STOPPED0x104Response to STOP task, emitted when PWM pulses are no longer generated
EVENTS_SEQSTARTED[0]0x108First PWM period started on sequence 0
EVENTS_SEQSTARTED[1]0x10CFirst PWM period started on sequence 1
EVENTS_SEQEND[0]0x110Emitted at end of every sequence 0, when last value from RAM has been applied to wave counter
EVENTS_SEQEND[1]0x114Emitted at end of every sequence 1, when last value from RAM has been applied to wave counter
EVENTS_PWMPERIODEN0x118Emitted at the end of each PWM period
EVENTS_LOOPSDONE0x11CConcatenated sequences have been played the amount of times defined in LOOP.CNT
SHORTS0x200Shortcut register
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500PWM module enable register
MODE0x504Selects operating mode of the wave counter
COUNTERTOP0x508Value up to which the pulse generator counter counts
PRESCALER0x50CConfiguration for PWM_CLK
DECODER0x510Configuration of the decoder
LOOP0x514Amount of playback of a loop
SEQ[0].PTR0x520Beginning address in Data RAM of this sequence
SEQ[0].CNT0x524Amount of values (duty cycles) in this sequence
SEQ[0].REFRESH0x528Amount of additional PWM periods between samples loaded into compare register
SEQ[0].ENDDDELAY0x52CTime added after the sequence
SEQ[1].PTR0x540Beginning address in Data RAM of this sequence
SEQ[1].CNT0x544Amount of values (duty cycles) in this sequence
SEQ[1].REFRESH0x548Amount of additional PWM periods between samples loaded into compare register
SEQ[1].ENDDDELAY0x54CTime added after the sequence
PSEL.OUT[0]0x560Output pin select for PWM channel 0
PSEL.OUT[1]0x564Output pin select for PWM channel 1
PSEL.OUT[2]0x568Output pin select for PWM channel 2
PSEL.OUT[3]0x56COutput pin select for PWM channel 3

47.5.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSEQEND0_STOP
Disabled0
Enabled1
BRWSEQEND1_STOP
Disabled0
Enabled1
CRWLOOPSDONE_SEQSTART0Shortcut between LOOPSDONE event and SEQSTART[0] task
See EVENTS_LOOPSDONE and TASKS_SEQSTART[0]
Disabled0Disable shortcut
Enabled1Enable shortcut
DRWLOOPSDONE_SEQSTART1Shortcut between LOOPSDONE event and SEQSTART[1] task
See EVENTS_LOOPSDONE and TASKS_SEQSTART[1]
Disabled0Disable shortcut
Enabled1Enable shortcut
ERWLOOPSDONE_STOPShortcut between LOOPSDONE event and STOP task
See EVENTS_LOOPSDONE and TASKS_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut

47.5.2 INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdHGFEDCB
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWSTOPPED
Disabled0
Enabled1
CRWSEQSTARTED0
Disabled0Disable
Enabled1Enable
DRWSEQSTARTED1Enable or disable interrupt for SEQSTARTED[0] event
See EVENTS_SEQSTARTED[0]
Disabled0Disable
Enabled1Enable
ERWSEQEND0Enable or disable interrupt for SEQEND[0] event
See EVENTS_SEQEND[0]
Disabled0Disable
Enabled1Enable
FRWSEQEND1Enable or disable interrupt for SEQEND[1] event
Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
GRWPWMPERIODEND
Disabled0Disable
Enabled1Enable
HRWLOOPSDONE
See EVENTS_LOOPSDONE
Disabled0Disable
Enabled1Enable

47.5.3 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWSTOPPED
Set1
Disabled0
Enabled1
CRWSEQSTARTED0
Set1
Disabled0
Enabled1
DRWSEQSTARTED1
Set1
Disabled0
Enabled1
ERWSEQEND0
Set1Enable
Disabled0
Enabled1Read: Disabled
FRWSEQEND1
Write '1' to Enable interrupt for SEQEND[1] event
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
GRWPWMPERIODENDWrite '1' to Enable interrupt for PWMPERIODEND event
See EVENTS_PWMPERIODEND
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWLOOPSDONEWrite '1' to Enable interrupt for LOOPSDONE event
IdHGFEDCB
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValueDescription
See EVENTS_LOOPSDONE
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

47.5.4 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
Id
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
BRWSTOPPED
Clear1
Disabled0
Enabled1
CRWSEQSTARTED0
Clear1
Disabled0
Enabled1
DRWSEQSTARTED1
Clear1
Disabled0
Enabled1
ERWSEQEND0
Clear1Disable
Disabled0
Enabled1Read: Disabled
FRWSEQEND1
Write &#x27;1&#x27; to Disable interrupt for SEQEND[0] event
Clear1
Disabled0
Enabled1See EVENTS_SEQEND[0]
GRWPWMPERIODENDWrite &#x27;1&#x27; to Disable interrupt for SEQEND[1] event
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
HRWLOOPSDONEWrite &#x27;1&#x27; to Disable interrupt for LOOPSDONE event
Clear1See EVENTS_LOOPSDONE
Disabled0Disable
Enabled1Read: Disabled

47.5.5 ENABLE

Address offset: 0x500

PWM module enable register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled1

47.5.6 MODE

Address offset: 0x504

Selects operating mode of the wave counter

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWUPDOWN
Up0
UpAndDown1

47.5.7 COUNTERTOP

Address offset: 0x508

Value up to which the pulse generator counter counts

Bit number
Id
Reset 0x000003FF
IdRWFieldValue IdValueDescription
ARWCOUNTERTOP[3..32767]Value up to which the pulse generator counter counts. This register is ignored when DECODER.MODE=WaveForm and only values from RAM will be used.

47.5.8 PRESCALER

Address offset: 0x50C

Configuration for PWM_CLK

Bit number313029282726252423222120191817161514131211109876543210
IdAAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWPRESCALER
DIV_10
DIV_21
DIV_42
DIV_83
DIV_164
DIV_325
DIV_646
DIV_1287

47.5.9 DECODER

Address offset: 0x510

Configuration of the decoder

Bit number313029282726252423222120191817161514131211109876543210
IdBAA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWLOAD
Common0
Grouped1
Individual2
WaveForm3
BRWMODE
RefreshCount0
NextStep1

47.5.10 LOOP

Address offset: 0x514

Amount of playback of a loop

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCNTAmount of playback of pattern cycles
Disabled0Looping disabled (stop at the end of the sequence)

47.5.11 SEQ[0].PTR

Address offset: 0x520

Beginning address in Data RAM of this sequence

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRBeginning address in Data RAM of this sequence

47.5.12 SEQ[0].CNT

Address offset: 0x524

Amount of values (duty cycles) in this sequence

47.5.13 SEQ[0].REFRESH

Address offset: 0x528

Amount of additional PWM periods between samples loaded into compare register

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValueDescription
ARWCNTAmount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)
Continuous0Update every PWM period

47.5.14 SEQ[0].ENDDELAY

Address offset: 0x52C

Time added after the sequence

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCNTTime added after the sequence in PWM periods

47.5.15 SEQ[1].PTR

Address offset: 0x540

Beginning address in Data RAM of this sequence

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWPTRBeginning address in Data RAM of this sequence

47.5.16 SEQ[1].CNT

Address offset: 0x544

Amount of values (duty cycles) in this sequence

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCNTAmount of values (duty cycles) in this sequence
Disabled0Sequence is disabled, and shall not be started as it is empty

47.5.17 SEQ[1].REFRESH

Address offset: 0x548

Amount of additional PWM periods between samples loaded into compare register

Bit number
Id
Reset 0x00000001
IdRWFieldValue IdValueDescription
ARWCNTAmount of additional PWM periods between samples loaded into compare register (load every REFRESH.CNT+1 PWM periods)
Continuous0Update every PWM period

47.5.18 SEQ[1].ENDDELAY

Address offset: 0x54C

Time added after the sequence

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWCNTTime added after the sequence in PWM periods

47.5.19 PSEL.OUT[0]

Address offset: 0x560

Output pin select for PWM channel 0

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

47.5.20 PSEL.OUT[1]

Address offset: 0x564

Output pin select for PWM channel 1

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

47.5.21 PSEL.OUT[2]

Address offset: 0x568

Output pin select for PWM channel 2

Bit number313029282726252423222120191817161514131211109876543210
IdCAAAAA
Reset 0xFFFFFFF111111111111111111111111111111111
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
CRWCONNECTConnection
Disconnected1Disconnect
Connected0Connect

47.5.22 PSEL.OUT[3]

Address offset: 0x56C

Output pin select for PWM channel 3

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPIN[0..31]Pin number
IdRWFieldValue IdValue
CRWCONNECT
Disconnected1
Connected0

47.6 Electrical specification

47.6.1 PWM Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
$I_{PWM,16MHz}$ PWM run current, Prescaler set to DIV_1 (16 MHz), excluding DMA and GPIO200μA
$I_{PWM,8MHz}$ PWM run current, Prescaler set to DIV_2 (8 MHz), excluding DMA and GPIO150μA
$I_{PWM,125kHz}$ PWM run current, Prescaler set to DIV_128 (125 kHz), excluding DMA and GPIO150μA

48 SPI — Serial peripheral interface master

The SPI master provides a simple CPU interface which includes a TXD register for sending data and an RXD register for receiving data. This section is added for legacy support for now.


Figure 152: SPI master
RXD-1 and TXD+1 illustrate the double buffered version of RXD and TXD respectively.

48.1 Functional description

The TXD and RXD registers are double-buffered to enable some degree of uninterrupted data flow in and out of the SPI master.

The SPI master 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 SPI master supports SPI modes 0 through 3.

Table 123: SPI modes

ModeClock polarityCPOLClock phaseCPHA
SPI_MODE0 (Leading)0 (Active High)
SPI_MODE0 (Leading)1 (Active Low)
SPI_MODE1 (Trailing)0 (Active High)
SPI_MODE1 (Trailing)1 (Active Low)

48.1.1 SPI master mode pin configuration

The different signals SCK, MOSI, and MISO associated with the SPI master are mapped to physical pins.

This mapping is according to the configuration specified in the PSELSCK, PSELMOSI, and PSELMISO registers respectively. If a value of 0xFFFFFFFF is specified in any of these registers, the associated SPI master signal is not connected to any physical pin. The PSELSCK, PSELMOSI, and PSELMISO registers and their configurations are only used as long as the SPI master is enabled, and retained only as long as the device is in ON mode. PSELSCK, PSELMOSI, and PSELMISO must only be configured when the SPI master is disabled.

To secure correct behavior in the SPI, the pins used by the SPI must be configured in the GPIO peripheral as described in Table 124: GPIO configuration on page 518 prior to enabling the SPI. The SCK must

always be connected to a pin, and that pin's input buffer must always be connected for the SPI to work. This configuration must be retained in the GPIO for the selected IOs as long as the SPI 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.

Table 124: GPIO configuration

SPI master signalSPI master pinDirectionOutput value
SCKAs specified in PSELSCKOutputSame as CONFIG.CPOL
MOSIAs specified in PSELMOSIOutput0
MISOAs specified in PSELMISOInputNot applicable

48.1.2 Shared resources

The SPI shares registers and other resources with other peripherals that have the same ID as the SPI. Therefore, the user must disable all peripherals that have the same ID as the SPI before the SPI can be configured and used.

Disabling a peripheral that has the same ID as the SPI will not reset any of the registers that are shared with the SPI. It is therefore important to configure all relevant SPI registers explicitly to secure that it operates correctly.

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

48.1.3 SPI master transaction sequence

An SPI master transaction is started by writing the first byte, which is to be transmitted by the SPI master, to the TXD register.

Since the transmitter is double buffered, the second byte can be written to the TXD register immediately after the first one. The SPI master will then send these bytes in the order they are written to the TXD register.

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 Figure 153: SPI master transaction on page 519. Bytes that are received will be moved to the RXD register where the CPU can extract them by reading the register. The RXD register is double buffered in the same way as the TXD register, and a second byte can therefore be received at the same time as the first byte is being extracted from RXD by the CPU. The SPI master will generate a READY event every time a new byte is moved to the RXD register. The double buffered byte will be moved from RXD-1 to RXD as soon as the first byte is extracted from RXD. The SPI master will stop when there are no more bytes to send in TXD and TXD+1.


Figure 153: SPI master transaction

The READY event of the third byte transaction is delayed until B is extracted from RXD in occurrence number 3 on the horizontal lifeline. The reason for this is that the third event is generated first when C is moved from RXD-1 to RXD after B is read.

The SPI master will move the incoming byte to the RXD register after a short delay following the SCK clock period of the last bit in the byte. This also means that the READY event will be delayed accordingly, see Figure 154: SPI master transaction on page 519. Therefore, it is important that you always clear the READY event, even if the RXD register and the data that is being received is not used.


Figure 154: SPI master transaction

48.2 Registers

Table 125: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000SPISPI0SPI master 0Deprecated
0x40004000SPISPI1SPI master 1Deprecated
0x40023000SPISPI2SPI master 2Deprecated

Table 126: Register Overview

RegisterOffsetDescription
EVENTS_READY0x108TXD byte sent and RXD byte received
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ENABLE0x500Enable SPI
PSELSCK0x508Pin select for SCKDeprecated
PSELMOSI0x50CPin select for MOSIDeprecated
PSELMISO0x510Pin select for MISODeprecated
PSEL.SCK0x508Pin select for SCK
PSEL.MOSI0x50CPin select for MOSI
PSEL.MISO0x510Pin select for MISO
RXD0x518RXD register
TXD0x51CTXD register
FREQUENCY0x524SPI frequency
CONFIG0x554Configuration register

48.2.1 INTENSET

Address offset: 0x304

Enable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWREADYWrite &#x27;1&#x27; to Enable interrupt for READY event
See EVENTS_READY
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

48.2.2 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWREADYWrite &#x27;1&#x27; to Disable interrupt for READY event
See EVENTS_READY
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

48.2.3 ENABLE

Address offset: 0x500

Enable SPI

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValue
ARWENABLE
Disabled0
Enabled1

48.2.4 PSELSCK ( Deprecated )

Address offset: 0x508

Pin select for SCK

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELSCK[0..31]Pin number configuration for SPI SCK signal
Disconnected0xFFFFFFFDisconnect

48.2.5 PSELMOSI ( Deprecated )

Address offset: 0x50C

Pin select for MOSI

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELMOSI[0..31]Pin number configuration for SPI MOSI signal
Disconnected0xFFFFFFFDisconnect

48.2.6 PSELMISO ( Deprecated )

Address offset: 0x510

Pin select for MISO

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELMISO[0..31]Pin number configuration for SPI MISO signal
Disconnected0xFFFFFFFDisconnect

48.2.7 PSEL.SCK

Address offset: 0x508

Pin select for SCK

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELSCK[0..31]Pin number configuration for SPI SCK signal
Disconnected0xFFFFFFFDisconnect

48.2.8 PSEL.MOSI

Address offset: 0x50C

Pin select for MOSI

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELMOSI[0..31]Pin number configuration for SPI MOSI signal
Disconnected0xFFFFFFFDisconnect

48.2.9 PSEL.MISO

Address offset: 0x510

Pin select for MISO

Bit number
Id
Reset 0xFFFFFFF

48.2.10 RXD

Address offset: 0x518

RXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRXDRX data received. Double buffered

48.2.11 TXD

Address offset: 0x51C

TXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTXDTX data to send. Double buffered

48.2.12 FREQUENCY

Address offset: 0x524

SPI frequency

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWFREQUENCYSPI master data rate
K1250x02000000125 kbps
K2500x04000000250 kbps
K5000x08000000500 kbps
M1M20x100000000x200000001 Mbps2 Mbps
M40x400000004 Mbps
M80x800000008 Mbps

48.2.13 CONFIG

Address offset: 0x554

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWORDER
MsbFirst0
LsbFirst1
BRWCPHA
Leading0
Trailing1
CRWCPOL
ActiveHigh0
ActiveLow1

48.3 Electrical specification

48.3.1 SPI master interface

SymbolDescriptionMin.Typ.Max.Units
$f_{SPI}$ Bit rates for $SPI^{38}$ $8^{39}$ Mbps
$I_{SPI,2Mbps}$ Run current for SPI, 2 Mbps50μA
$I_{SPI,8Mbps}$ Run current for SPI, 8 Mbps50μA
$I_{SPI,IDLE}$ Idle current for SPI (STARTed, no CSN activity)&lt;1μA
$t_{SPI,START,LP}$ Time from writing TXD register to transmission started, low power mode $t_{SPI,START,CL}$ + $t_{START_HFIN}$ μs
$t_{SPI,START,CL}$ Time from writing TXD register to transmission started, constant latency mode1μs

48.3.2 Serial Peripheral Interface (SPI) Master timing specifications

SymbolDescriptionMin.Typ.Max.Units
$t_{SPI,CSCK,8Mbps}$ SCK period at 8Mbps125ns
$t_{SPI,CSCK,4Mbps}$ SCK period at 4Mbps250ns
$t_{SPI,CSCK,2Mbps}$ SCK period at 2Mbps500ns
$t_{SPI,RSCK,LD}$ SCK rise time, low drive $^{a}$ $t_{RF,25pF}$
$t_{SPI,RSCK,HD}$ SCK rise time, high drive $^{a}$ $t_{HRF,25pF}$
$t_{SPI,FSCK,LD}$ SCK fall time, low drive $^{a}$ $t_{RF,25pF}$
$t_{SPI,FSCK,HD}$ SCK fall time, high drive $^{a}$ $t_{HRF,25pF}$

38 Higher bit rates may require GPIOs to be set as High Drive, see GPIO chapter for more details.
39 The actual maximum data rate depends on the slave's CLK to MISO and MOSI setup and hold timings.
a At 25pF load, including GPIO capacitance, see GPIO spec.

SymbolDescriptionMin.Typ.Max.Units
$t_{SPI, WHSCK}$ SCK high time $^{a}$ (0.5*t $_{CSCK}$ )
-t $_{RSCK}$
$t_{SPI, WLSCK}$ SCK low time $^{a}$ (0.5*t $_{CSCK}$ )
-t $_{FSCK}$
$t_{SPI, SUMI}$ MISO to CLK edge setup time19ns
$t_{SPI, HMI}$ CLK edge to MISO hold time18ns
$t_{SPI, VMO}$ CLK edge to MOSI valid59ns
$t_{SPI, HMO}$ MOSI hold time after CLK edge20ns


Figure 155: SPI master timing diagram

49 TWI — I2C compatible two-wire interface

The TWI master is compatible with I2C operating at 100 kHz and 400 kHz.


Figure 156: TWI master's main features

49.1 Functional description

This TWI master is not compatible with CBUS. The TWI transmitter and receiver are single buffered. See, Figure 156: TWI master's main features on page 525.

A TWI setup comprising one master and three slaves is illustrated in Figure 157: A typical TWI setup comprising one master and three slaves on page 525. This TWI master is only able to operate as the only master on the TWI bus.


Figure 157: A typical TWI setup comprising one master and three slaves

This TWI master supports clock stretching performed by the slaves. The TWI master is started by triggering the STARTTX or STARTRX tasks, and stopped by triggering the STOP task.

If a NACK is clocked in from the slave, the TWI master will generate an ERROR event.

49.2 Master mode pin configuration

The different signals SCL and SDA associated with the TWI master are mapped to physical pins according to the configuration specified in the PSELSCL and PSELSDA registers respectively.

If a value of 0xFFFFFFFF is specified in any of these registers, the associated TWI master signal is not connected to any physical pin. The PSELSCL and PSELSDA registers and their configurations are only used as long as the TWI master is enabled, and retained only as long as the device is in ON mode. PSELSCL and PSELSDA must only be configured when the TWI 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 Table 127: GPIO configuration on page 526.

Only one peripheral can be assigned to drive a particular GPIO pin at a time, failing to do so may result in unpredictable behavior.

Table 127: GPIO configuration

TWI master signalTWI master pinDirectionDrive strengthOutput value
SCLAs specified in PSELSCLInputS0D1Not applicable
SDAAs specified in PSELSDAInputS0D1Not applicable

49.3 Shared resources

The TWI shares registers and other resources with other peripherals that have the same ID as the TWI.

Therefore, you must disable all peripherals that have the same ID as the TWI before the TWI can be configured and used. Disabling a peripheral that has the same ID as the TWI will not reset any of the registers that are shared with the TWI. It is therefore important to configure all relevant TWI registers explicitly to secure that it operates correctly.

The Instantiation table in Instantiation on page 25 shows which peripherals have the same ID as the TWI.

49.4 Master write sequence

A TWI master write sequence is started by triggering the STARTTX task. After the STARTTX task has been triggered, the TWI master will generate a start condition on the TWI bus, followed by clocking out the address and the READ/WRITE bit set to 0 (WRITE=0, READ=1).

The address must match the address of the slave device that the master wants to write to. The READ/ WRITE bit is followed by an ACK/NACK bit (ACK=0 or NACK=1) generated by the slave.

After receiving the ACK bit, the TWI master will clock out the data bytes that are written to the TXD register. Each byte clocked out from the master will be followed by an ACK/NACK bit clocked in from the slave. A TXDSENT event will be generated each time the TWI master has clocked out a TXD byte, and the associated ACK/NACK bit has been clocked in from the slave.

The TWI master transmitter is single buffered, and a second byte can only be written to the TXD register after the previous byte has been clocked out and the ACK/NACK bit clocked in, that is, after the TXDSENT event has been generated.

If the CPU is prevented from writing to TXD when the TWI master is ready to clock out a byte, the TWI master will stretch the clock until the CPU has written a byte to the TXD register.

A typical TWI master write sequence is illustrated in Figure 158: The TWI master writing data to a slave on page 527. Occurrence 3 in the figure illustrates delayed processing of the TXDSENT event associated with TXD byte 1. In this scenario the TWI master will stretch the clock to prevent writing erroneous data to the slave.


Figure 158: The TWI master writing data to a slave

The TWI master write sequence is stopped when the STOP task is triggered whereupon the TWI master will generate a stop condition on the TWI bus.

49.5 Master read sequence

A TWI master read sequence is started by triggering the STARTRX task. After the STARTRX task has been triggered the TWI master will generate a start condition on the TWI bus, followed by clocking out the 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.

The TWI master will generate a RXDRDY event every time a new byte is received in the RXD register.

After receiving a byte, the TWI master will delay sending the ACK/NACK bit by stretching the clock until the CPU has extracted the received byte, that is, by reading the RXD register.

The TWI master read sequence is stopped by triggering the STOP task. This task must be triggered before the last byte is extracted from RXD to ensure that the TWI master sends a NACK back to the slave before generating the stop condition.

A typical TWI master read sequence is illustrated in Figure 159: The TWI master reading data from a slave on page 528. Occurrence 3 in this figure illustrates delayed processing of the RXDRDY event associated with RXD byte B. In this scenario the TWI master will stretch the clock to prevent the slave from overwriting the contents of the RXD register.


Figure 159: The TWI master reading data from a slave

49.6 Master repeated start sequence

A typical repeated start sequence is one in which the TWI master writes one byte to the slave followed by reading M bytes from the slave. Any combination and number of transmit and receive sequences can be combined in this fashion. Only one shortcut to STOP can be enabled at any given time.

The figure below illustrates a repeated start sequence where the TWI master writes one byte, followed by reading M bytes from the slave without performing a stop in-between.


Figure 160: A repeated start sequence, where the TWI master writes one byte, followed by reading M bytes from the slave without performing a stop in-between

To generate a repeated start after a read sequence, a second start task must be triggered instead of the STOP task, that is, STARTRX or STARTTX. This start task must be triggered before the last byte is extracted from RXD to ensure that the TWI master sends a NACK back to the slave before generating the repeated start condition.

49.7 Low power

When putting the system in low power and the peripheral is not needed, lowest possible power consumption is achieved by stopping, and then disabling the peripheral.

The STOP task may not be always needed (the peripheral might already be stopped), but if it is sent, software shall wait until the STOPPED event was received as a response before disabling the peripheral through the ENABLE register.

49.8 Registers

Table 128: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40003000TWITWI0Two-wire interface master 0Deprecated
0x40004000TWITWI1Two-wire interface master 1Deprecated

Table 129: Register Overview

RegisterOffsetDescription
TASKS_STARTRX0x000Start TWI receive sequence
TASKS_STARTTX0x008Start TWI transmit sequence
TASKS_STOP0x014Stop TWI transaction
TASKS_SUSPEND0x01CSuspend TWI transaction
TASKS_RESUME0x020Resume TWI transaction
EVENTS_STOPPED0x104TWI stopped
EVENTS_RXDREADY0x108TWI RXD byte received
EVENTS_TXDSENT0x11CTWI TXD byte sent
EVENTS_ERROR0x124TWI error
EVENTS_BB0x138TWI byte boundary, generated before each byte that is sent or received
EVENTS_SUSPENDED0x148TWI entered the suspended state
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x4C4Error source
ENABLE0x500Enable TWI
PSELSCL0x508Pin select for SCL
PSELSDA0x50CPin select for SDA
RXD0x518RXD register
TXD0x51CTXD register
FREQUENCY0x524TWI frequency
ADDRESS0x588Address used in the TWI transfer

49.8.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWRR, SUSPENDShortcut between RR event and SUSPEND task

Shortcut between BB event and SUSPEND task

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
Disabled0
Enabled1
BRWBB_STOP
Disabled0Disable shortcut
Enabled1Enable shortcut

49.8.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdF
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
Set1
Disabled0
Enabled1
BRWRXDREADY
Set1
Disabled0
Enabled1
CRWTXDSENT
Set1
Disabled0
Enabled1
DRWERROR
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
ERWBB
Set1
Disabled0
Enabled1
FRWSUSPENDED
Set1
Disabled0
Enabled1

49.8.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdF
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWSTOPPED
BRWRXDREADY
Write &#x27;1&#x27; to Disable interrupt for RXDREADY event
See EVENTS_STOPPEDY
Disable
Read: Disabled
Read: Enabled
CRWTXDSENTWrite &#x27;1&#x27; to Disable interrupt for TXDSENT event
See EVENTS_TXDSENT
Disable
Read: Disabled
Read: Enabled
DRWERRORWrite &#x27;1&#x27; to Disable interrupt for ERROR event
See EVENTS_ERROR
Disable
Read: Disabled
Clear1Read: Enabled
ERWBBWrite &#x27;1&#x27; to Disable interrupt for BB event
See EVENTS_BB
Disable
Clear1Read: Disabled
Disabled0Read: Enabled
Enabled1Write &#x27;1&#x27; to Disable interrupt for SUSPENDED event
FRWSUSPENDEDSee EVENTS_SUSPENDED
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

49.8.4 ERRORSRC

Address offset: 0x4C4

Error source

Bit number313029282726252423222120191817161514131211109876543210
IdCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERRUN
NotPresent0Read: no overrun occurred
Present1Read: overrun occurred
Clear1Write: clear error on writing &#x27;1&#x27;
BRWANACKNACK received after sending the address (write &#x27;1&#x27; to clear)
NotPresent0Read: error not present
Present1Read: error present
Clear1Write: clear error on writing &#x27;1&#x27;
CRWDNACKNACK received after sending a data byte (write &#x27;1&#x27; to clear)
NotPresent0Read: error not present
Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
Present1Read: error present
Clear1Write: clear error on writing &#x27;1&#x27;

49.8.5 ENABLE

Address offset: 0x500

Enable TWI

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled5

49.8.6 PSELSCL

Address offset: 0x508

Pin select for SCL

Bit number
Id
Reset 0xFFFFFFF

49.8.7 PSELSDA

Address offset: 0x50C

Pin select for SDA

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELSDA[0..31]Pin number configuration for TWI SDA signal
Disconnected0xFFFFFFFDisconnect

49.8.8 RXD

Address offset: 0x518

RXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRXDRXD register

49.8.9 TXD

Address offset: 0x51C

TXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWTXDTXD register

49.8.10 FREQUENCY

Address offset: 0x524

TWI frequency

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWFREQUENCYTWI master clock frequency
K1000x01980000100 kbps
K2500x04000000250 kbps
K4000x06680000400 kbps (actual rate 410.256 kbps)

49.8.11 ADDRESS

Address offset: 0x588

Address used in the TWI transfer

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWADDRESSAddress used in the TWI transfer

49.9 Electrical specification

49.9.1 TWI interface electrical specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{TWI}$ Bit rates for $TWI^{40}$ 100400kbps
$I_{TWI,100kbps}$ Run current for TWI, 100 kbps50μA
$I_{TWI,400kbps}$ Run current for TWI, 400 kbps50μA
$t_{TWI,START,LP}$ Time from STARTRX/STARTTX task to transmission started, Low power mode $t_{TWI,START,C}$ μs
+
$t_{START\_HFIN}$
$t_{TWI,START,CL}$ Time from STARTRX/STARTTX task to transmission started,1.5μs

49.9.2 Two Wire Interface (TWI) timing specifications

SymbolDescriptionMin.Typ.Max.Units
$f_{TWI,SCL,100kbps}$ SCL clock frequency, 100 kbps100kHz
$f_{TWI,SCL,250kbps}$ SCL clock frequency, 250 kbps250kHz
$f_{TWI,SCL,400kbps}$ SCL clock frequency, 400 kbps400kHz
$t_{TWI,SU_DAT}$ Data setup time before positive edge on SCL – all modes300ns
$t_{TWI,HD_DAT}$ Data hold time after negative edge on SCL – all modes500ns
$t_{TWI,HD_STA,100kbps}$ TWI master hold time for START and repeated START condition, 100 kbps10000ns
$t_{TWI,HD\_STA,250kbps}$ TWI master hold time for START and repeated START condition, 250kbps4000ns
$t_{TWI,HD\_STA,400kbps}$ TWI master hold time for START and repeated START condition, 400 kbps2500ns
$t_{TWI,SU\_STO,100kbps}$ TWI master setup time from SCL high to STOP condition, 100 kbps5000ns
$t_{TWI,SU\_STO,250kbps}$ TWI master setup time from SCL high to STOP condition, 250 kbps2000ns
$t_{TWI,SU\_STO,400kbps}$ TWI master setup time from SCL high to STOP condition, 400 kbps1250ns
$t_{TWI,BUF,100kbps}$ TWI master bus free time between STOP and START conditions, 100 kbps5800ns
$t_{TWI,BUF,250kbps}$ TWI master bus free time between STOP and START conditions, 250 kbps2700ns
$t_{TWI,BUF,400kbps}$ TWI master bus free time between STOP and START conditions, 400 kbps2100ns


Figure 161: TWI timing diagram, 1 byte transaction

50 UART — Universal asynchronous receiver/ transmitter


Figure 162: UART configuration

50.1 Functional description

Listed here are the main features of UART.

The UART implements support for the following features:

• Full-duplex operation

• Automatic flow control

• Parity checking and generation for the ${ \mathfrak { g } } ^ { \mathfrak { t h } }$ data bit

As illustrated in Figure 162: UART configuration on page 535, the UART uses the TXD and RXD registers directly to transmit and receive data. The UART uses one stop bit.

50.2 Pin configuration

The different signals RXD, CTS (Clear To Send, active low), RTS (Request To Send, active low), and TXD associated with the UART are mapped to physical pins according to the configuration specified in the PSELRXD, PSELCTS, PSELRTS, and PSELTXD registers respectively.

If a value of 0xFFFFFFFF is specified in any of these registers, the associated UART signal will not be connected to any physical pin. The PSELRXD, PSELCTS, PSELRTS, and PSELTXD registers and their configurations are only used as long as the UART is enabled, and retained only for the duration the device is in ON mode. PSELRXD, PSELCTS, PSELRTS and PSELTXD must only be configured when the UART is disabled.

To secure correct signal levels on the pins by the UART when the system is in OFF mode, the pins must be configured in the GPIO peripheral as described in Pin configuration on page 535.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 130: GPIO configuration

UART pinDirectionOutput value
RXDInputNot applicable
CTSInputNot applicable
RTSOutput1
TXDOutput1

50.3 Shared resources

The UART shares registers and other resources with other peripherals that have the same ID as the UART.

Therefore, you must disable all peripherals that have the same ID as the UART before the UART can be configured and used. Disabling a peripheral that has the same ID as the UART will not reset any of the registers that are shared with the UART. It is therefore important to configure all relevant UART registers explicitly to ensure that it operates correctly.

See the Instantiation table in Instantiation on page 25 for details on peripherals and their IDs.

50.4 Transmission

A UART transmission sequence is started by triggering the STARTTX task.

Bytes are transmitted by writing to the TXD register. When a byte has been successfully transmitted the UART will generate a TXDRDY event after which a new byte can be written to the TXD register. A UART transmission sequence is stopped immediately by triggering the STOPTX task.

If flow control is enabled a transmission will be automatically suspended when CTS is deactivated and resumed when CTS is activated again, as illustrated in Figure 163: UART transmission on page 536. A byte that is in transmission when CTS is deactivated will be fully transmitted before the transmission is suspended. For more information, see Suspending the UART on page 537.


Figure 163: UART transmission

50.5 Reception

A UART reception sequence is started by triggering the STARTRX task.

The UART receiver chain implements a FIFO capable of storing six incoming RXD bytes before data is overwritten. Bytes are extracted from this FIFO by reading the RXD register. When a byte is extracted from the FIFO a new byte pending in the FIFO will be moved to the RXD register. The UART will generate an RXDRDY event every time a new byte is moved to the RXD register.

When flow control is enabled, the UART will deactivate the RTS signal when there is only space for four more bytes in the receiver FIFO. The counterpart transmitter is therefore able to send up to four bytes after the RTS signal is deactivated before data is being overwritten. To prevent overwriting data in the FIFO, the counterpart UART transmitter must therefore make sure to stop transmitting data within four bytes after the RTS line is deactivated.

The RTS signal will first be activated again when the FIFO has been emptied, that is, when all bytes in the FIFO have been read by the CPU, see Figure 164: UART reception on page 537.

The RTS signal will also be deactivated when the receiver is stopped through the STOPRX task as illustrated in Figure 164: UART reception on page 537. The UART is able to receive four to five additional bytes if they are sent in succession immediately after the RTS signal has been deactivated. This is possible because the UART is, even after the STOPRX task is triggered, able to receive bytes for an extended period of time dependent on the configured baud rate. The UART will generate a receiver timeout event (RXTO) when this period has elapsed.

To prevent loss of incoming data the RXD register must only be read one time following every RXDRDY event.

To secure that the CPU can detect all incoming RXDRDY events through the RXDRDY event register, the RXDRDY event register must be cleared before the RXD register is read. The reason for this is that the UART is allowed to write a new byte to the RXD register, and therefore can also generate a new event, immediately after the RXD register is read (emptied) by the CPU.


Figure 164: UART reception

As indicated in occurrence 2 in the figure, the RXDRDY event associated with byte B is generated first after byte A has been extracted from RXD.

50.6 Suspending the UART

The UART can be suspended by triggering the SUSPEND task.

SUSPEND will affect both the UART receiver and the UART transmitter, i.e. the transmitter will stop transmitting and the receiver will stop receiving. UART transmission and reception can be resumed, after being suspended, by triggering STARTTX and STARTRX respectively.

Following a SUSPEND task, an ongoing TXD byte transmission will be completed before the UART is suspended.

When the SUSPEND task is triggered, the UART receiver will behave in the same way as it does when the STOPRX task is triggered.

50.7 Error conditions

An ERROR event, in the form of a framing error, will be generated if a valid stop bit is not detected in a frame. Another ERROR event, in the form of a break condition, will be generated if the RXD line is held active low for longer than the length of a data frame. Effectively, a framing error is always generated before a break condition occurs.

50.8 Using the UART without flow control

If flow control is not enabled, the interface will behave as if the CTS and RTS lines are kept active all the time.

50.9 Parity configuration

When parity is enabled, the parity will be generated automatically from the even parity of TXD and RXD for transmission and reception respectively.

50.10 Registers

Table 131: Instances

Base addressPeripheralInstanceDescriptionConfiguration
0x40002000UARTUART0Universal Asynchronous Receiver/TransmitterDeprecated

Table 132: Register Overview

RegisterOffsetDescription
TASKS_STARTRX0x000Start UART receiver
TASKS_STOPRX0x004Stop UART receiver
TASKS_STARTTX0x008Start UART transmitter
TASKS_STOPTX0x00CStop UART transmitter
TASKS_SUSPEND0x01CSuspend UART
EVENTS_CTS0x100CTS is activated (set low). Clear To Send.
EVENTS_NCTS0x104CTS is deactivated (set high). Not Clear To Send.
EVENTS_RXDRDY0x108Data received in RXD
EVENTS_TXDRDY0x11CData sent from TXD
EVENTS_ERROR0x124Error detected
EVENTS_RXTO0x144Receiver timeout
SHORTS0x200Shortcut register
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
ERRORSRC0x480Error source
ENABLE0x500Enable UART
PSELRTS0x508Pin select for RTS
PSELTXD0x50CPin select for TXD
PSELCTS0x510Pin select for CTS
PSELRXD0x514Pin select for RXD
RXD0x518RXD register
TXD0x51CTXD register
BAUDRATE0x524Baud rate
CONFIG0x56CConfiguration of parity and hardware flow control

50.10.1 SHORTS

Address offset: 0x200

Shortcut register

Bit number313029282726252423222120191817161514131211109876543210
IdBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCTS_STARTRX
Disabled0
Enabled1
BRWNCTS_STOPRX
Disabled0Disable shortcut
Enabled1Enable shortcut

50.10.2 INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCTS
Set1
Disabled0
Enabled1
BRWNCTS
Set1
Disabled0
Enabled1
CRWRXDRDY
Set1
Disabled0
Enabled1
DRWTXDRDY
Set1
Disabled0
Enabled1
ERWERROR
Set1
Disabled0
Enabled1
FRWRXTO
Set1
Disabled0
Enabled1

50.10.3 INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IdFEDCBA
Reset 0x0000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWCTS
Clear1
Disabled0
Enabled1
BRWNCTS
Clear1
Disabled0
Enabled1
CRWRXDRDY
Clear1
Disabled0
Enabled1
DRWTXDRDY
Clear1
Disabled0
Enabled1
ERWERROR
Clear1
Disabled0
Enabled1
FRWRXTO
Clear1
Disabled0
Enabled1

50.10.4 ERRORSRC

Address offset: 0x480

Error source

Bit number313029282726252423222120191817161514131211109876543210
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWOVERRUN
Overrun error
A start bit is received while the previous data still lies in RXD. (Previous data is lost.)
NotPresent0Read: error not present
Present1Read: error present
BRWPARITYParity error
A character with bad parity is received, if HW parity check is enabled.
NotPresent0Read: error not present
Present1Read: error present
CRWFRAMINGFraming error occurred
IdDCBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
NotPresent0
Present1
DRWBREAK
NotPresent0Read: error not present
Present1Read: error present

50.10.5 ENABLE

Address offset: 0x500

Enable UART

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARWENABLE
Disabled0
Enabled4

50.10.6 PSELRTS

Address offset: 0x508

Pin select for RTS

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELRTS[0..31]Pin number configuration for UART RTS signal
Disconnected0xFFFFFFFDisconnect

50.10.7 PSELTXD

Address offset: 0x50C

Pin select for TXD

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELTXD[0..31]Pin number configuration for UART TXD signal
Disconnected0xFFFFFFFDisconnect

50.10.8 PSELCTS

Address offset: 0x510

Pin select for CTS

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELCTS[0..31]Pin number configuration for UART CTS signal
Disconnected0xFFFFFFFDisconnect

50.10.9 PSELRXD

Address offset: 0x514

Pin select for RXD

Bit number
Id
Reset 0xFFFFFFF
IdRWFieldValue IdValueDescription
ARWPSELRXD[0..31]Pin number configuration for UART RXD signal
Disconnected0xFFFFFFFDisconnect

50.10.10 RXD

Address offset: 0x518

RXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
ARRXDRX data received in previous transfers, double buffered

50.10.11 TXD

Address offset: 0x51C

TXD register

Bit number
Id
Reset 0x00000000
IdRWFieldValue IdValueDescription
AWTXDTX data to be transferred

50.10.12 BAUDRATE

Address offset: 0x524

Baud rate

Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
ARWBAUDRATEBaud rate
Baud12000x0004F0001200 baud (actual rate: 1205)
Baud24000x0009D0002400 baud (actual rate: 2396)
Baud48000x0013B0004800 baud (actual rate: 4808)
Baud96000x002750009600 baud (actual rate: 9598)
Baud144000x003B000014400 baud (actual rate: 14414)
Baud192000x004EA00019200 baud (actual rate: 19208)
Baud288000x0075F00028800 baud (actual rate: 28829)
Baud384000x009D500038400 baud (actual rate: 38462)
Baud576000x00EBF00057600 baud (actual rate: 57762)
Bit number313029282726252423222120191817161514131211109876543210
IdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0400000000000100000000000000000000000000
IdRWFieldValue IdValueDescription
Baud768000x013A900076800 baud (actual rate: 76923)
Baud1152000x01D7E000115200 baud (actual rate: 115942)
Baud2304000x03AFB000230400 baud (actual rate: 231884)
Baud2500000x04000000250000 baud
Baud4608000x075F7000460800 baud (actual rate: 470588)
Baud9216000x0EBED000921600 baud (actual rate: 941176)
Baud1M0x100000001Mega baud

50.10.13 CONFIG

Address offset: 0x56C

Configuration of parity and hardware flow control

Bit number313029282726252423222120191817161514131211109876543210
IdBBBA
Reset 0x00000000000000000000000000000000000000000
IdRWFieldValue IdValue
ARWHWFC
Disabled0
Enabled1
BRWPARITY
Excluded0x0
Included0x7

50.11 Electrical specification

50.11.1 UART electrical specification

SymbolDescriptionMin.Typ.Max.Units
$f_{UART}$ Baud rate for $UART^{41}$ .1000kbps
$I_{UART1M}$ Run current at max baud rate.55μA
$I_{UART115k}$ Run current at 115200 bps.55μA
$I_{UART1k2}$ Run current at 1200 bps.55μA
$I_{UART,IDLE}$ Idle current for UART1μA
$t_{UART,CTSH}$ CTS high time1μs
$t_{UART,START,LP}$ Time from STARTRX/STARTTX task to transmission started, low power mode $t_{UART,START}$ μs
+
$t_{START\_HFIN}$
$t_{UART,START,CL}$ Time from STARTRX/STARTTX task to transmission started, constant latency mode1μs

51 Mechanical specifications

The mechanical specifications for the packages show the dimensions in millimeters.

51.1 QFN48 6 x 6 mm package


Figure 165: QFN48 6 x 6 mm package

Table 133: QFN48 dimensions in millimeters

PackageAA1A3bD, ED2, E2eKL
QFN48 (6x6)0.800.000.154.500.200.35Min.
0.850.020.20.206.04.600.40.40Nom.
0.900.050.254.700.45Max.

51.2 WLCSP package


BOTTOM VIEW
Figure 166: WLCSP package

Table 134: WLCSP packet dimensions in millimeters

PackageAA1A3bDED2E2eKL
0.3510.130.19Min.
WLCSP (3.0 × 3.2)0.3750.150.2250.202.9563.2262.42.80.41.41.2Nom.
0.3990.170.25Max.

52 Ordering information

This chapter contains information on IC marking, ordering codes, and container sizes.

52.1 IC marking

The nRF52832 IC package is marked as shown in the following figure. Only the first two characters of the function variant code are used in the <VV> entry.

N52832
P&gt;V&gt;
Y&gt;W&gt;L&gt;

Figure 167: Package marking

52.2 Box labels

Here are the box labels used for the nRF52832.

Figure 168: Inner box label


Figure 169: Outer box label

52.3 Order code

Here are the nRF52832 order codes and definitions.

nRF52832-P&gt;V&gt;-C&gt;

Figure 170: Order code

Table 135: Abbreviations

AbbreviationDefinition and implemented codes
N52/nRF52nRF52 Series product
832Part code
Package variant code
Function variant code
Build code
H - Hardware version code
P - Production configuration code (production site, etc.)
F - Firmware version code (only visible on shipping container label)
Tracking code
YY - Year code
WW - Assembly week number
LL - Wafer lot code
Container code

52.4 Code ranges and values

Defined here are the nRF52832 code ranges and values.

Table 136: Package variant codes

PackageSize (mm)Pin/Ball countPitch (mm)
QFQFN6 x 6480.4
CIWLCSP3.0 x 3.2500.4

Table 137: Function variant codes

Flash (kB)RAM (kB)Access port protection
AA51264Controlled by hardware
AB25632Controlled by hardware
AA-G51264Controlled by hardware and software
AB-G25632Controlled by hardware and software

Table 138: Hardware version codes

Description
[A . . Z]Hardware version/revision identifier (incremental)

Table 139: Production configuration codes

Description
[0 .. 9]Production device identifier (incremental)
[A .. Z]Engineering device identifier (incremental)

Table 140: Production version codes

Description
[A .. N, P .. Z]Version of preprogrammed firmware
[0]Delivered without preprogrammed firmware

Table 141: Year codes

Description
[15 . . 99]Production year: 2015 to 2099

Table 142: Week codes

Description
[1 .. 52]Week of production

Table 143: Lot codes

Description
[AA . . ZZ]Wafer production lot identifier

Table 144: Container codes

Description
R77&quot; Reel
R13&quot; Reel
TTray

52.5 Product options

Defined here are the nRF52832 product options.

Table 145: nRF52832 order codes

Order codeMinimum ordering quantity (MOQ)Comment
nRF52832-QFAA-R71000Not recommended for new designs
nRF52832-QFAA-R3000Not recommended for new designs
nRF52832-QFAA-T490Not recommended for new designs
nRF52832-QFAA-G-R71000
nRF52832-QFAA-G-R3000
nRF52832-QFAA-G-T490
nRF52832-CIAA-R71500Not recommended for new designs
nRF52832-CIAA-R7000Not recommended for new designs
nRF52832-CIAA-G-R71500
nRF52832-CIAA-G-R7000
nRF52832-QFAB-R3000Not recommended for new designs
nRF52832-QFAB-R71000Not recommended for new designs
nRF52832-QFAB-T490Not recommended for new designs
nRF52832-QFAB-G-R3000
nRF52832-QFAB-G-R71000
nRF52832-QFAB-G-T490

Table 146: Development tools order code

Order codeDescription
nRF52-DKnRF52 Development Kit

53 Reference circuitry

To ensure good RF performance when designing PCBs, it is highly recommended to use the PCB layouts and component values provided by Nordic Semiconductor.

Documentation for the different package reference circuits, including Altium Designer files, PCB layout files, and PCB production files can be downloaded from Reference layout nRF52 Series.

53.1 Schematic QFAA and QFAB QFN48 with internal LDO setup


Figure 171: QFAA and QFAB QFN48 with internal LDO setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 147: Bill of material for QFAA and QFAB QFN48 with internal LDO setup

DesignatorValueDescriptionFootprint
C1, C2, C11, C1212 pFCapacitor, NP0, ±2%0402
C30.8 pFCapacitor, NP0, ±5%0402
C4, C5, C8100 nFCapacitor, X7R, ±10%0402
C6N.C.Not mounted0402
C7100 pFCapacitor, NP0, ±5%0402
C94.7 μFCapacitor, X5R, ±10%0603
C101.0 μFCapacitor, X7R, ±10%0603
L13.9 nHHigh frequency chip inductor ±5%0402
U1nRF52832-QFAA and nRF52832-QFABMulti-protocolBluetoothlow energy, ANT, and 2.4 GHz proprietary system on chipQFN-48
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, total tol. ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 3215, 32.768 kHz, CI=9 pF, total tol. ±50 ppmXTAL_3215

53.2 Schematic QFAA and QFAB QFN48 with DC/DC regulator setup


Figure 172: QFAA and QFAB QFN48 with DC/DC regulator setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 148: Bill of material for QFAA and QFAB QFN48 with DC/DC regulator setup

DesignatorValueDescriptionFootprint
C1, C2, C11, C1212 pFCapacitor, NP0, ±2%0402
C30.8 pFCapacitor, NP0, ±5%0402
C4, C5, C8100 nFCapacitor, X7R, ±10%0402
C6N.C.Not mounted0402
C7100 pFCapacitor, NP0, ±5%0402
C94.7 μFCapacitor, X5R, ±10%0603
C101.0 μFCapacitor, X7R, ±10%0603
L13.9 nHHigh frequency chip inductor ±5%0402
L210 μHChip inductor, IDC,min = 50 mA, ±20%0603
L315 nHHigh frequency chip inductor ±10%0402
U1nRF52832-QFAA and nRF52832-QFABMulti-protocol Bluetooth low energy, ANT, and 2.4 GHz proprietary system on chipQFN-48
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, total tol. ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 3215, 32.768 kHz, CI=9 pF, total tol. ±50 ppmXTAL_3215

53.3 Schematic QFAA and QFAB QFN48 with DC/DC regulator and NFC setup


Figure 173: QFAA and QFAB QFN48 with DC/DC regulator and NFC setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 149: Bill of material for QFAA and QFAB QFN48 with DC/DC converter and NFC setup

DesignatorValueDescriptionFootprint
C1, C2, C11, C1212 pFCapacitor, NP0, ±2%0402
C30.8 pFCapacitor, NP0, ±5%0402
C4, C5, C8100 nFCapacitor, X7R, ±10%0402
C6N.C.Not mounted0402
C7100 pFCapacitor, NP0, ±5%0402
C94.7 μFCapacitor, X5R, ±10%0603
C101.0 μFCapacitor, X7R, ±10%0603
$C_{tune1}, Ctune2$ TBD pFCapacitor, NP0, ±5%0402
L13.9 nHHigh frequency chip inductor ±5%0402
L210 μHChip inductor, IDC,min = 50 mA, ±20%0603
L315 nHHigh frequency chip inductor ±10%0402
U1nRF52832-QFAA and nRF52832-QFABMulti-protocol Bluetooth low energy, ANT, and 2.4 GHz proprietary system on chipQFN-48
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, Total Tol: ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 3215, 32.768 kHz, CI=9 pF, ±50 ppmXTAL_3215

53.4 Schematic CIAA WLCSP with internal LDO setup


Figure 174: CIAA WLCSP with internal LDO setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 150: Bill of material for CIAA WLCSP with internal LDO setup

DesignatorValueDescriptionFootprint
C1, C2, C10, C1112 pFCapacitor, NP0, ±2%0201
C31.0 pFCapacitor, NP0, ±5%0201
C4, C5100 nFCapacitor, X7R, ±10%0201
C6, C7100 pFCapacitor, NP0, ±5%0201
C84.7 μFCapacitor, X5R, ±10%0603
C91.0 μFCapacitor, X5R, ±5%0402
L13.3 nHHigh frequency chip inductor ±5%0201
U1nRF52832-CIAAMulti-protocol Bluetooth low energy, ANT, and 2.4 GHz proprietary system on chipWLCSP_C50
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, total tol. ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 2012, 32.768 kHz, CI=9 pF, ±50 ppmXTAL_2012

53.5 Schematic CIAA WLCSP with DC/DC regulator setup


Figure 175: CIAA WLCSP with DC/DC regulator setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 151: Bill of material for CIAA WLCSP with DC/DC regulator setup

DesignatorValueDescriptionFootprint
C1, C2, C10, C1112 pFCapacitor, NP0, ±2%0201
C31.0 pFCapacitor, NP0, ±5%0201
C4, C5100 nFCapacitor, X7R, ±10%0201
C6, C7100 pFCapacitor, NP0, ±5%0201
C84.7 μFCapacitor, X5R, ±10%0603
C91.0 μFCapacitor, X5R, ±5%0402
L13.3 nHHigh frequency chip inductor ±5%0201
L210 μHChip inductor, IDC,min = 50 mA, ±20%0603
L315 nHHigh frequency chip inductor ±10%0402
U1nRF52832-CIAAMulti-protocol Bluetooth low energy, ANT, and 2.4 GHz proprietary system on chipWLCSP_C50
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, Total Tol: ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 2012, 32.768 kHz, CI=9 pF, ±50 ppmXTAL_2012

53.6 Schematic CIAA WLCSP with DC/DC regulator and NFC setup


Figure 176: CIAA WLCSP with DC/DC regulator and NFC setup

For PCB reference layouts, see Reference layout nRF52 Series.

Table 152: Bill of material for CIAA WLCSP with DC/DC converter and NFC setup

DesignatorValueDescriptionFootprint
C1, C2, C10, C1112 pFCapacitor, NP0, ±2%0201
C31.0 pFCapacitor, NP0, ±5%0201
C4, C5100 nFCapacitor, X7R, ±10%0201
C6, C7100 pFCapacitor, NP0, ±5%0201
C84.7 μFCapacitor, X5R, ±10%0603
C91.0 μFCapacitor, X5R, ±5%0402
$C_{tune1}, C_{tune2}$ TBD pFCapacitor, NP0, ±5%0201
L13.3 nHHigh frequency chip inductor ±5%0201
L210 μHChip inductor, IDC,min = 50 mA, ±20%0603
L315 nHHigh frequency chip inductor ±10%0402
U1nRF52832-CIAAMulti-protocol Bluetooth low energy, ANT, and 2.4 GHz proprietary system on chipWLCSP_C50
X132 MHzXTAL SMD 2016, 32 MHz, CI=8 pF, Total Tol: ±40 ppmXTAL_2016
X232.768 kHzXTAL SMD 2012, 32.768 kHz, CI=9 pF, ±50 ppmXTAL_2012

53.7 PCB guidelines

A well-designed PCB is necessary to achieve good RF performance. A poor layout can lead to loss in performance or functionality.

A qualified RF layout for the IC and its surrounding components, including matching networks, can be downloaded from Reference layout nRF52 Series.

To ensure optimal performance, it is essential that you follow the schematics and layout references closely. Especially in the case of the antenna matching circuitry (components between device pin ANT and the antenna), any changes to the layout can change the behavior, resulting in degradation of RF performance or a need to change component values. All the reference circuits are designed for use with a 50 ohm single end antenna.

A PCB with a minimum of two layers, including a ground plane, is recommended for optimal performance. On PCBs with more than two layers, put a keep-out area on the inner layers directly below the antenna

matching circuitry (components between device pin ANT and the antenna) to reduce the stray capacitances that influence RF performance.

A matching network is needed between the RF pin ANT and the antenna, to match the antenna impedance (normally 50 ohm) to the optimum RF load impedance for the chip. For optimum performance, the impedance for the matching network should be set as described in the recommended package reference circuitry in Reference circuitry on page 550 above.

The DC supply voltage should be decoupled as close as possible to the VDD pins with high performance RF capacitors. See the schematics for recommended decoupling capacitor values. The supply voltage for the chip should be filtered and routed separately from the supply voltages of any digital circuitry.

Long power supply lines on the PCB should be avoided. All device grounds, VDD connections, and VDD bypass capacitors must be connected as close as possible to the IC. For a PCB with a topside RF ground plane, the VSS pins should be connected directly to the ground plane. For a PCB with a bottom ground plane, the best technique is to have via holes as close as possible to the VSS pads. A minimum of one via hole should be used for each VSS pin

Fast switching digital signals should not be routed close to the crystal or the power supply lines. Capacitive loading of fast switching digital output lines should be minimized in order to avoid radio interference.

53.8 PCB layout example

The PCB layout shown below is a reference layout for the QFN package with internal LDO setup.

Important: Pay attention to how the capacitor C3 is grounded. It is not directly connected to the ground plane, but grounded via VSS pin 31. This is done to create additional filtering of harmonic components.

For all available reference layouts, see Reference layout nRF52 Series.


Figure 177: Top silk layer


Figure 178: Top layer


Figure 179: Bottom layer

Important: No components in bottom layer.

53.9 PMIC support

The nRF52 Series is comprehensively supported by Nordic Semiconductor's own range of PMICs (Power Management Integrated Circuits). These PMICs are meticulously designed to enhance the performance and efficiency of the nRF52 Series devices. This integration ensures the longest battery life and the highest reliability for the end application. The synergy between the nRF52 Series and the Nordic PMICs highlights Nordic Semiconductor's commitment to providing a complete and cohesive solution for their customers' needs in wireless technology applications.

54 Legal notices

By using this documentation you agree to our terms and conditions of use. Nordic Semiconductor may change these terms and conditions at any time without notice.

54 Liability disclaimer

Nordic Semiconductor ASA reserves the right to make changes without further notice to the product to improve reliability, function, or design. Nordic Semiconductor ASA does not assume any liability arising out of the application or use of any product or circuits described herein.

Nordic Semiconductor ASA does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information. If there are any discrepancies, ambiguities or conflicts in Nordic Semiconductor’s documentation, the Product Specification prevails.

Nordic Semiconductor ASA reserves the right to make corrections, enhancements, and other changes to this document without notice.

Customer represents that, with respect to its applications, it has all the necessary expertise to create and implement safeguards that anticipate dangerous consequences of failures, monitor failures and their consequences, and lessen the likelihood of failures that might cause harm, and to take appropriate remedial actions.

Nordic Semiconductor ASA assumes no liability for applications assistance or the design of customers products. Customers are solely responsible for the design, validation, and testing of its applications as wel as for compliance with all legal, regulatory, and safety-related requirements concerning its applications.

Nordic Semiconductor ASA’s products are not designed for use in life-critical medical equipment, support appliances, devices, or systems where malfunction of Nordic Semiconductor ASA’s products can reasonably be expected to result in personal injury. Customer may not use any Nordic Semiconductor ASA’s products in life-critical medical equipment unless adequate design and operating safeguards by customer’s authorized officers have been made. Customer agrees that prior to using or distributing any life-critical medica equipment that include Nordic Semiconductor ASA’s products, customer will thoroughly test such systems and the functionality of such products as used in such systems.

Customer will fully indemnify Nordic Semiconductor ASA and its representatives against any damages, costs, losses, and/or liabilities arising out of customer’s non-compliance with this section.

54 RoHS and REACH statement

Refer to www.nordicsemi.com for complete hazardous substance reports, material composition reports, and latest version of Nordic’s RoHS and REACH statements.

54 Trademarks

All trademarks, service marks, trade names, product names, and logos appearing in this documentation are the property of their respective owners.

54 Copyright notice

© 2023 Nordic Semiconductor ASA. All rights are reserved. Reproduction in whole or in part is prohibited without the prior written permission of the copyright holder.

Extracted Images

Figures and diagrams from the PDF

Preview the extracted datasheet assets and open any image in a separate tab for closer inspection.

part-01-f9d032f0f453564a2e6ccff276afabe866974179893a1cfb9427891b1fcb5df2.jpg

part-01-f9d032f0f453564a2e6ccff276afabe866974179893a1cfb9427891b1fcb5df2.jpg

part-01-f66a5c237e0322a1d77ca238bb2e63f3decdb2c1ecce0e046e616e7c58c586b9.jpg

part-01-f66a5c237e0322a1d77ca238bb2e63f3decdb2c1ecce0e046e616e7c58c586b9.jpg

part-01-a486d2eba3a1d97afd7e8cc8d93dd054be7402b9df75f5fe29a16d5b9e63b773.jpg

part-01-a486d2eba3a1d97afd7e8cc8d93dd054be7402b9df75f5fe29a16d5b9e63b773.jpg

part-01-5b4671cae522bfcfad9ea9570b361f003792436560d650d587c5127641fb2be3.jpg

part-01-5b4671cae522bfcfad9ea9570b361f003792436560d650d587c5127641fb2be3.jpg

part-01-79423fe0c3b91bac84554ec0dc4a0fe2dd2b478cbb477030b36cdc615146a4e8.jpg

part-01-79423fe0c3b91bac84554ec0dc4a0fe2dd2b478cbb477030b36cdc615146a4e8.jpg

part-01-5ea934f063edf055ef3ff9182978314410c98d38274cf07b19120dcdd622931b.jpg

part-01-5ea934f063edf055ef3ff9182978314410c98d38274cf07b19120dcdd622931b.jpg

part-01-5df920e9d590c90f4072b56df369a55f822778e31b0134f125da7b8cc17d5a64.jpg

part-01-5df920e9d590c90f4072b56df369a55f822778e31b0134f125da7b8cc17d5a64.jpg

part-01-783e5e174351f8f322ab19eddd144cdfba6e85c1ac20105a10adcfd5fbeede21.jpg

part-01-783e5e174351f8f322ab19eddd144cdfba6e85c1ac20105a10adcfd5fbeede21.jpg

part-01-2b5b4a36b353ee02394bb99e525f4d951bc6dc2b0fa057c0fc671de3d9fb8e42.jpg

part-01-2b5b4a36b353ee02394bb99e525f4d951bc6dc2b0fa057c0fc671de3d9fb8e42.jpg

part-01-7f60aaead3b04b7bee4a344e6544d2dc758e4c50a5e92fd456f44199e10a78f4.jpg

part-01-7f60aaead3b04b7bee4a344e6544d2dc758e4c50a5e92fd456f44199e10a78f4.jpg

part-01-e7ad1d9fc4bbbb1b953c6ca689e08f254bcc5d11d3a9422cc3930b9820576b02.jpg

part-01-e7ad1d9fc4bbbb1b953c6ca689e08f254bcc5d11d3a9422cc3930b9820576b02.jpg

part-01-3d237be379be5c5adbfbb53d6522987a580d0dd5c992c1f066bb5027ce5d9ca9.jpg

part-01-3d237be379be5c5adbfbb53d6522987a580d0dd5c992c1f066bb5027ce5d9ca9.jpg

part-01-108fd2dcbfc189e73390680108e77fabe9adcdf1b1975995c8ad11657fd92c4e.jpg

part-01-108fd2dcbfc189e73390680108e77fabe9adcdf1b1975995c8ad11657fd92c4e.jpg

part-01-f20d898695ddc1337418c4801034567140af2f7f7fcc4b17d30e0eac7c3d737e.jpg

part-01-f20d898695ddc1337418c4801034567140af2f7f7fcc4b17d30e0eac7c3d737e.jpg

part-01-3ddaadd39e9d62a9a8ee9bb5c9ead06959e6249b1cf80f06091ccbd7c23eeeb0.jpg

part-01-3ddaadd39e9d62a9a8ee9bb5c9ead06959e6249b1cf80f06091ccbd7c23eeeb0.jpg

part-01-e721794337a3950841bf989615a30f07932e87908328191605f967ea680dd157.jpg

part-01-e721794337a3950841bf989615a30f07932e87908328191605f967ea680dd157.jpg

part-01-8aaa11315ed38d048b51323db42e3a9fbce3dd57f466fadd620a89411529abc3.jpg

part-01-8aaa11315ed38d048b51323db42e3a9fbce3dd57f466fadd620a89411529abc3.jpg

part-01-17dc15037c409ab3fb09d8b44826069b399a2787a53894aa2e96be068ff472e5.jpg

part-01-17dc15037c409ab3fb09d8b44826069b399a2787a53894aa2e96be068ff472e5.jpg

part-01-3173a92df8220acaabcd310e0dabe3498a313ae786c91d65646182faace12aeb.jpg

part-01-3173a92df8220acaabcd310e0dabe3498a313ae786c91d65646182faace12aeb.jpg

part-01-ce02304e81d1a9167d4d5456715681c68ab1e305d2e19d81dce1488f5f163929.jpg

part-01-ce02304e81d1a9167d4d5456715681c68ab1e305d2e19d81dce1488f5f163929.jpg

part-01-7fef9081cbc718cb2f6c83d3db872e86172494193fa693d7497c0c12e30f3851.jpg

part-01-7fef9081cbc718cb2f6c83d3db872e86172494193fa693d7497c0c12e30f3851.jpg

part-01-049b3c7e10dd888b8f7e2ef5dce5b9b2eef83fb9fec6b7f12da0777a0e549705.jpg

part-01-049b3c7e10dd888b8f7e2ef5dce5b9b2eef83fb9fec6b7f12da0777a0e549705.jpg

part-01-dd235c455a0269506a480e8c99045a2fd77d751805b972862fc39f7572fdc1aa.jpg

part-01-dd235c455a0269506a480e8c99045a2fd77d751805b972862fc39f7572fdc1aa.jpg

part-01-098e6c3dcb77e7d11a29e0d805c3ec7a4161dcbc1310f22b3c82dbf3dff7f385.jpg

part-01-098e6c3dcb77e7d11a29e0d805c3ec7a4161dcbc1310f22b3c82dbf3dff7f385.jpg

part-01-87bcf864041ff3cb398e18b9105521e0782c9992e87ebbef3c4068769bd4c458.jpg

part-01-87bcf864041ff3cb398e18b9105521e0782c9992e87ebbef3c4068769bd4c458.jpg

part-01-61e5fb465434473da6a1937e3f212ea57a96e4a753f9942d8e82227a0e6b4c49.jpg

part-01-61e5fb465434473da6a1937e3f212ea57a96e4a753f9942d8e82227a0e6b4c49.jpg

part-01-1a74b3e56643643ec2ed2d91c20c90d0295430a81390a127e5139cf836ea8a90.jpg

part-01-1a74b3e56643643ec2ed2d91c20c90d0295430a81390a127e5139cf836ea8a90.jpg

part-01-1922327dd88e9a9e5f4695eb9c3d218c7fb4caf5d2cfd2143efa40c27c494ac3.jpg

part-01-1922327dd88e9a9e5f4695eb9c3d218c7fb4caf5d2cfd2143efa40c27c494ac3.jpg

part-01-7c00378468fc3e3f6b9dd8bdd0f920796c444fd94a506a37b5ae269160906858.jpg

part-01-7c00378468fc3e3f6b9dd8bdd0f920796c444fd94a506a37b5ae269160906858.jpg

part-01-cc69763bd70d51359e559a6740edc52193e55803c9daba5cebf68c505d055c0b.jpg

part-01-cc69763bd70d51359e559a6740edc52193e55803c9daba5cebf68c505d055c0b.jpg

part-01-42f3b3000491b9e67fbec4774597f598d6828755b9bb006b1f07ad4630bae9bb.jpg

part-01-42f3b3000491b9e67fbec4774597f598d6828755b9bb006b1f07ad4630bae9bb.jpg

part-01-6b1cfd59f00d6339d09adc4b290f6328674ba3dab7a066269febac40587b38aa.jpg

part-01-6b1cfd59f00d6339d09adc4b290f6328674ba3dab7a066269febac40587b38aa.jpg

part-01-63a68e0247f5b326c9551a4542ddc206141398241f6e728fc5df507544b0899d.jpg

part-01-63a68e0247f5b326c9551a4542ddc206141398241f6e728fc5df507544b0899d.jpg

part-01-0324e6ae53d0dd28b4ef4a31480f92b87b108e2be98a404b5da0dd9ab80bffee.jpg

part-01-0324e6ae53d0dd28b4ef4a31480f92b87b108e2be98a404b5da0dd9ab80bffee.jpg

part-01-d5713dd466aa3a13137d20fc5ec4d349d1f207cd6cdc33fcc42f2dea09ca75b5.jpg

part-01-d5713dd466aa3a13137d20fc5ec4d349d1f207cd6cdc33fcc42f2dea09ca75b5.jpg

part-01-b36bf3f22b48592486c71e2042b9785940a82880a97f134bcc70ada9443db662.jpg

part-01-b36bf3f22b48592486c71e2042b9785940a82880a97f134bcc70ada9443db662.jpg

part-01-4223b63ffd010b723e6ee1981d45172db92d102f8bfbfbcb8b3eb41367eb645e.jpg

part-01-4223b63ffd010b723e6ee1981d45172db92d102f8bfbfbcb8b3eb41367eb645e.jpg

part-01-36c8d205892bd6bd35e50af60a2425e8aa5feab457e1826ff6850f664e01936c.jpg

part-01-36c8d205892bd6bd35e50af60a2425e8aa5feab457e1826ff6850f664e01936c.jpg

part-01-1a6afa98d07fd2a328b7c638f4804a4ac1e50e10cef376a3ad5a489f6a26ae1f.jpg

part-01-1a6afa98d07fd2a328b7c638f4804a4ac1e50e10cef376a3ad5a489f6a26ae1f.jpg

part-01-a0456a9c0292485076336ed6eb8bbe5ebeeb213c7385674a6808ea8721f8b5a9.jpg

part-01-a0456a9c0292485076336ed6eb8bbe5ebeeb213c7385674a6808ea8721f8b5a9.jpg

part-01-3ae19c3befb21f6b6c05720077bd64f23fb11b38a15b2fd787edfb73978d2c77.jpg

part-01-3ae19c3befb21f6b6c05720077bd64f23fb11b38a15b2fd787edfb73978d2c77.jpg

part-01-316f7cb4284cd9cd0db9bc9ad260c988cf3f577ab9b4d1b179e77182058cdf2c.jpg

part-01-316f7cb4284cd9cd0db9bc9ad260c988cf3f577ab9b4d1b179e77182058cdf2c.jpg

part-01-8dae5f0e5990ff26c5da13880e600ffaee1176e38f57a75bd98860bbabb277f8.jpg

part-01-8dae5f0e5990ff26c5da13880e600ffaee1176e38f57a75bd98860bbabb277f8.jpg

part-01-4c6404b4f4f6eae3df2493933eb25c27e0795474d5aa1b31d2443151635bab27.jpg

part-01-4c6404b4f4f6eae3df2493933eb25c27e0795474d5aa1b31d2443151635bab27.jpg

part-01-adb8d8105c09ebb84d0a8bb47711c2e0e4293e7777dddeac3280e292d3fc8124.jpg

part-01-adb8d8105c09ebb84d0a8bb47711c2e0e4293e7777dddeac3280e292d3fc8124.jpg

part-01-2f1e015fe8356e0d07acdbdb82f1d0c5e7c9c3bc2093e3837e59af28040e81d9.jpg

part-01-2f1e015fe8356e0d07acdbdb82f1d0c5e7c9c3bc2093e3837e59af28040e81d9.jpg

part-01-8d2b2f97fde17813d68c65903619bfed30ba0961a06c92d908c48fb002d6966f.jpg

part-01-8d2b2f97fde17813d68c65903619bfed30ba0961a06c92d908c48fb002d6966f.jpg

part-01-129f14a90d5226a3750511a05a04d8158744a512e5b5808532c271ea1f70c485.jpg

part-01-129f14a90d5226a3750511a05a04d8158744a512e5b5808532c271ea1f70c485.jpg

part-01-86b895abb153c41f9a33c54b39142eaf8a92017b0c2d263e4db60981025c228d.jpg

part-01-86b895abb153c41f9a33c54b39142eaf8a92017b0c2d263e4db60981025c228d.jpg

part-01-05bf17d02dfd601d7393d98d88b0c13043168c76e9e1f7b827843e41398fbe35.jpg

part-01-05bf17d02dfd601d7393d98d88b0c13043168c76e9e1f7b827843e41398fbe35.jpg

part-01-16ee1cf4130fbea1d9c496ffeb24066e0555abe7924c8205a9f53b7ed09769e5.jpg

part-01-16ee1cf4130fbea1d9c496ffeb24066e0555abe7924c8205a9f53b7ed09769e5.jpg

part-01-07a65cf4f973045e53f93273ef04dad0b3466c385529f29c4655f8250865d913.jpg

part-01-07a65cf4f973045e53f93273ef04dad0b3466c385529f29c4655f8250865d913.jpg

part-01-66b1de125e11888bb92c3cc985b652f9c55f0b5926e36314961208097537eb40.jpg

part-01-66b1de125e11888bb92c3cc985b652f9c55f0b5926e36314961208097537eb40.jpg

part-01-804073d6d1996b974ead6877858c4285948d27a9ff3fa5d82e5a470f16b690e0.jpg

part-01-804073d6d1996b974ead6877858c4285948d27a9ff3fa5d82e5a470f16b690e0.jpg

part-01-66671c09e6d260dff5a6b0b90bf02834022ea57fd95473b8665d530083dc9276.jpg

part-01-66671c09e6d260dff5a6b0b90bf02834022ea57fd95473b8665d530083dc9276.jpg

part-01-341afce5c79617d8d2aec58b41e7a0953d48920c669600c17daf41efd65a7cfd.jpg

part-01-341afce5c79617d8d2aec58b41e7a0953d48920c669600c17daf41efd65a7cfd.jpg

part-01-106abaf678ddee3ed4c7854382797258f520a76f2c612bc907618c7b2158b74d.jpg

part-01-106abaf678ddee3ed4c7854382797258f520a76f2c612bc907618c7b2158b74d.jpg

part-01-167e50f0213489833d004b928bda709c6e60a895e5bd3b88236e615930dbf292.jpg

part-01-167e50f0213489833d004b928bda709c6e60a895e5bd3b88236e615930dbf292.jpg

part-01-492953900e4bb149d196ac1baa5b86be1e9b03c8988b4c9d2e49a294dee6b557.jpg

part-01-492953900e4bb149d196ac1baa5b86be1e9b03c8988b4c9d2e49a294dee6b557.jpg

part-01-063138026a56d00662648a0d420452dfdaaeabdba7c445341e7e6757f56690ec.jpg

part-01-063138026a56d00662648a0d420452dfdaaeabdba7c445341e7e6757f56690ec.jpg

Agent APIs

Use this datasheet from any agent

Send the page, markdown, chunks, or search endpoint to ChatGPT, Claude, embedr-app, or your own tooling.