Execute in place

nRF5340 Product Specification

Execute in place (XIP) allows the CPU to execute program code directly from the external flash.

After the external flash has been configured, the CPU can execute code from the external flash by accessing the XIP memory region. See the following figure and Memory for details.

The XIP memory region is read-only, writing to it will result in a bus error.

When accessing the XIP memory region, the start address of this XIP memory region will map to the address XIPOFFSET of the external flash.

Figure 2. XIP memory map
Page-1 Sheet.32 RAM RAM Sheet.33 Peripheral Peripheral Sheet.34 SRAM SRAM Sheet.35 Code Code Sheet.36 0x00000000 0x00000000 Sheet.37 0x20000000 0x20000000 Sheet.38 0x40000000 0x40000000 Sheet.39 0x60000000 0x60000000 Sheet.40 Sheet.41 Sheet.42 XIP XIP Sheet.43 Sheet.44 Sheet.45 Sheet.46 0x00000000 0x00000000 Sheet.47 Sheet.48 Sheet.49 XIP XIP Sheet.50 Sheet.51 Sheet.52 XIPOFFSET XIPOFFSET Sheet.53 External flash External flash Sheet.54 System address map System address map Sheet.55 Sheet.56