5.1 Programming Interface

Figure 5-2 shows the basic programming interface in the PIC32 devices. Descriptions of each interface block are provided in subsequent sections.
Figure 5-2. Basic PIC32 Programming Interface Block Diagram

Enhanced Tag Access Port (ETAP)

This block serially feeds instructions and data into the CPU.

Microchip Tag Access Port (MTAP)

In addition to the EJTAG TAP (ETAP) controller, the PIC32 device uses a second proprietary TAP controller for additional operations. The Microchip TAP (MTAP) controller supports two instructions relevant to programming, MTAP_COMMAND and TAP switch instructions. See Table 20-1 for complete list of instructions. The MTAP_COMMAND instruction provides a mechanism for a JTAG probe to send commands to the device through its Data register.

The programmer sends commands by shifting in the MTAP_COMMAND instruction through the SendCommand pseudo operation, and then sending the MTAP_COMMAND DR commands through the XferData pseudo operation, see Table 20-2 for specific commands. The probe does not need to issue an MTAP_COMMAND instruction for every command shifted into the Data register.

Two-Wire or Four-Wire

This block converts the Two-Wire ICSP interface to the Four-Wire JTAG interface.

CPU

The CPU executes instructions at 8 MHz through the internal oscillator.

Flash Controller

The Flash controller controls erasing and programming of the Flash memory on the device.

Flash Memory

The PIC32 device Flash memory is divided into two logical Flash partitions consisting of the Boot Flash Memory (BFM) and Program Flash Memory (PFM). The BFM begins at address 0x1FC00000, and the PFM begins at address 0x1D000000. Each Flash partition is divided into pages, which represent the smallest block of memory that can be erased. Depending on the device, page sizes are 256 words (1024 bytes), 1024 words (4096 bytes) or 4096 words (16,384 bytes). Row size indicates the number of words that are programmed with the row program command. There are always eight rows within a page; therefore, devices with 256, 1024 and 4096 word page sizes have 32, 128 and 512 word row sizes, respectively. Table 5-1 shows the PFM, BFM, row and page size of each device family.

For a PIC32MZ W1 device, the BFM begins at address 0x1FC00000, and the PFM begins at address 0x10000000. The Flash is divided into pages of 1024 words or 4-KB, which represents the smallest block of memory that can be erased. Row size indicates the number of words that are programmed with row program commands. The Flash contains four rows within a page with a total row size of 256 words or 1024 bytes.

Memory locations of the BFM are reserved for the device Configuration registers, see Configuration Memory and Device ID for more information.

Table 5-1. Code Memory Size
PIC32 DeviceRow Size (Words)Page Size (Words)Boot Flash Memory Address (Bytes)(1)Programming Executive(2, 3)
PIC32MX 110/120/130/150/170210/220/230/350/270 (28/36/44 pin devices only)322560x1FC00000-0x1FC00BFF (3 KB) RIPE_11_aabbcc.hex
PIC32MX

120/130/150/170/230/250/270/530/550/57

(64/100-pin devices only)

PIC32MX

15X/17X/25X/27X

(28/44-pin devices only)

0x1FC00000-0x1FC02FFF (12 KB)
PIC32MZW1

10XX/20XX

25610240x1FC00000-0x1FC0FFFF (64 KB)RIPE_25_aabbcc.hex
PIC32MX

330/350/370/430/450/470

12810240x1FC00000-0x1FC02FFF (12 KB)RIPE_06_aabbcc.hex
PIC32MX

320/340/360/420/440/460

PIC32MX

534/564/664/764

PIC32MX

575/675/695/795

PIC32MK

0512/1024XXD/E/F/K/L/M

1281024
  • 0x1FC00000-0x1FC04FFF (20 KB)
  • 0x1FC20000-0x1FC24FFF (20 KB)
RIPE_15a_aabbcc.hex
PIC32MK

0256/0512XXG/H

12810240x1FC00000-0x1FC04FFF (20 KB)RIPE_15a_aabbcc.hex
PIC32MZ

05XX/10XX/20XX

5124096
  • 0x1FC00000-0x1FC13FFF (80 KB)
  • 0x1FC20000-0x1FC33FFF (80 KB)
RIPE_15_aabbcc.hex
Note:
  1. Program Flash memory address ranges are based on the program Flash size. The following are the program Flash memory addresses:

    • 0x1D000000-0x1D003FFF (16 KB)
    • 0x1D000000-0x1D007FFF (32 KB)
    • 0x1D000000-0x1D00FFFF (64 KB)
    • 0x1D000000-0x1D01FFFF (128 KB)
    • 0x1D000000-0x1D03FFFF (256 KB)
    • 0x1D000000-0x1D07FFFF (512 KB)
    • 0x1D000000-0x1D0FFFFF (1024 KB)
    • 0x1D000000-0x1D1FFFFF (2048 KB)

    All program Flash memory sizes are not supported by each family.

    The program Flash memory address ranges for the PIC32MZ W1 family are as follows:
    • 10XX: 0x10000000-0x100FFFFF (1024 KB)
    • 20XX: 0x10000000-0x101FFFFF (2048 KB)
  2. The Programming Executive can be obtained from the related product page on the Microchip website or it can be located in the following MPLAB® X IDE installation folders:

    • …\Microchip\MPLABX\<version>\mplab_ide\mplablibs\modules\ext\REALICE.jar
    • …\Microchip\MPLABX\<version>\mplab_ide\mplablibs\modules\ext\ICD3.jar
    • …\Microchip\MPLABX\<version>\mplab_ide\mplablibs\modules\ext\PICKIT3.jar
  3. The last characters of the file name, aabbcc, vary based on the revision of the file.