Contents
Notice to Development Tools Customers
1. Preface
1.1. Conventions Used in This Guide
1.2. Recommended Reading
2. About the Emulator
2.1. Advantages
2.2. Components
2.3. Block Diagram
2.4. MPLAB ICE 4 and MPLAB X IDE
3. Connections
3.1. Power and Self Test
3.2. PC Connections
3.2.1. USB Default Connection
3.2.2. Wi-Fi and Ethernet - Modes
3.2.2.1. Wi-Fi Access Point (WiFi-AP)
3.2.2.2. Wi-Fi Station Mode (WiFi-STA)
3.2.2.3. Ethernet Wired/DHCP/APIPA
3.2.2.4. Ethernet Static IP
3.2.3. Wi-Fi and Ethernet - Setup and Tool Discovery
3.3. Target Connections
3.3.1. Target Connection Pinout
3.3.2. Adapter Boards
3.3.3. SAM MCUs - JTAG/SWD Adapter Board
3.3.3.1. JTAG Physical Interface
3.3.3.1.1. Connecting to a SAM JTAG Target
3.3.3.1.2. SAM JTAG Pinout (Cortex-M debug connector)
3.3.3.2. SAM SWD Interface
3.3.3.2.1. Connecting to a SAM SWD Target
3.3.3.2.2. SAM SWD Pinout
3.3.4. AVR MCUs - Adapter Boards
3.3.4.1. JTAG Physical Interface
3.3.4.1.1. Connecting to a AVR JTAG Target
3.3.4.1.2. AVR JTAG Pinout
3.3.4.2. AVR SPI Physical Interface
3.3.4.2.1. Connecting to an AVR SPI Target
3.3.4.2.2. AVR SPI Pinout
3.3.4.3. AVR PDI
3.3.4.3.1. Connecting to an AVR PDI Target
3.3.4.3.2. AVR PDI Pinout
3.3.4.4. AVR UPDI
3.3.4.4.1. Connecting to an AVR UPDI Target
3.3.4.4.2. AVR UPDI Pinout
3.3.4.5. AVR TPI
3.3.4.5.1. Connecting to an AVR TPI Target
3.3.4.5.2. AVR TPI Pinout
3.3.4.6. AVR debugWIRE
3.3.5. PIC MCUs - ICSP Adapter Board
3.3.5.1. ICSP Target Connection
3.3.5.2. ICSP Target Connection Circuitry
3.3.5.3. ICSP Target Connection and Power
3.3.6. SAM MCUs - Cortex-M Trace Adapter Board
3.3.6.1. SAM ITM Trace
3.3.6.2. SAM Trace Physical Connection
3.3.6.3. SAM Trace Target Connection
3.3.7. PIC Instrumented Trace Adapter Board
3.3.7.1. Native Trace Connections
3.3.7.2. SPI Trace Connections
3.3.7.3. IO Port Trace Connections
3.3.8. PIC32 Instruction Trace Adapter Board
3.3.8.1. PIC32 Instruction Trace - 14-pin EJTAG Connection
3.3.8.2. PIC32 Instruction Trace - PIM Support
3.3.8.3. PIC32 Instruction Trace - PIM Trace Connection
3.3.8.4. PIC32 Instruction Trace - Target Trace Connection
3.3.8.5. PIC32 Instruction Trace - Target ICSP Connection
4. Operation
4.1. MPLAB X IDE Debugging
4.2. AT Devices - On-Chip Debugging (OCD)
4.2.1. SAM Devices with JTAG/SWD
4.2.1.1. Arm CoreSight Components
4.2.1.2. Arm Cortex-M Types and Debug Features
4.2.2. tinyAVR®, megaAVR®, and XMEGA® Devices
4.2.2.1. tinyAVR OCD Features
4.2.2.1.1. TinyX-OCD (UPDI) Special Considerations
4.2.2.1.2. AVR devices with TPI
4.2.2.2. megaAVR OCD Features
4.2.2.2.1. megaAVR Special Considerations
4.2.2.3. AVR XMEGA OCD Features
4.2.2.3.1. AVR XMEGA Special Considerations
4.2.2.4. debugWIRE OCD Features
4.2.2.4.1. debugWIRE Special Considerations
4.2.2.4.2. debugWIRE Software Breakpoints
4.2.2.4.3. Understanding debugWIRE and the DWEN Fuse
4.2.2.5. Advanced Debugging (AVR JTAG/debugWIRE devices)
4.3. PIC MCU/dsPIC DSC - On-Chip Debugging
4.3.1. Emulator Basic Features
4.3.1.1. Start and Stop Emulation
4.3.1.2. View Processor Memory and Files
4.3.1.3. Use Breakpoints
4.3.1.3.1. Breakpoint Resources
4.3.1.3.2. Hardware or Software Breakpoint Selection
4.3.1.4. Use the Stopwatch
4.3.1.5. Set Freeze Peripherals
4.3.2. ICSP Debugging
4.3.2.1. Circuits That Will Prevent the Emulator From Functioning
4.3.2.2. Sequence of Operations Leading to Debugging
4.3.2.3. Debugging Details
4.3.2.4. Requirements for Debugging
4.3.2.5. Resources Used by the Debugger
4.3.2.6. Programming
4.3.3. PIC32M JTAG Debugging
4.3.3.1. PIC32M Types of JTAG
4.3.3.2. PIC32M Debug Features
5. Emulator Features
5.1. USB CDC Virtual COM Port
5.2. Data Gateway Interface
5.2.1. Interfaces
5.2.1.1. Timestamp
5.2.1.2. SPI Interface
5.2.1.3. USART Interface
5.2.1.4. I2C Interface
5.2.1.5. GPIO Interface
5.2.1.6. Power Interface
5.3. Data Capture and Runtime Watches - PIC MCUs and dsPIC DSCs
5.3.1. Data Capture and Streaming Data
5.3.2. Runtime Watches and Streaming Data (PIC32M MCUs)
5.3.3. Runtime Watches and the Watches Window
5.4. CI/CD Support
5.5. Instrumented Trace for PIC MCUs and dsPIC DSCs
5.5.1. Requirements for Trace
5.5.2. How Trace Works
5.5.3. Trace Methods
5.5.3.1. Native Trace
5.5.3.2. SPI Trace
5.5.3.3. I/O Port Trace
5.5.4. Hardware Setup
5.5.5. Setting Up Trace in MPLAB X IDE
5.5.6. Running Trace
5.5.7. Tracing Tips
5.5.8. Disabling Trace
5.5.9. Resource Usage Examples
5.5.10. More on Trace/Log ID Numbers
5.5.11. Trace Quick Reference
5.6. Instruction Trace for PIC32M MCUs
5.6.1. Requirements for Instruction Trace
5.6.2. How Instruction Trace Works
5.6.3. Hardware Setup
5.6.4. Set Up Instruction Trace in MPLAB X IDE
5.6.5. Viewing Instruction Trace Data
5.7. SAM ITM/SWO Trace
5.7.1. Requirements for ITM Trace
5.7.2. How ITM/SWO Trace Works
5.7.2.1. SAM ITM Trace
5.7.2.2. SAM Serial Wire Output (SWO)
5.7.3. Hardware Setup
5.7.4. Set Up ITM in MPLAB X IDE
5.7.4.1. Setup the Clock
5.7.4.2. Setup ITM Trace
5.7.5. Viewing ITM Data
5.7.6. Software Implementation
5.8. PC Sampling – 16-Bit PIC MCUs Only
5.8.1. Requirements
5.8.2. Clock Setup
5.8.3. Sampling Setup
5.8.4. Operation
5.9. PC Profiling – 32-Bit MCUs Only
5.9.1. Requirements
5.9.2. Profiling Setup
5.9.3. Operation
5.10. Debugger Polling
5.10.1. Requirements
5.10.2. Operation
5.11. Power Monitor
5.11.1. Getting Started with Power Monitoring
5.11.2. Detailed Use Cases
5.11.2.1. Low-Power Application
5.11.2.1.1. Requirements
5.11.2.1.2. Hardware Setup
5.11.2.1.3. Connections
5.11.2.1.4. Project Creation
5.11.2.1.5. Software Setup
5.11.2.1.6. MPLAB Data Visualizer Displays
6. Troubleshooting First Steps
6.1. Some Questions to Answer First
6.2. Top Reasons Why You Can't Debug
6.3. General Considerations
6.4. How to Use the Hardware Tool Emergency Boot Firmware Recovery Utility
7. Frequently Asked Questions (FAQ)
7.1. How Does It Work?
7.2. What's Wrong?
7.2.1. My computer went into power-down/hibernate mode, and now my debugger won’t work. What happened?
7.2.2. Performing a Verify fails after programming the device. Is this a programming issue?
7.2.3. During Native Trace, I manually halted my program and now the last trace record has been lost. What happened?
7.2.4. I set my 16-bit device peripheral to NOT freeze on halt, but it is suddenly freezing. What's going on?
7.2.5. When using a 16-bit device, an unexpected Reset occurred. How do I determine what caused it?
8. Error Messages
8.1. Types of Error Messages
8.1.1. Corrupted/Outdated Installation Errors
8.1.2. Debug Failure Errors
8.1.3. Miscellaneous Errors
8.1.4. List of Error Messages
8.2. General Corrective Actions
8.2.1. Read/Write Error Actions
8.2.2. Debugger to Target Communication Error Actions
8.2.3. Debugger to Computer Communication Error Actions
8.2.4. Corrupted Installation Actions
8.2.5. USB Port Communication Error Actions
8.2.6. Debug Failure Actions
8.2.7. Internal Error Actions
9. Emulator Function Summary
9.1. Emulator Selection and Switching
9.2. Emulator Options Selection
9.2.1. Memories to Program
9.2.2. Debug Options
9.2.3. Program Options
9.2.4. ICE 4 Tool Options
9.2.5. Freeze Peripherals
9.2.6. Trace and Profiling
9.2.7. Power
9.2.8. Clock
9.2.9. Communications
9.2.10. Tool Pack Selection
9.3. Emulator Windows & Dialogs
9.3.1. Trace Window and Related Dialogs
9.3.2. ITM Window and Related Dialogs
10. Hardware Specification
10.1. Emulator Unit
10.2. Power Specifications
10.3. Indicator Lights (LEDs)
10.4. PC Connection Specifications
10.4.1. USB Type C Connector (J1) and Cable
10.4.2. Ethernet Connector (J6) and Cable
10.5. Target Connection Specifications
10.5.1. 40-pin Emulator Unit Connector (J10)
10.5.2. Target Connection Cable
10.5.3. Adapter Boards and Cables
10.5.4. Current Sense Module
10.6. Recovery Specifications
10.7. Target Board Considerations
11. Revision History
12. Support
12.1. Warranty Registration
12.2. myMicrochip Personalized Notification Service