SPU — System protection unit

SPU is the central point in the system to control access to memories, peripherals and other resources.

Listed here are the main features of the SPU:

General concepts

SPU provides a register interface to control the various internal logic blocks that monitor access to memory-mapped slave devices (RAM, flash, peripherals, etc) and other resources (device pins, DPPI channels, etc).

For memory-mapped devices like RAM, flash and peripherals, the internal logic checks the address and attributes (e.g. read, write, execute, secure) of the incoming transfer to block it if necessary. Whether a secure resource can be accessed by a given master is defined:
For a CPU-type master
By the security state of the CPU and the security state reported by the SPU, for the address in the bus transfer
For a non-CPU master
By the security attribute of the master that initiates the transfer, defined by a SPU register
The Simplified view of the protection of RAM, flash and peripherals using SPU shows a simplified view of the SPU registers controlling several internal modules.
Figure 1. Simplified view of the protection of RAM, flash and peripherals using SPU
Figure: Simplified view of the SPU protection of RAM, flash and peripherals
The protection logic implements a read-as-zero/write-ignore (RAZ/WI) policy:
  • A blocked read operation will always return a zero value on the bus, preventing information leak
  • A write operation to a forbidden region or peripheral will be ignored

An error is reported through dedicated error signals. For security state violations from an M33 master this will be a SecureFault exception, for other violations this will be an SPU event. The SPU event can be configured to generate an interrupt towards the CPU.

Other resources like pins and DPPI channels are protected by comparing the security attributes of the protected resource with the security attribute of the peripheral that wants to access it. The SPU is the only place where those security attributes can be configured.

Special considerations for ARM TrustZone for Cortex-M enabled system

For a ARM® TrustZone® for Cortex®-M enabled CPU, the SPU also controls custom logic.

Custom logic is shown as the implementation defined attribution unit (IDAU) in figure Simplified view of the protection of RAM, flash and peripherals using SPU. Full support is provided for:

The SPU provides the necessary registers to configure the security attributes for memory regions and peripherals. However, as a requirement to use the SPU, the secure attribution unit (SAU) needs to be disabled and all memory set as non-secure in the ARM core. This will allow the SPU to control the IDAU and set the security attribution of all addresses as originally intended.

Flash access control

The flash memory space is divided in regions, each of them with configurable permissions settings.

The flash memory space is divided into 32 regions of 32 KiB .

For each region, four different types of permissions can be configured:

Read
Allows data read access to the region. Note that code fetch from this region is not controlled by the read permission but by the execute permission described below.
Write
Allows write or page erase access to the region
Execute
Allows code fetch from this region, even if data read is disabled
Secure
Allows only bus accesses with the security attribute set to access the region

Permissions can be set independently. For example, it is possible to configure a flash region to be accessible only through secure transfer, being read-only (no write allowed) and non-executable (no code fetch allowed). For each region, permissions can be set and then locked by using the FLASHREGION[n].PERM.LOCK bit, to prevent subsequent modifications.

Note that the debugger is able to step through execute-protected memory regions.

The following figure shows the flash memory space and the divided regions:

Figure 2. Definition of the N=32 regions, each of 32 KiB, in the flash memory space
Figure: Regions in the flash memory space

Non-secure callable (NSC) region definition in flash

The SPU provides support for the definition of non-secure callable (NSC) sub-regions to allow non-secure to secure function calls.

A non-secure callable sub-region can only exist within an existing secure region and its definition is done using two registers:

The NSC sub-region will be defined from the highest address in that region, going downwards. Figure below illustrates the NSC sub-regions and the registers used for their definition:

Figure 3. Non-secure callable region definition in the flash memory space
Figure: NSC region definition in the flash memory space

The NSC sub-region will only be defined if:

If FLASHNSC[i].REGION and FLASHNSC[j].REGION have the same value, there is only one sub-region defined as NSC, with the size given by the maximum of FLASHNSC[i].SIZE and FLASHNSC[j].SIZE.

If FLASHNSC[i].REGION defines a non-secure region, then there is no non-secure callable region defined and the selected region stays non-secure.

Flash access error reporting

The SPU and the logic controlled by it will respond with a certain behavior once an access violation is detected.

