English
Language : 

PIC32MX795F512L-80IPT Datasheet, PDF (1/68 Pages) Microchip Technology – PIC32 Flash Programming Specification
PIC32
PIC32 Flash Programming Specification
1.0 DEVICE OVERVIEW
This document defines the programming specification
for the PIC32 families of 32-bit microcontrollers. This
programming specification is designed to guide
developers of external programmer tools. Customers
who are developing applications for PIC32 devices
should use development tools that already provide
support for device programming.
The major topics of discussion include:
• Section 1.0 “Device Overview”
• Section 2.0 “Programming Overview”
• Section 3.0 “Programming Steps”
• Section 4.0 “Connecting to the Device”
• Section 5.0 “EJTAG vs. ICSP”
• Section 6.0 “Pseudo Operations”
• Section 7.0 “Entering 2-Wire Enhanced ICSP Mode”
• Section 8.0 “Check Device Status”
• Section 9.0 “Erasing the Device”
• Section 10.0 “Entering Serial Execution Mode”
• Section 11.0 “Downloading the Programming Executive (PE)”
• Section 12.0 “Downloading a Data Block”
• Section 13.0 “Initiating a Flash Row Write”
• Section 14.0 “Verify Device Memory”
• Section 15.0 “Exiting Programming Mode”
• Section 16.0 “The Programming Executive”
• Section 17.0 “Checksum”
• Section 18.0 “Configuration Memory and Device ID”
• Section 19.0 “TAP Controllers”
• Section 20.0 “AC/DC Characteristics and Timing Requirements”
• Appendix A: “PIC32 Flash Memory Map”
• Appendix B: “Hex File Format”
• Appendix C: “Revision History”
2.0 PROGRAMMING OVERVIEW
All PIC32 devices can be programmed through two
primary methods:
• Self-programming
• External tool programming
The self-programming method requires that the target
device already contains executable code with the logic
necessary to complete the programming sequence.
The external tool programming method does not
require any code in the target device – it can program
all target devices with or without any executable code.
This document describes the external tool
programming method. Refer to the individual sections
of the “PIC32 Family Reference Manual” and the
specific device data sheet for more information about
using the self-programming method.
An external tool programming setup consists of an
external programmer tool and a target PIC32 device.
Figure 2-1 illustrates the block diagram view of the
typical programming setup. The programmer tool is
responsible for executing necessary programming
steps and completing the programming operation.
FIGURE 2-1:
PROGRAMMING SYSTEM
SETUP
Target PIC32 Device
External
Programmer
CPU
On-Chip Memory
2.1 Devices with Dual Flash Panel and
Dual Boot Regions
The PIC32MZ Embedded Connectivity (EC) family of
devices incorporate several features useful for field
(self) programming of the device. These features
include dual Flash panels with dual Boot regions, an
aliasing scheme for the Boot regions allowing auto-
matic selection of Boot code at start-up and a panel
swap feature for program Flash. The two Flash panels
and their associated Boot regions can be erased and
programmed separately. Refer to Section 3. “Memory
Organization” (DS61115) in the “PIC32 Family
Reference Manual” for a detailed explanation of these
features.
A development tool used for production programming
will not be concerned about most of these features with
the following exceptions:
• Insuring that the SWAP bit (NVMCON<7>) is in the
proper setting. The default setting is ‘0’ for no swap
of panels. The development tool should assume the
default setting when generating source files for the
programming tool.
• Proper handling of the aliasing of the Boot memory
in the checksum calculation. The aliased sections
will be duplicates of the fixed sections. See
Section 17.0 “Checksum” for more information on
checksum calculations with aliased regions.
 2007-2013 Microchip Technology Inc.
DS61145L-page 1