5.1.2 Nonvolatile Memory
The PIC16F, PIC18F and PIC32CM MCUs feature a Nonvolatile Memory Module/Controller (NVM/NVMCTRL) that manages access to on-chip Flash memory and other nonvolatile memory regions. Both MCUs support in-system programming, self-programming, bootloader support, and configurable memory protection for secure code and data storage. Both controllers are designed for reliable program and data storage, with mechanisms for memory protection and flexible access. The following table provides a comparison of the features of PIC16F, PIC18F, and PIC32CM.
| Feature | PIC16F NVM | PIC18F NVM | PIC32CM NVMCTRL |
|---|---|---|---|
| Bus Interface | Dedicated SFRs (NVMREG, EE) | Dedicated SFRs (NVMREG) |
32-bit Advanced High-performance Bus (AHB) for memory read/write 32-bit Advanced Peripheral Bus (APB) for memory control |
| Flash Memory | Program Flash Memory (PFM) | Program Flash Memory (PFM) | Main Flash array |
| EEPROM | Separate Data EEPROM block (DFM) | Separate Data EEPROM block (DFM) | EEPROM emulation (RWWEE) |
| Memory Protection |
Code protection Block write protection |
Code protection Block write protection Table read protection | Boot, 16 individually protected regions |
| Signature Row/Device ID | Configuration Memory space/Device Information Area (Device ID, Revision ID) | Configuration Memory space/Device Information Area (Device ID, Revision ID) | Memory-mapped to AHB |
| User Row | Mapped to PFM | Mapped to PFM | Memory-mapped to AHB |
| Wait State Configuration | Fixed | Fixed or programmable | Programmable |
| Cache | N/A | N/A | Direct-mapped cache |
| Power Management | Supported | Supported |
Flash block power-down in sleep Wake up on access |
| Security Bit/Device Lock |
Code Protection (CP/CPD) Configuration bits |
Code Protection (CP/CPD) Configuration bits | Security bit, device protection |
| Access in Sleep Modes | Sleep, Idle, Doze (RAM accessible in sleep, Flash not accessible) | Sleep, Idle, Doze (RAM accessible in sleep, Flash not accessible) | Wake up on access or exit from sleep |