The following will happen once the logic controlled by the SPU detects an access violation on one of the flash ports:

The following table summarizes the SPU behavior based on the type of initiator and access violation:

Table 1. Error reporting for flash access errors
Master typeSecurity violationRead/Write/Execute protection violation
Cortex®-M33SecureFault exceptionBusFault exception, FLASHACCERR event
EasyDMARAZ/WI, FLASHACCERR eventRAZ/WI, FLASHACCERR event
Other mastersRAZ/WI, FLASHACCERR eventRAZ/WI, FLASHACCERR event

For a Cortex®-M33 master, the SecureFault exception will take precedence over the BusFault exception if a security violation occurs simultaneously with another type of violation.

UICR and FICR protections

The user information configuration registers (UICR) and factory information configuration registers (FICR) are always considered as secure. FICR registers are read-only. UICR registers can be read and written by secure code only.

Writing new values to user information configuration registers must follow the procedure described in NVMC — Non-volatile memory controller. Code execution from FICR and UICR address spaces will always be reported as access violation, an exception to this rule applies during a debug session.

RAM access control

The RAM memory space is divided in regions, each of them with configurable permissions settings.

The RAM memory space is divided into 32 regions of 8 KiB.

For each region, four different types of permissions can be configured:

Read
Allows data read access to the region. Code fetch from this region is not controlled by the read permission but by the execute permission described below.
Write
Allows write access to the region
Execute
Allows code fetch from this region
Secure
Allows only bus accesses with the security attribute set to access the region

Permissions can be set independently. For example, it is possible to configure a RAM region to be accessible only through secure transfer, being read-only (no write allowed) and non-executable (no code fetch allowed). For each region, permissions can be set and then locked to prevent subsequent modifications by using the RAMREGION[n].PERM.LOCK bit.

The following figure shows the RAM memory space and the devided regions:

Figure 4. Definition of the N=32 regions, each of 8 KiB, in the RAM memory space
Figure: Region definition in RAM

Non-secure callable (NSC) region definition in RAM

The SPU provides support for the definition of non-secure callable (NSC) sub-regions to allow non-secure to secure function calls.

A non-secure callable sub-region can only exist within an existing secure region and its definition is done using two registers:

The NSC sub-region will be defined from the highest address in that region, going downwards. Figure below illustrates the NSC sub-regions and the registers used for their definition:

Figure 5. Non-secure callable region definition in the RAM memory space
Figure: NSC region definition in RAM

The NSC sub-region will only be defined if:

If RAMNSC[i].REGION and RAMNSC[j].REGION have the same value, there is only one sub-region defined as NSC, with the size given by the maximum of RAMNSC[i].SIZE and RAMNSC[j].SIZE.

If RAMNSC[i].REGION defines a non-secure region, then there is no non-secure callable region defined and the selected region stays non-secure.

RAM access error reporting

The SPU and the logic controlled by it will respond with a certain behavior once an access violation is detected.

The following will happen once the logic controlled by the SPU detects an access violation on one of the RAM ports:

The following table summarizes the SPU behavior based on the type of initiator and access violation:

Table 2. Error reporting for RAM access errors
Master typeSecurity violationRead/Write/Execute protection violation
Cortex®-M33SecureFault exceptionBusFault exception, RAMACCERR event
EasyDMARAZ/WI, RAMACCERR eventRAZ/WI, RAMACCERR event
Other mastersRAZ/WI, RAMACCERR eventRAZ/WI, RAMACCERR event

For a Cortex®-M33 master, the SecureFault exception will take precedence over the BusFault exception if a security violation occurs simultaneously with another type of violation.

Peripheral access control

Access controls are defined by the characteristics of the peripheral.

Peripherals can have their security attribute set as:

Always secure
For a peripheral related to system control
Always non-secure
For some general-purpose peripherals
Configurable
For general-purpose peripherals that may be configured for secure only access

The full list of peripherals and their corresponding security attributes can be found in Memory map. For each peripheral with ID n, PERIPHID[n]. PERM will show whether the security attribute for this peripheral is configurable or not.

If not hardcoded, the security attribute can configured using the PERIPHID[id].PERM.

