English
Language : 

PIC32MX320F032H_11 Datasheet, PDF (85/214 Pages) Microchip Technology – High-Performance, General Purpose and USB, 32-bit Flash Microcontrollers
PIC32MX3XX/4XX
5.0 FLASH PROGRAM MEMORY
Note 1: This data sheet summarizes the features
of the PIC32MX3XX/4XX family of
devices. It is not intended to be a compre-
hensive reference source. To comple-
ment the information in this data sheet,
refer to Section 5. “Flash Program
Memory” (DS61121) of the “PIC32
Family Reference Manual”, which is
available from the Microchip web site
(www.microchip.com/PIC32).
2: Some registers and associated bits
described in this section may not be
available on all devices. Refer to
Section 4.0 “Memory Organization” in
this data sheet for device-specific register
and bit information.
PIC32MX3XX/4XX devices contain an internal
program Flash memory for executing user code. There
are three methods by which the user can program this
memory:
• Run-Time Self Programming (RTSP)
• In-Circuit Serial Programming™ (ICSP™)
• EJTAG Programming
RTSP is performed by software executing from either
Flash or RAM memory. EJTAG is performed using the
EJTAG port of the device and a EJTAG capable
programmer. ICSP is performed using a serial data
connection to the device and allows much faster pro-
gramming times than RTSP. RTSP techniques are
described in this chapter. The ICSP and EJTAG
methods are described in the “PIC32MX Flash
Programming Specification” (DS61145), which can be
downloaded from the Microchip web site.
Note:
Flash LVD Delay (LVDstartup) must be
taken into account between setting up and
executing any Flash command operation.
See Example 5-1 for a code example to
set up and execute a Flash command
operation.
EXAMPLE 5-1:
NVMCON = 0x4004;
Wait(delay);
// Enable and configure for erase operation
// Delay for 6 µs for LVDstartup
NVMKEY = 0xAA996655;
NVMKEY = 0x556699AA;
NVMCONSET = 0x8000;
// Initiate operation
while(NVMCONbits.WR==1); // Wait for current operation to complete
© 2011 Microchip Technology Inc.
DS61143H-page 85