English
Language : 

PIC32MX795F512L-80IPT Datasheet, PDF (24/68 Pages) Microchip Technology – PIC32 Flash Programming Specification
PIC32
10.0 ENTERING SERIAL
EXECUTION MODE
Before a device can be programmed, it must be
placed in Serial Execution mode. The procedure for
entering Serial Execution mode consists of verifying
that the device is not code-protected. If the device is
code-protected, a Chip Erase must be performed.
See Section 9.0 “Erasing the Device” for details.
FIGURE 10-1:
ENTERING SERIAL
EXECUTION MODE
Select MTAP
SendCommand (MTAP_SW_MTAP)
Put MTAP in Command Mode
SendCommand (MTAP_COMMAND)
Read Code-Protect Status
statusVal = XferData (MCHP_STATUS)
CPS = 1 No
Yes
Cannot Enter
Must Erase First
Assert Reset
XferData (MCHP_ASSERT_RST)
2-wire
Select ETAP
SendCommand (MTAP_SW_ETAP)
Put CPU in Serial Exec Mode
SendCommand (ETAP_EJTAGBOOT)
10.1 4-wire Interface
The following steps are required to enter Serial
Execution mode:
Note:
It is assumed that MCLR has been driven
low from the previous Check Device
Status step (see Figure 8-1).
1. SendCommand (MTAP_SW_MTAP).
2. SendCommand (MTAP_COMMAND).
3. statusVal = XferData (MCHP_STATUS).
4. If CPS (statusVal<7>) is not ‘1’, the device must
be erased first.
5. SendCommand (MTAP_SW_ETAP).
6. SendCommand (ETAP_EJTAGBOOT).
7. Set MCLR high.
10.2 2-wire Interface
The following steps are required to enter Serial
Execution mode:
1. SendCommand (MTAP_SW_MTAP).
2. SendCommand (MTAP_COMMAND).
3. statusVal = XferData (MCHP_STATUS).
4. If CPS (statusVal<7>) is not ‘1’, the device must
be erased first.
5. XferData (MCHP_ASSERT_RST).
6. SendCommand (MTAP_SW_ETAP).
7. SendCommand (ETAP_EJTAGBOOT).
8. SendCommand (MTAP_SW_MTAP).
9. SendCommand (MTAP_COMMAND).
10. XferData (MCHP_DE_ASSERT_RST).
11. XferData (MCHP_FLASH_ENABLE) – This step is
not required for PIC32MZ EC family devices.
12. SendCommand (MTAP_SW_ETAP).
Select MTAP
SendCommand (MTAP_SW_MTAP)
Put MTAP in Command Mode
SendCommand (MTAP_COMMAND)
Set MCLR High
4-wire
Release Reset
XferData (MCHP_DE_ASSERT_RST)
Enable Flash
XferData (MCHP_FLASH_EN)
Not required for PIC32MZ EC devices
Select ETAP
SendCommand (MCHP_SW_ETAP)
2-wire
DS61145L-page 24
 2007-2013 Microchip Technology Inc.