At reset, all user-selectable and split security peripherals are set to be secure, with secure DMA where present.

Secure code can access both secure peripherals and non-secure peripherals.

The nRF9161 does not support runtime security configuration of peripherals. It is thus, advisable that all security settings on peripherals are set during boot time. Doing so will ensure the desired system security configuration is deployed simultaneously system-wide.

Peripherals with split security

Peripherals with split security are defined to handle use-cases when both secure and non-secure code needs to control the same resource.

When peripherals with split security have their security attribute set to non-secure, access to specific registers and bitfields within some registers is dependent on the security attribute of the bus transfer. For example, some registers will not be accessible for a non-secure transfer.

When peripherals with split security have their security attribute set to secure, then only secure transfers can access their registers.

See Instantiation for an overview of split security peripherals. Respective peripheral chapters explain the specific security behavior of each peripheral.

Peripheral address mapping

Peripherals that have non-secure security mapping have their address starting with 0x4XXX_XXXX. Peripherals that have secure security mapping have their address starting with 0x5XXX_XXXX.

Peripherals with a user-selectable security mapping are available at an address starting with:

Note: Accesses to the 0x4XXX_XXXX address range from secure or non-secure code for a peripheral marked as secure will result in a bus-error.

Secure code accessing the 0x5XXX_XXXX address range of a peripheral marked as non-secure will also result in a bus-error.

Peripherals with a split security mapping are available at an address starting with:

Any attempt to access the 0x5000_0000-0x5FFF_FFFF address range from non-secure code will be ignored and generate a SecureFault exception.

The table below illustrates the address mapping for the three peripheral types, in all possible configurations

Table 3. Peripheral's address mapping in relation to its security-features and configuration
Security-features and configurationIs mapped at 0x4XXX_XXXX?Is mapped at 0x5XXX_XXXX?
Secure peripheralNoYes
Non-secure peripheralYesNo
Split-security peripheral, with attribute=secureNoYes
Split-security peripheral, with attribute=non-secureYes, restricted functionalityYes

Special considerations for peripherals with DMA master

Peripherals containing a DMA master can be configured so the security attribute of the DMA transfers is different from the security attribute of the peripheral itself. This allows a secure peripheral to do non-secure data transfers to or from the system memories.

The following conditions must be met:

Then it is possible to select the security attribute of the DMA transfers using the field DMASEC (PERIPHID[n].PERM.DMASEC == Secure and PERIPHID[n].PERM.DMASEC == NonSecure) in PERIPHID[n].PERM.

Peripheral access error reporting

Peripherals send error reports once access violation is detected.

The following will happen if the logic controlled by the SPU detects an access violation on one of the peripherals:

Pin access control

Access to device pins can be controlled by the SPU. A pin can be declared as secure so that only secure peripherals or secure code can access it. Pins declared as non-secure can be accessed by both secure and non-secure peripherals or code.

The security attribute of each pin can be individually configured in SPU's GPIOPORT[n].PERM register. When the secure attribute is set for a pin, only peripherals that have the secure attribute set will be able to read the value of the pin or change it.

Peripherals can select the pin(s) they need access to through their PSEL register(s). If a peripheral has its attribute set to non-secure, but one of its PSEL registers selects a pin with the attribute set to secure, the SPU controlled logic will ensure that the pin selection is not propagated. In addition, the pin value will always be read as zero, to prevent a non-secure peripheral from obtaining a value from a secure pin. Whereas access to other pins with attribute set as non-secure will not be blocked.

Pins can be assigned to other domains than the application domain by changing the MCUSEL value in the GPIO PIN_CNF[n] register. Domains that do not have a pin assigned to them can neither control that pin nor read its status. Any pin configuration set in a domain that doesn't have ownership of that pin will not take effect until the MCUSEL is updated to assign that pin to the domain. Within each domain, pin access is controlled by that domain's local security configuration and peripheral PSEL registers. This is illustrated in the following figure:

Note: The SPU setting will still count when the APP domain accesses its local GPIO peripheral, as local registers are still writable even though MCUSEL is set to a different domain. Any changes in the APP GPIO peripheral done to a GPIO controlled by another domain will not affect the GPIO pad until MCUSEL is changed to APP.
Figure 6. Pin access for domains other than the application domain
Figure: Pin access for domains other than the application domain

