Memory

The nRF52820 contains 256 kB of flash memory and 32 kB of RAM that can be used for code and data storage.

The CPU and peripherals with EasyDMA can access memory via the AHB multilayer interconnect. In additon, peripherals are accessed by the CPU via the AHB multilayer interconnect, as shown in the following figure.

Figure 1. Memory layout

Memory layout

See AHB multilayer and EasyDMA for more information about the AHB multilayer interconnect and 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.

RAM - Random access memory

The RAM interface is divided into four RAM AHB slaves.

RAM AHB slaves 0 to 3 are connected to two 4 kB RAM sections each, as shown in Memory layout.

Each RAM section has separate power control for System ON and System OFF mode operation, which is configured via RAM register (see the POWER — Power supply).

Flash - Non-volatile memory

The CPU can read from flash memory an unlimited number of times, but is restricted in how it writes to flash and the number of writes and erases it can perform.

Writing to flash memory is managed by the non-volatile memory controller (NVMC), see NVMC — Non-volatile memory controller.

Flash memory is divided into 64 pages of 4 kB each that can be accessed by the CPU via the ICODE and DCODE buses as shown in Memory layout.

Memory map

The complete memory map for the nRF52820 is shown in the following figure. As described in Memory, Code RAM and Data RAM are the same physical RAM.

Figure 2. Memory map

Memory map

Instantiation

Table 1. Instantiation table
IDBase addressInstanceDescription
00x40000000APPROTECT

APPROTECT control

00x40000000CLOCK

Clock control

00x40000000POWER

Power control

00x50000000GPIO

General purpose input and output

This instance is deprecated.

00x50000000P0

General purpose input and output, port 0.

10x40001000RADIO

2.4 GHz radio

20x40002000UART0

Universal asynchronous receiver/transmitter

This instance is deprecated.

20x40002000UARTE0

Universal asynchronous receiver/transmitter with EasyDMA, unit 0

30x40003000SPI0

SPI master 0

This instance is deprecated.

30x40003000SPIM0

SPI master 0

30x40003000SPIS0

SPI slave 0

30x40003000TWI0

Two-wire interface master 0

This instance is deprecated.

30x40003000TWIM0

Two-wire interface master 0

30x40003000TWIS0

Two-wire interface slave 0

40x40004000SPI1

SPI master 1

This instance is deprecated.

40x40004000SPIM1

SPI master 1

40x40004000SPIS1

SPI slave 1

40x40004000TWI1

Two-wire interface master 1

This instance is deprecated.

40x40004000TWIM1

Two-wire interface master 1

40x40004000TWIS1

Two-wire interface slave 1

60x40006000GPIOTE

GPIO tasks and events

80x40008000TIMER0

Timer 0

90x40009000TIMER1

Timer 1

100x4000A000TIMER2

Timer 2

110x4000B000RTC0

Real-time counter 0

120x4000C000TEMP

Temperature sensor

130x4000D000RNG

Random number generator

140x4000E000ECB

AES electronic code book (ECB) mode block encryption

150x4000F000AAR

Accelerated address resolver

150x4000F000CCM

AES counter with CBC-MAC (CCM) mode block encryption

160x40010000WDT

Watchdog timer

170x40011000RTC1

Real-time counter 1

180x40012000QDEC

Quadrature decoder

190x40013000COMP

General purpose comparator

200x40014000EGU0

Event generator unit 0

200x40014000SWI0

Software interrupt 0

210x40015000EGU1

Event generator unit 1

210x40015000SWI1

Software interrupt 1

220x40016000EGU2

Event generator unit 2

220x40016000SWI2

Software interrupt 2

230x40017000EGU3

Event generator unit 3

230x40017000SWI3

Software interrupt 3

240x40018000EGU4

Event generator unit 4

240x40018000SWI4

Software interrupt 4

250x40019000EGU5

Event generator unit 5

250x40019000SWI5

Software interrupt 5

260x4001A000TIMER3

Timer 3

300x4001E000ACL

Access control lists

300x4001E000NVMC

Non-volatile memory controller

310x4001F000PPI

Programmable peripheral interconnect

390x40027000USBD

Universal serial bus device

N/A0x10000000FICR

Factory information configuration

N/A0x10001000UICR

User information configuration