24.17 Pre-Program
The PIC32CX-BZ2 Flash supports an option to programming that
increases endurance and retention. This feature is called Pre-Program, and it requires
the user to perform the programming operation twice, first, with NVMCON2.NVMPREPG =
1
and, secondly, with NVMCON2.NVMPREPG = 0
. Any of
the programming operations (Single, Quad, Row) can be performed with this method. In all
other respects, the SFR setup is identical. To use this feature, set or clear the
NVMCON2.NVMPREPG SFR bit prior to setting the NVMWR bit. Pre-Program, typically double,
the native Endurance and Retention of the Flash.