DPPI access control

Access to DPPI channels can be restricted. A channel can be declared as secure so that only secure peripherals can access it.

The security attribute of a DPPI channel is configured in DPPI[n].PERM (n=0..0). When the secure attribute is set for a channel, only peripherals that have the secure attribute set will be able to publish events to this channel or subscribe to this channel to receive tasks.

The DPPI controller peripheral (DPPIC) is a split security peripheral, i.e., its security behavior depends on the security attributes of both the DPPIC and the accessing party. See Special considerations regarding the DPPIC configuration registers for more information about the DPPIC security behavior.

If a non-secure peripheral wants to publish an event on a secure DPPI channel, the channel will ignore the event. If a non-secure peripheral subscribes to a secure DPPI channel, it will not receive any events from this channel. The following figure illustrates the principle of operation of the security logic for a subscribed channel:

Figure 7. Subscribed channel security concept
Figure: Subscribed channel security concept

No error reporting mechanism is associated with the DPPI access control logic.

Special considerations regarding the DPPIC configuration registers

DPPI channels can be enabled, disabled and grouped through the DPPI controller (DPPIC). The DPPIC is a split-security peripheral, and handles both secure and non-secure accesses.

A non-secure peripheral access will only be able to configure and control DPPI channels defined as non-secure in SPU's DPPI[n].PERM register(s). A secure peripheral access can control all DPPI channels, independently of the configuration in the DPPI[n].PERM register(s).

The DPPIC allows the creation of group of channels to be able to enable or disable all channels within a group simultaneously. The security attribute of a group of channels (secure or non-secure) is defined as follows:

A non-secure access to a DPPIC register, or a bitfield controlling a channel marked as secure in DPPI[n].PERM register(s), will be ignored:

No exceptions are thrown when a non-secure access targets a register or bitfield controlling a secure channel. For example, if the bit i is set in the DPPI[n].PERM register (declaring the DPPI channel i as secure), then:

For the channel configuration registers (DPPIC.CHG[n]), access from non-secure code is only possible if the included channels are all non-secure, whether the channels are enabled or not. If a DPPIC.CHG[g] register included one or more secure channels, then the group gis considered as secure and only a secure transfer can read or write DPPIC.CHG[g]. A non-secure write will be ignored and a non-secure read will return zero.

The DPPIC can subscribe to secure or non-secure channels through SUBSCRIBE_CHG[n] registers in order to trigger task for enabling or disabling groups of channels. But an event from a non-secure channel will be ignored if the group subscribing to this channel is secure. An event from a secure channel can trigger both secure and non-secure tasks.

External domain access control

Other domains with their own CPUs can access peripherals, flash, and RAM memories. The SPU allows controlling accesses from those bus masters.

The external domains can access application MCU memories and peripherals. External domains are assigned security attributes as described in register EXTDOMAIN[n].PERM.

Table 4. Register mapping for external domains
DomainCapability registerPermission register
LTE modemModem is always a non-secure domainNot applicable

The figure below illustrates how the security control units are used to assign security attributes to transfers initiated by the external domains:

Figure 8. Access control from external domains
Figure: Access control from external domains

TrustZone for Cortex-M ID allocation

Flash and RAM regions, as well as non-secure and secure peripherals, are assigned unique TrustZone® IDs.

Note: TrustZone® ID should not be confounded with the peripheral ID used to identify peripherals.

The table below shows the TrustZone® ID allocation:

Table 5. TrustZone ID allocation
RegionsTrustZone Cortex-M ID
Flash regions 0..310..31
RAM regions 0..1564..79
Non-secure peripherals253
Secure peripherals254

Registers

Instances

InstanceBase addressTrustZoneSplit accessDescription
MapAttDMA
SPU0x50003000HFSNANoSystem Protection Unit

Register overview

