12.2.1.4 PIC32CM LS00/LS60 Memory Mapping Configuration Summary

The table below summarizes the mapping of the PIC32CM LS00/LS60 memory regions.

Table 12-1. PIC32CM LS00/LS60 Memory Regions Mapping
Memory regionBase addressSize
Flash BOOT region0x00000000BOOTPROT * 256Bytes
Secure Flash (BOOT region)0x00000000BOOTPROT*256Bytes - BNSC*32Bytes
Non-Secure Callable Flash (BOOT region)Contiguous to Secure Flash (BOOT region)BNSC * 32Bytes
Flash APPLICATION regionBOOTPROT * 256BytesFlash size - BOOTPROT*256Bytes
Secure Flash (APPLICATION region)BOOTPROT * 256BytesAS*256Bytes-ANSC*32Bytes
Non-Secure Callable Flash (APPLICATION region) Contiguous to Secure Flash (APPLICATION region)ANSC * 32Bytes
Non-Secure Flash (APPLICATION region)(BOOTPROT+AS) * 256BytesFlash size - (BOOTPROT*256Bytes + AS*256Bytes)
Secure Data Flash0x00400000DS * 256Bytes
Non-Secure Data FlashContiguous to Secure Data Flash2KB - Secure Data Flash size
Secure SRAM0x20000000RS * 128Bytes
Non-Secure SRAMContiguous to Secure SRAMSRAM size - Secure SRAM size
Important: Refer to “Memory and Peripheral Security Configurations” section for more details on the programming of BOOTPROT, BNSC, AS, ANSC, DS and RS parameters.
Here are the default memories configuration from fresh from factory or after a ChipErase_ALL command.
Figure 12-5. PIC32CM LS00/LS60 Default Memories Mapping - 512KB Flash Case
Figure 12-6. PIC32CM LS00 Default Memories Mapping - 256KB Flash Case
Here is a configuration example for a device with 512KB of Flash, 16KB of Data Flash and 64KB of SRAM:
  • BOOT region:
    • Flash BOOT region size = 8KB => BOOTPROT = 8192 / 256 = 32 (0x20)
    • Non-Secure Callable Flash (BOOT region) size = 1KB => BNSC = 1024 / 32 = 32 (0x20)
    • Secure Flash (BOOT region) = 8KB - 1KB = 7KB
  • APPLICATION region:
    • Flash (APPLICATION region) size = 512KB - 8KB = 504KB
    • Non-Secure Callable Flash (APPLICATION region) size = 1KB => ANSC = 1024 / 32 = 32 (0x20)
    • Secure Flash (APPLICATION region) = 15KB
      • => Secure Flash (APPLICATION region) + Non-Secure Callable Flash (APPLICATION region) size = 16KB
      • => AS * 256 = 16 * 1024 <=> AS = 64 (0x40)
    • Non-Secure Flash (APPLICATION region) size = 504KB - 16KB = 488KB
  • Data Flash region:
    • Secure Data Flash size = 8KB => DS = 8192 / 256 = 32 (0x20)
    • Non-Secure Data Flash size = 16KB - 8KB = 8KB
  • SRAM region:
    • Secure SRAM size = 32KB => RS = 32768 / 128 = 256 (0x100)
    • Non-Secure SRAM size = 64KB - 32KB = 32KB