
GR716-DS-UM, May 2019, Version 1.29
484
www.cobham.com/gaisler
GR716
47.4
Example of configure and use the Memory protection
This chapter gives examples how of the memory protection unit can be used
47.4.1 Protect local instruction memory
To protect the local instruction memory from any erroneously writes during normal operation the pro-
tected area start and stop address should be specified and the master given access to the protected
area: (For this example we use segment number #0 but any segment can be used for protection)
PSA0.SADDR = 0x31000000
PSA0.SADDR = 0x3100FFFF
PSAC0.GRANT = 0x0000
PSAC0.EN = 0x1
PCR.EN = 0x1
This example defines the protected area, grants no master access to the area and enable segment end
global protection.
47.4.2 Protect external SRAM memory
To protect an area in the external SRAM memory from any erroneously writes during normal opera-
tion the protected area start and stop address should be specified and the master given access to the
protected area: (For this example we use segment number #0 but any segment can be used for protec-
tion)
PSA0.SADDR = 0x40100000
Table 655.
0x80 segmant*0x10 - PSC - Protection Segment Control register
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15
1
0
G15 G14 G13 G12 G11 G10 G9 G8 G7 G6 G5 G4 G3 G2 G1 G0
Reserved
EN
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
r
rw
31
G15 - Grant SPI4S on the DMA bus exclusive write permission
30
G14 - Grant DMA controller #3 on the DMA bus exclusive write permission
29
G13 - Grant DMA controller #2 on the DMA bus exclusive write permission
28
G12 - Grant DMA controller #1 on the DMA bus exclusive write permission
27
G11 - Grant DMA controller #0 on the DMA bus exclusive write permission
26
G10 - Grant PacketWire transmitter on the DMA bus exclusive write permission
25
G9 - Grant PacketWire receiver on the DMA bus exclusive write permission
24
G8 - Grant Bridge from System bus exclusive write permission.
23
G7 - Grant UART on the DMA bus exclusive write permission
22
G6 - Grant CAN on the DMA bus exclusive write permission
21
G5 - Grant CAN on the DMA bus exclusive write permission
20
G4 - Grant I2C on the DMA bus exclusive write permission
19
G3 - Grant SPI on the DMA bus exclusive write permission
18
G2 - Grant SpaceWire on the DMA bus exclusive write permission
17
G1 - Grant MIL-1553 on the DMA bus exclusive write permission.
16
G0 - Grant Bridge from Debug bus exclusive write permission.
15: 1
RESERVED
0
EN - Enable Memory Protection for specified memory segments. This bit will grant exclusive write
permission to specified masters within protected memory segment