RegisterOffsetTZDescription
EVENTS_RAMACCERR0x100A security violation has been detected for the RAM memory space
EVENTS_FLASHACCERR0x104A security violation has been detected for the flash memory space
EVENTS_PERIPHACCERR0x108A security violation has been detected on one or several peripherals
PUBLISH_RAMACCERR0x180Publish configuration for event RAMACCERR
PUBLISH_FLASHACCERR0x184Publish configuration for event FLASHACCERR
PUBLISH_PERIPHACCERR0x188Publish configuration for event PERIPHACCERR
INTEN0x300Enable or disable interrupt
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
CAP0x400Show implemented features for the current device
EXTDOMAIN[n].PERM0x440

Access for bus access generated from the external domain n

List capabilities of the external domain n

DPPI[n].PERM0x480Select between secure and non-secure attribute for the DPPI channels.
DPPI[n].LOCK0x484Prevent further modification of the corresponding PERM register
GPIOPORT[n].PERM0x4C0

Select between secure and non-secure attribute for pins 0 to 31 of port n.

This register is retained.

GPIOPORT[n].LOCK0x4C4Prevent further modification of the corresponding PERM register
FLASHNSC[n].REGION0x500Define which flash region can contain the non-secure callable (NSC) region n
FLASHNSC[n].SIZE0x504Define the size of the non-secure callable (NSC) region n
RAMNSC[n].REGION0x540Define which RAM region can contain the non-secure callable (NSC) region n
RAMNSC[n].SIZE0x544Define the size of the non-secure callable (NSC) region n
FLASHREGION[n].PERM0x600Access permissions for flash region n
RAMREGION[n].PERM0x700Access permissions for RAM region n
PERIPHID[n].PERM0x800List capabilities and access permissions for the peripheral with ID n

EVENTS_RAMACCERR

Address offset: 0x100

A security violation has been detected for the RAM memory space

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_RAMACCERR

A security violation has been detected for the RAM memory space

NotGenerated0Event not generated
Generated1Event generated

EVENTS_FLASHACCERR

Address offset: 0x104

A security violation has been detected for the flash memory space

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_FLASHACCERR

A security violation has been detected for the flash memory space

NotGenerated0Event not generated
Generated1Event generated

EVENTS_PERIPHACCERR

Address offset: 0x108

A security violation has been detected on one or several peripherals

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_PERIPHACCERR

A security violation has been detected on one or several peripherals

NotGenerated0Event not generated
Generated1Event generated

PUBLISH_RAMACCERR

Address offset: 0x180

Publish configuration for event RAMACCERR

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event RAMACCERR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_FLASHACCERR

Address offset: 0x184

Publish configuration for event FLASHACCERR

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event FLASHACCERR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

PUBLISH_PERIPHACCERR

Address offset: 0x188

Publish configuration for event PERIPHACCERR

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWCHIDX[0..255]DPPI channel that event PERIPHACCERR will publish to
BRWEN
Disabled0Disable publishing
Enabled1Enable publishing

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWRAMACCERR

Enable or disable interrupt for event RAMACCERR

Disabled0Disable
Enabled1Enable
BRWFLASHACCERR

Enable or disable interrupt for event FLASHACCERR

Disabled0Disable
Enabled1Enable
CRWPERIPHACCERR

Enable or disable interrupt for event PERIPHACCERR

Disabled0Disable
Enabled1Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWRAMACCERR

Write '1' to enable interrupt for event RAMACCERR

Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWFLASHACCERR

Write '1' to enable interrupt for event FLASHACCERR

Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWPERIPHACCERR

Write '1' to enable interrupt for event PERIPHACCERR

Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWRAMACCERR

Write '1' to disable interrupt for event RAMACCERR

Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
BRWFLASHACCERR

Write '1' to disable interrupt for event FLASHACCERR

Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled
CRWPERIPHACCERR

Write '1' to disable interrupt for event PERIPHACCERR

Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

CAP

Address offset: 0x400

Show implemented features for the current device

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARTZMShow ARM TrustZone status
NotAvailable0ARM TrustZone support not available
Enabled1ARM TrustZone support is available

EXTDOMAIN[n].PERM (n=0..0)

Address offset: 0x440 + (n × 0x4)

Access for bus access generated from the external domain n

List capabilities of the external domain n

Bit number313029282726252423222120191817161514131211109876543210
IDCBAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARSECUREMAPPING

Define configuration capabilities for TrustZone Cortex-M secure attribute

