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
00x40000000APPROTECTAPPROTECT control
00x40000000CLOCKClock control
00x40000000POWERPower control
00x50000000GPIO

General purpose input and output

This instance is deprecated.

00x50000000P0General purpose input and output, port 0.
10x40001000RADIO2.4 GHz radio
20x40002000UART0

Universal asynchronous receiver/transmitter

This instance is deprecated.

20x40002000UARTE0Universal asynchronous receiver/transmitter with EasyDMA, unit 0
30x40003000SPI0

SPI master 0

This instance is deprecated.

30x40003000SPIM0SPI master 0
30x40003000SPIS0SPI slave 0
30x40003000TWI0

Two-wire interface master 0

This instance is deprecated.

30x40003000TWIM0Two-wire interface master 0
30x40003000TWIS0Two-wire interface slave 0
40x40004000SPI1

SPI master 1

This instance is deprecated.

40x40004000SPIM1SPI master 1
40x40004000SPIS1SPI slave 1
40x40004000TWI1

Two-wire interface master 1

This instance is deprecated.

40x40004000TWIM1Two-wire interface master 1
40x40004000TWIS1Two-wire interface slave 1
60x40006000GPIOTEGPIO tasks and events
80x40008000TIMER0Timer 0
90x40009000TIMER1Timer 1
100x4000A000TIMER2Timer 2
110x4000B000RTC0Real-time counter 0
120x4000C000TEMPTemperature sensor
130x4000D000RNGRandom number generator
140x4000E000ECBAES electronic code book (ECB) mode block encryption
150x4000F000AARAccelerated address resolver
150x4000F000CCMAES counter with CBC-MAC (CCM) mode block encryption
160x40010000WDTWatchdog timer
170x40011000RTC1Real-time counter 1
180x40012000QDECQuadrature decoder
190x40013000COMPGeneral purpose comparator
200x40014000EGU0Event generator unit 0
200x40014000SWI0Software interrupt 0
210x40015000EGU1Event generator unit 1
210x40015000SWI1Software interrupt 1
220x40016000EGU2Event generator unit 2
220x40016000SWI2Software interrupt 2
230x40017000EGU3Event generator unit 3
230x40017000SWI3Software interrupt 3
240x40018000EGU4Event generator unit 4
240x40018000SWI4Software interrupt 4
250x40019000EGU5Event generator unit 5
250x40019000SWI5Software interrupt 5
260x4001A000TIMER3Timer 3
300x4001E000ACLAccess control lists
300x4001E000NVMCNon-volatile memory controller
310x4001F000PPIProgrammable peripheral interconnect
390x40027000USBDUniversal serial bus device
N/A0x10000000FICRFactory information configuration
N/A0x10001000UICRUser information configuration