15.6.1 Write Control

Important: If BOCOR.SECCFGLOCK == 0 after exiting the Boot ROM, the secure software code of the Flash BOOT region, before passing control on to the secure software code of the Flash APPLICATION region, MUST lock the current security attribution of each peripheral using the SECLOCK command.
Name: WRCTRL
Offset: 0x00
Reset: 0x00020021
Property: Mix-Secure

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
 KEY[7:0] 
Access RW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RW 
Reset 00000000 
Bit 15141312111098 
 PERID[15:8] 
Access RW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RW 
Reset 00000000 
Bit 76543210 
 PERID[7:0] 
Access RW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RWRW/RW/RW 
Reset 00000000 

Bits 23:16 – KEY[7:0] Peripheral Access Control Key

These bits define the peripheral access control key:

ValueNameDescription
0x0OFFNo action
0x1CLRClear the peripheral write control
0x2SETSet the peripheral write control
0x3SETLCKSet and lock the peripheral write control until the next hardware reset
0x4SETSECPIC32CM LS00/LS60 only:

Set the peripheral as Secure (the NONSEC bit is set to 0)

This command is not supported if BOCOR.SECCFGLOCK == 1 after exiting the Boot ROM

0x5SETNONSECPIC32CM LS00/LS60 only:

Set the peripheral as Non-Secure (the NONSEC bit is set to 1)

This command is not supported if BOCOR.SECCFGLOCK == 1 after exiting the Boot ROM

0x6SECLOCKPIC32CM LS00/LS60 only:

Lock the current peripheral security attribution until the next reset

This command is not supported if BOCOR.SECCFGLOCK == 1 after exiting the Boot ROM

Bits 15:0 – PERID[15:0] Peripheral Identifier

Note: Refer to the Configuration Summary for the list of peripherals and peripheral instances present in each variant.

The PERID represents the peripheral whose control is changed using the WRCTRL.KEY.

Table 15-2. Peripheral Identifier
PeripheralIdentifier
APBA Peripherals
PAC0
PM1
MCLK2
RSTC3
OSCCTRL4
OSC32KCTRL5
SUPC6
GCLK7
WDT8
RTC9
EIC10
FREQM11
PORT12
AC13
APBB Peripherals
IDAU32
DSU33
NVMCTRL34
DMAC35
HMATRIXHS36
USB37
APBC Peripherals
EVSYS64
SERCOM065
SERCOM166
SERCOM267
SERCOM368
SERCOM469
SERCOM570
TC071
TC172
TC273
TCC074
TCC175
TCC276
TCC377
ADC78
DAC79
PTC80
TRNG81
CCL82
I2S83
OPAMP84
TRAM85