| |||
| Home > Cortex-M3 Peripherals > Optional Memory Protection Unit > MPU access permission attributes | |||
This section describes the MPU access permission attributes. The access permission bits, TEX, C, B, S, AP, and XN, of the RASR, control access to the corresponding memory region. If an access is made to an area of memory without the required permissions, then the MPU generates a permission fault. Table 4.45 shows encodings for the TEX, C, B, and S access permission bits.
Table 4.45. TEX, C, B, and S encoding
| TEX | C | B | S | Memory type | Shareability | Other attributes |
|---|---|---|---|---|---|---|
0b000 | 0 | 0 | x [a] | Strongly-ordered | Shareable | - |
| 1 | x [a] | Device | Shareable | - | ||
1 | 0 | 0 | Normal | Not shareable | Outer and inner write-through. No write allocate. | |
1 | Shareable | |||||
1 | 0 | Normal | Not shareable | Outer and inner write-back. No write allocate. | ||
| 1 | Shareable | |||||
0b001 | 0 | 0 | 0 | Normal | Not shareable | Outer and inner noncacheable. |
| 1 | Shareable | |||||
| 1 | x [a] | Reserved encoding | - | |||
1 | 0 | x [a] | Implementation defined attributes. | - | ||
1 | 0 | Normal | Not shareable | Outer and inner write-back. Write and read allocate. | ||
| 1 | Shareable | |||||
0b010 | 0 | 0 | x [a] | Device | Not shareable | Nonshared Device. |
1 | x [a] | Reserved encoding | - | |||
1 | x [a] | x [a] | Reserved encoding | - | ||
0b1BB | A | A | 0 | Normal | Not shareable | Cached memory , BB = outer policy, AA = inner policy. See Table 4.46 for the encoding of the AA and BB bits. |
1 | Shareable | |||||
[a] The MPU ignores the value of this bit. | ||||||
Table 4.46 shows the cache policy for memory attribute encodings with a TEX value is in the range 4-7.
Table 4.46. Cache policy for memory attribute encoding
| Encoding, AA or BB | Corresponding cache policy |
|---|---|
0b00 | Non-cacheable |
0b01 | Write back, write and read allocate |
0b10 | Write through, no write allocate |
0b11 | Write back, no write allocate |
Table 4.47 shows the AP encodings that define the access permissions for privileged and unprivileged software.
Table 4.47. AP encoding
| AP[2:0] | Privileged permissions | Unprivileged permissions | Description |
|---|---|---|---|
| 000 | No access | No access | All accesses generate a permission fault |
| 001 | RW | No access | Access from privileged software only |
| 010 | RW | RO | Writes by unprivileged software generate a permission fault |
| 011 | RW | RW | Full access |
| 100 | Unpredictable | Unpredictable | Reserved |
| 101 | RO | No access | Reads by privileged software only |
| 110 | RO | RO | Read only, by privileged or unprivileged software |
| 111 | RO | RO | Read only, by privileged or unprivileged software |