12.2.1.4 PIC32CM LS00/LS60 Memory Mapping Configuration Summary
The table below summarizes the mapping of the PIC32CM LS00/LS60 memory regions.
Memory region | Base address | Size |
---|---|---|
Flash BOOT region | 0x00000000 | BOOTPROT * 256Bytes |
Secure Flash (BOOT region) | 0x00000000 | BOOTPROT*256Bytes - BNSC*32Bytes |
Non-Secure Callable Flash (BOOT region) | Contiguous to Secure Flash (BOOT region) | BNSC * 32Bytes |
Flash APPLICATION region | BOOTPROT * 256Bytes | Flash size - BOOTPROT*256Bytes |
Secure Flash (APPLICATION region) | BOOTPROT * 256Bytes | AS*256Bytes-ANSC*32Bytes |
Non-Secure Callable Flash (APPLICATION region) | Contiguous to Secure Flash (APPLICATION region) | ANSC * 32Bytes |
Non-Secure Flash (APPLICATION region) | (BOOTPROT+AS) * 256Bytes | Flash size - (BOOTPROT*256Bytes + AS*256Bytes) |
Secure Data Flash | 0x00400000 | DS * 256Bytes |
Non-Secure Data Flash | Contiguous to Secure Data Flash | 2KB - Secure Data Flash size |
Secure SRAM | 0x20000000 | RS * 128Bytes |
Non-Secure SRAM | Contiguous to Secure SRAM | SRAM 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.
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