29.6.14 Security Control

Important: if BOCOR.SECCFGLOCK = 0 after exiting the Boot ROM:
  • The secure boot flash code, before exiting, has the responsibility to lock the NVMCTRL security configurations by clearing the NVMCTRL.SECCTRL.SCFGWEN bit.
  • Write accesses (W*) are allowed.
Name: SECCTRL
Offset: 0x34
Reset: x/y initially determined after Reset from NVM User Row (UROW) / BOCOR.SECCFGLOCK
Property: PAC Write-Protection, Secure

Bit 3130292827262524 
 KEY[7:0] 
Access W/-/WW/-/WW/-/WW/-/WW/-/WW/-/WW/-/WW/-/W 
Reset 00000000 
Bit 2322212019181716 
          
Access  
Reset  
Bit 15141312111098 
      TEROW[2:0] 
Access RW/-/RWRW/-/RWRW/-/RW 
Reset 000 
Bit 76543210 
  DXNDALUNSCFGWENDSCENSILACC TAMPEEN 
Access R/-/RW*-/-/RW*RW/-/RW*RW/-/RWRW/-/RWRW/-/RW 
Reset xyy000 

Bits 31:24 – KEY[7:0] Write Key

When this bit group is written to the key value 0xA5, the write will be performed. If a value different from the key value is tried, the write will be discarded and INTFLAG.KEYE set.

Bits 10:8 – TEROW[2:0] Tamper Erase Row

Row address of the row in data space to be erased on RTC tamper event.

Bit 6 – DXN Data eXecute Never

Note: This bit field is only available for PIC32CM LS00/LS60 and has no effect for PIC32CM LE00.

This bit status is loaded from UROW during Boot ROM execution.

ValueDescription
0 Execution out of Data Flash is authorized.
1 Execution out of Data Flash is not authorized.

Bit 5 – DALUN DAL Unlock

Note: This bit field is only available for PIC32CM LS00/LS60 and has no effect for PIC32CM LE00.

Writing a '0' to this bit has no effect.

Writing a '1' to this bit will clear the DAL Unlock bit.

After Boot ROM execution:
  • DALUN=0 if BOCOR.SECCFGLOCK = 1
  • DALUN=1 if BOCOR.SECCFGLOCK = 0
Important: If DALUN=1, the secure software code of the Flash BOOT region MUST clear this bit before passing control on to the secure software code of the Flash APPLICATION region.
ValueDescription
0 DAL is forced to the DSU STATUSB.DAL value.

DAL can only be set to lower values.

DALUN cannot be written until the next erase.

1 DAL is forced to DAL0.

All SDAL commands are allowed.

Bit 4 – SCFGWEN Security Configuration Write Enable

Note: This bit field is only available for PIC32CM LS00/LS60 and has no effect for PIC32CM LE00.
After Boot ROM execution, this bit is:
  • Cleared if BOCOR.SECCFGLOCK = 1
  • Set if BOCOR.SECCFGLOCK = 0
Important: If SCFGWEN = 1, the secure software code of the Flash BOOT region has the responsibility to clear this bit before passing control on to the secure software code of the Flash APPLICATION region in order to lock the NVMCTRL security configurations.
ValueDescription
0 SCFGB, SCFGAD and SECCTRL.SCFGWEN cannot be written until the next reset.
1 SCFGB, SCFGAD and SECCTRL.SCFGWEN can be written.

Bit 3 – DSCEN Data Flash Scramble Enable

Note: This bit field is only available for PIC32CM LS00/LS60 and has no effect for PIC32CM LE00.
ValueDescription
0 Secure Data FLASH is not scrambled.
1 Secure Data FLASH is scrambled.

Bit 2 – SILACC Silent Access

ValueDescription
0 Data in Tamper Erase Row is not mapped as differential data.
1 Data in Tamper Erase Row is mapped as differential data.

Bit 0 – TAMPEEN Tamper Erase Enable

ValueDescription
0 RTC tamper event has no effect.
1 RTC tamper event triggers a Tamper Erase.