13.8 IDAU Regions Configuration

The device Boot ROM is in charge of configuring the module. All IDAU regions settings MUST be initialized prior to enabling the module. For PIC32CMGC devices, the BOOTCFG IDAU fuses are ignored and the configuration is hardcoded by the system and locked. For PIC32CMSG devices, the ROM code will configure the IDAU based on the BOOTCFG IDAU fuses user configuration, which will allow to configure the sizes of the different IDAU regions for BFM, PFM and SRAM. Through the fuses, the user also has the option to write lock the IDAU register, so that the configuration is locked till the next fuse update and device reboot.

Each IDAU region has its own register group composed of RCTRL, RSTATUSA, and RSTATUSB registers. The number of implemented register groups is readable from STATUSA.NBRG and cannot exceed 256.

To configure an IDAU region, first read its RSTATUSA register to determine its type. The type will determine which commands are legal and legal argument values.

Table 13-3. RSTATUS[A,B]
IDAU Region Type: RSTATUSA.TYPERSTATUSA.GRANRSTATUSA.MAXSZRSTATUSB.[SIZE,NONSEC]
INVALIDNA(reads 0)NA(reads 0)NA(reads 0)
SECNA(reads 0)NA(reads 0)NA(reads 0)
NONSEC_W

CFG

Size in Bytes of one RCTRL[w].ARGLSb

CFG

MAXSZ-1is the maximum value of RCTRL[w].ARG

IDAU region size in Bytes
NSC_W

CFG

Size in Bytes of one RCTRL[w].ARGLSb

CFG

MAXSZ-1is the maximum value of RCTRL[w].ARG

IDAU region size in Bytes
EXEMPT_B

CFG

Size in Bytes of a block

CFG

Maximum number of blocks inside the region

N/A. Secure versus Non-Secure configuration is applied in H2PB NONSEC register.
Note:
  1. Bolded cells denote static configuration whereas standard cells denote a configuration that can be modified using RCTRL commands.
  2. The _W suffix indicates the IDAU region has a watermark configuration.
  3. CFG: Hardcoded value to be read in the RSTATUSA register.
Table 13-4. Command and Arguments
RSTATUSA.TYPEValid RCTRL.CMD commandsRCTR.ARG

Valid when

INVALIDNoneNA
NONSEC_WWRSZ< RSTATUSA.MAXSZ
NSC_WWRSZ< RSTATUSA.MAXSZ (1)
EXEMPT_BReserved (2)Reserved (2)

For each IDAU region, the command and argument validity are checked by the macro. When a command or argument is not valid:

  • The command is discarded
  • An error is reported to STATUSB.CFGERR

Before writing CTRL.ENABLE = 1:

  • All configurable settings must be written (see the non-bolded cells in the RSTATUS[A,B] table)
  • STATUSB.CFGERR must be read 0

The CTRL.CMD ENABLE command is discarded when STATUSB.CFGERR is high.

Once STATUSA.ENABLE is set, configuration is applied at the system level.

Note:
  1. The NSC_W size can exceed the remaining space size left by the NONSEC IDAU region in the MAIN region. In this case, no CFGERR error is reported and the NSC_W region overlaps exactly the whole SEC IDAU region, the NSC_W region cannot overlap MAIN regions it does not belong to.
  2. The EXEMPT_B IDAU region type corresponds to the H2PB0/1/2 Main Regions. These regions are not configurable through the IDAU. For PIC32CMSG devices, the peripherals (bridges included) inside these regions can be defined as Secure/Non-Secure (or Mix-secure/Non-Secure for EIC and PORT) through the BOOTCFG H2PB fuses. The configuration is applied by the ROM code.