Note: This does not affect DPPI in the external domain
NonSecure0The bus access from this external domain always have the non-secure attribute set
Secure1The bus access from this external domain always have the secure attribute set
UserSelectable2Non-secure or secure attribute for bus access from this domain is defined by the EXTDOMAIN[n].PERM register
BRWSECATTR

Peripheral security mapping

Note: This bit has effect only if EXTDOMAIN[n].PERM.SECUREMAPPING reads as UserSelectable
NonSecure0Bus accesses from this domain have the non-secure attribute set
Secure1Bus accesses from this domain have secure attribute set
CRWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

DPPI[n].PERM (n=0..0)

Address offset: 0x480 + (n × 0x8)

Select between secure and non-secure attribute for the DPPI channels.

Bit number313029282726252423222120191817161514131211109876543210
IDPONMLKJIHGFEDCBA
Reset 0x0000FFFF00000000000000001111111111111111
IDR/WFieldValue IDValueDescription
A-PRWCHANNEL[i] (i=0..15)Select secure attribute.
Secure1Channeli has its secure attribute set
NonSecure0Channeli has its non-secure attribute set

DPPI[n].LOCK (n=0..0)

Address offset: 0x484 + (n × 0x8)

Prevent further modification of the corresponding PERM register

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLOCK
Locked1DPPI[n].PERM register can't be changed until next reset
Unlocked0DPPI[n].PERM register content can be changed

GPIOPORT[n].PERM (n=0..0) (Retained)

Address offset: 0x4C0 + (n × 0x8)

Select between secure and non-secure attribute for pins 0 to 31 of port n.

This register is retained.

Bit number313029282726252423222120191817161514131211109876543210
IDfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
A-fRWPIN[i] (i=0..31)Select secure attribute attribute for PIN i.
Secure1Pin i has its secure attribute set
NonSecure0Pin i has its non-secure attribute set

GPIOPORT[n].LOCK (n=0..0)

Address offset: 0x4C4 + (n × 0x8)

Prevent further modification of the corresponding PERM register

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWLOCK
Locked1GPIOPORT[n].PERM register can't be changed until next reset
Unlocked0GPIOPORT[n].PERM register content can be changed

FLASHNSC[n].REGION (n=0..1)

Address offset: 0x500 + (n × 0x8)

Define which flash region can contain the non-secure callable (NSC) region n

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A-RWREGIONRegion number
BRWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

FLASHNSC[n].SIZE (n=0..1)

Address offset: 0x504 + (n × 0x8)

Define the size of the non-secure callable (NSC) region n

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSIZESize of the non-secure callable (NSC) region n
Disabled0The region n is not defined as a non-secure callable region. Normal security attributes (secure or non-secure) are enforced.
321The region n is defined as non-secure callable with a 32-byte size
642The region n is defined as non-secure callable with a 64-byte size
1283The region n is defined as non-secure callable with a 128-byte size
2564The region n is defined as non-secure callable with a 256-byte size
5125The region n is defined as non-secure callable with a 512-byte size
10246The region n is defined as non-secure callable with a 1024-byte size
20487The region n is defined as non-secure callable with a 2048-byte size
40968The region n is defined as non-secure callable with a 4096-byte size
BRWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

RAMNSC[n].REGION (n=0..1)

Address offset: 0x540 + (n × 0x8)

Define which RAM region can contain the non-secure callable (NSC) region n

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A-RWREGIONRegion number
BRWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

RAMNSC[n].SIZE (n=0..1)

Address offset: 0x544 + (n × 0x8)

Define the size of the non-secure callable (NSC) region n

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWSIZESize of the non-secure callable (NSC) region n
Disabled0The region n is not defined as a non-secure callable region. Normal security attributes (secure or non-secure) are enforced.
321The region n is defined as non-secure callable with a 32-byte size
642The region n is defined as non-secure callable with a 64-byte size
1283The region n is defined as non-secure callable with a 128-byte size
2564The region n is defined as non-secure callable with a 256-byte size
5125The region n is defined as non-secure callable with a 512-byte size
10246The region n is defined as non-secure callable with a 1024-byte size
20487The region n is defined as non-secure callable with a 2048-byte size
40968The region n is defined as non-secure callable with a 4096-byte size
BRWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

FLASHREGION[n].PERM (n=0..31)

Address offset: 0x600 + (n × 0x4)

Access permissions for flash region n

Bit number313029282726252423222120191817161514131211109876543210
IDEDCBA
Reset 0x0000001700000000000000000000000000010111
IDR/WFieldValue IDValueDescription
ARWEXECUTEConfigure instruction fetch permissions from flash region n
Enable1Allow instruction fetches from flash region n
Disable0Block instruction fetches from flash region n
BRWWRITEConfigure write permission for flash region n
Enable1Allow write operation to region n
Disable0Block write operation to region n
CRWREADConfigure read permissions for flash region n
Enable1Allow read operation from flash region n
Disable0Block read operation from flash region n
DRWSECATTRSecurity attribute for flash region n
Non_Secure0Flash region n security attribute is non-secure
Secure1Flash region n security attribute is secure
ERWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

RAMREGION[n].PERM (n=0..31)

Address offset: 0x700 + (n × 0x4)

Access permissions for RAM region n

Bit number313029282726252423222120191817161514131211109876543210
IDEDCBA
Reset 0x0000001700000000000000000000000000010111
IDR/WFieldValue IDValueDescription
ARWEXECUTEConfigure instruction fetch permissions from RAM region n
Enable1Allow instruction fetches from RAM region n
Disable0Block instruction fetches from RAM region n
BRWWRITEConfigure write permission for RAM region n
Enable1Allow write operation to RAM region n
Disable0Block write operation to RAM region n
CRWREADConfigure read permissions for RAM region n
Enable1Allow read operation from RAM region n
Disable0Block read operation from RAM region n
DRWSECATTRSecurity attribute for RAM region n
Non_Secure0RAM region n security attribute is non-secure
Secure1RAM region n security attribute is secure
ERWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset

PERIPHID[n].PERM (n=0..66)

Address offset: 0x800 + (n × 0x4)

List capabilities and access permissions for the peripheral with ID n

Note: Reset values are unique per peripheral instantiation. Please refer to the peripheral instantiation table. Entries not listed in the instantiation table are undefined.
Bit number313029282726252423222120191817161514131211109876543210
IDFEDCBBAA
Reset 0x0000001200000000000000000000000000010010
IDR/WFieldValue IDValueDescription
ARSECUREMAPPINGDefine configuration capabilities for TrustZone Cortex-M secure attribute
NonSecure0This peripheral is always accessible as a non-secure peripheral
Secure1This peripheral is always accessible as a secure peripheral
UserSelectable2Non-secure or secure attribute for this peripheral is defined by the PERIPHID[n].PERM register
Split3This peripheral implements the split security mechanism. Non-secure or secure attribute for this peripheral is defined by the PERIPHID[n].PERM register.
BRDMAIndicate if the peripheral has DMA capabilities and if DMA transfer can be assigned to a different security attribute than the peripheral itself
NoDMA0Peripheral has no DMA capability
NoSeparateAttribute1Peripheral has DMA and DMA transfers always have the same security attribute as assigned to the peripheral
SeparateAttribute2Peripheral has DMA and DMA transfers can have a different security attribute than the one assigned to the peripheral
CRWSECATTR

Peripheral security mapping

Note: This bit has effect only if PERIPHID[n].PERM.SECUREMAPPING reads as UserSelectable or Split
Secure1Peripheral is mapped in secure peripheral address space
NonSecure0

If SECUREMAPPING == UserSelectable: Peripheral is mapped in non-secure peripheral address space.

If SECUREMAPPING == Split: Peripheral is mapped in non-secure and secure peripheral address space.

DRWDMASEC

Security attribution for the DMA transfer

Note: This bit has effect only if PERIPHID[n].PERM.SECATTR is set to secure
Secure1DMA transfers initiated by this peripheral have the secure attribute set
NonSecure0DMA transfers initiated by this peripheral have the non-secure attribute set
ERWLOCK
Unlocked0This register can be updated
Locked1The content of this register can't be changed until the next reset
FRPRESENTIndicate if a peripheral is present with ID n
NotPresent0Peripheral is not present
IsPresent1Peripheral is present