background image

The device on which you are attempting to operate (read, program, blank check or verify) is code protected, in other
words, the code cannot be read or modified. Check your Configuration bits setting for code protection (

Windows >

Target Memory Views > Configuration Bits

).

Disable code protection, set or clear the appropriate Configuration bits in code or in the Configuration Bits window
according to the device data sheet. Then erase and reprogram the entire device.

If these actions fail to fix the problem, see 

Debugger to Target Communication Error Actions

 and 

8.2.6  Debug Failure

Actions

.

8.1.4 

Miscellaneous Errors

MPLAB PICkit 4 is busy. Please wait for the current operation to finish.

If you receive this error when attamepting to deselect the debugger as a debugger or programmer:

1.

Wait. Give the debugger time to finish any application tasks. Then try to deselect the debugger again.

2.

Select 

(Finish Debugger Session) to stop any running applications. Then, try to deselect the debugger

again.

3.

Unplug the debugger from the computer. Then, try to deselect the debugger again.

4.

Shut down MPLAB X IDE.

8.1.5 

List of Error Messages

Table 8-1. Alphabetized List Of Error Messages

AP_VER=Algorithm Plugin Version

AREAS_TO_PROGRAM=The following memory area(s) will be programmed:

AREAS_TO_READ=The following memory area(s) will be read:

AREAS_TO_VERIFY=The following memory area(s) will be verified:

BLANK_CHECK_COMPLETE=Blank check complete, device is blank.

BLANK_CHECK_FAILED=Blank check failed. The device is not blank.

BLANK_CHECKING=Blank Checking...

BOOT_CONFIG_MEMORY=boot config memory

BOOT_VER=Boot Version

BOOTFLASH=boot flash

BP_CANT_B_DELETED_WHEN_RUNNING=software breakpoints cannot be removed while the target is running.
The selected breakpoint will be removed the next time the target halts.

CANT_CREATE_CONTROLLER=Unable to find the tool controller class.

CANT_FIND_FILE=Unable to locate file %s.

CANT_OP_BELOW_LVPTHRESH=The voltage level selected %f, is below the minimum erase voltage of %f. The
operation cannot continue at this voltage level.

CANT_PGM_USEROTP=The debug tool cannot program User OTP memory because it is not blank. Please
exclude User OTP memory from the memories to program or switch to a device with blank User OTP memory.

CANT_PRESERVE_PGM_MEM=Unable to preserve program memory: Invalid range Start = %08x, End = %08x.

CANT_READ_REGISTERS=Unable to read target register(s).

CANT_READ_SERIALNUM=Unable to read the device serial number.

CANT_REGISTER_ALTERNATE_PNP=Unable to register for PNP events for multiple USB product IDs.

 

Error Messages

©

 2020 Microchip Technology Inc.

 User Guide

DS50002751D-page 39

Содержание MPLAB PICkit 4

Страница 1: ...icrochip com to obtain the latest documentation available Documents are identified with a DS number This number is located on the bottom of each page in front of the page number The numbering conventi...

Страница 2: ...up 18 4 2 Debug Tutorial 18 4 3 Quick Debug Program Reference 18 4 4 Debugger Limitations 19 4 5 Common Debug Features 19 4 6 Connecting the Target Board 20 4 7 Setting Up the Target Board 20 4 8 Sett...

Страница 3: ...58 11 4 Target Board Considerations 61 12 Revision History 63 12 1 Revision A May 2018 63 12 2 Revision B August 2018 63 12 3 Revision C October 2018 63 12 4 Revision D January 2020 63 13 Support 64...

Страница 4: ...or messages and suggested resolutions 10 Debugger Function Summary A summary of debugger functions available in MPLAB X IDE when the MPLAB PICkit 4 In Circuit Debugger is chosen as the debug or progra...

Страница 5: ...ensive help file for the MPLAB X IDE It includes an overview of embedded systems installation requirements tutorials details on creating new projects setting build properties debugging code setting co...

Страница 6: ...install and use headers Headers are used to better debug selected devices without the loss of pins or resources See also the PEP and Header online Help file Introduction 2020 Microchip Technology Inc...

Страница 7: ...debugger system executes code like an actual device because it uses a device with built in emulation circuitry instead of a special debugger chip All available features of a given device are accessib...

Страница 8: ...d from power surges from the target VDD and VPP voltage monitors protect against overvoltage conditions all lines have over current protection Programming debugging pins with a programmable range of r...

Страница 9: ...MPLAB processor extension paks 2 4 MPLAB PICkit 4 Block Diagram USB HS SYSTEM SIE I2C RGB LED uSD CARD HSMCI PGM IDENTIFIERS SPI SCALERS LOGIC BUFFER VDD MONITOR VPP MONITOR VDD GEN VPP GEN VPP ON VP...

Страница 10: ...ections CAUTION Communication Failure Do not connect the hardware before installing the software and USB drivers CAUTION Debugger or Target Damage Do not change hardware connections while the debugger...

Страница 11: ...e using as well as the application notes and the specific interface for additional information and diagrams 3 2 1 Standard Communication Target Connection USING SINGLE IN LINE CONNECTOR Use the single...

Страница 12: ...d to be connected from the VPP MCLR line to VDD so that the line may be strobed low to reset the device Figure 3 4 Standard Connection to Target Circuitry 3 2 3 Target Powered In the following descrip...

Страница 13: ...t floating Also devices with a VCAP line PIC18FXXJ for example should be connected to the appropriate capacitor or level Note The interconnection is very simple Any problems experienced are often caus...

Страница 14: ...MPLAB PICkit 4 In Circuit Debugger system as a debugger The first requires that an application is programmed into the target device usually with the MPLAB PICkit 4 itself The second uses the internal...

Страница 15: ...ust have its Configuration words programmed correctly These are set using the MPLAB X IDE The oscillator Configuration bits should correspond to RC XT etc depending on the target design For some devic...

Страница 16: ...the instruction at the breakpoint address is executed the in circuit debug mechanism of the target device fires and transfers the device s program counter to the debug executive much like an interrup...

Страница 17: ...memory for some target devices Special in circuit debug registers in the target device are disabled by MPLAB X IDE along with all debug features This means that a breakpoint cannot be set and registe...

Страница 18: ...ol Help Contents MPLAB X IDE Help for detailed instructions on creating and setting up a new project and running and debugging code Items of note 1 Each debugger contains a unique identifier which whe...

Страница 19: ...lable All for device breakpoints etc N A Serial Quick Time Programming SQTP N A Use the MPLAB IPE to generate the SQTP file Command line Operation Use MDB command line utility found by default in C Pr...

Страница 20: ...ger For connection information see Debugger to Target Communication 4 7 2 Using ICE Devices Notice For header support see the latest Release Notes for MPLAB PICkit 4 in MPLAB X IDE v5 25 or greater Fo...

Страница 21: ...n it has detected the target and has detected the device If you have not already done so connect the MPLAB PICkit 4 to the target board using the appropriate cables see 4 6 Connecting the Target Board...

Страница 22: ...ion 4 11 1 Breakpoint Resources In 16 bit devices breakpoints data captures and run time watches use the same resources Therefore the available number of breakpoints is actually the available number o...

Страница 23: ...dent on oscillator speed time to program Flash Memory and page size Breakpoint skidding Most devices See the online Help Limitations section for details No Where information about the breakpoint is wr...

Страница 24: ...ode Figure 5 1 MPLAB PICkit 4 In Circuit Debugger Diagram Prerequisites for Programmer To Go MPLAB X IDE or MPLAB IPE v5 25 or greater must be installed on your computer MicroSDHC Card a formatted FAT...

Страница 25: ...pack that supplies regulated 5V into the MPLAB PICkit 4 USB Micro B connector The USB power source used should meet the following minimum criteria Is able to supply at least 350 mA of current to the...

Страница 26: ...ammer options should be set up for Programmer To Go operation In fact it is highly recommended to test programming a target device from the software first with all desired options to ensure the device...

Страница 27: ...If both the Send image to tool and Program Device check boxes are unchecked see 5 3 3 Setting Up PTG Mode Without a Memory Card 8 Click Apply then OK Use the Make and Program Device Main Project icon...

Страница 28: ...PICkit 4 2 Ensure that you have the appropriate connections to the device for Programmer To Go PICkit 4 is connected to the computer via the USB cable PICkit 4 is connected via the appropriate progra...

Страница 29: ...cked the device connected to the MPLAB PICkit 4 is programmed Note If both the Send image to tool and Program Device check boxes are unchecked see 5 3 3 Setting Up PTG Mode Without a Memory Card 7 Cli...

Страница 30: ...a microSDHC card inserted to the target board with the device specified in your project 2 Ensure that you have the appropriate connections to the device for Programmer To Go PICkit 4 is connected via...

Страница 31: ...it tool does not detect Vdd from the target the LED will blink red to indicate an unexpected event Memory verify errors Device ID does not match If the data files for programming are not found or are...

Страница 32: ...ation has somehow been interrupted Reconnect to the debugger in MPLAB X IDE or MPLAB IPE 6 Device not seated The device is not properly seated on the target board If the debugger is properly connected...

Страница 33: ...igh for your circuit In MPLAB X IDE go to File Project Properties select PICkit 4 in Categories then Program Options Program Speed and select a slower speed from the drop down menu The default is Norm...

Страница 34: ...downloaded When complete the LED is steady on blue and the debugger is ready for operation 6 3 3 How to Use the Hardware Tool Emergency Boot Firmware Recovery Utility WARNING Only use this utility to...

Страница 35: ...success screen The MPLAB PICkit 4 will now be operational and able to communicate with the MPLAB X IDE If the procedure failed try it again If it fails a second time contact Microchip Support at https...

Страница 36: ...at any device speed as specified in the data sheet Is it possible to debug a dsPIC DSC device running at any speed The MPLAB PICkit 4 In Circuit Debugger is capable of debugging at any device speed a...

Страница 37: ...style code for example void __attribute__ __interrupt__ _OscillatorFail void void __attribute__ __interrupt__ _AltOscillatorFail void void __attribute__ __interrupt__ _OscillatorFail void INTCON1bits...

Страница 38: ...g to debug 1 Deselect the debugger as the debug tool 2 Close your project and then close MPLAB X IDE or MPLAB IPE 3 Restart MPLAB X IDE or MPLAB IPE and reopen your project 4 Reselect the debugger as...

Страница 39: ...REAS_TO_PROGRAM The following memory area s will be programmed AREAS_TO_READ The following memory area s will be read AREAS_TO_VERIFY The following memory area s will be verified BLANK_CHECK_COMPLETE...

Страница 40: ...intMediator ToTarget DATA_FLASH_MEMORY Data Flash memory DATA_FLASH data flash DEBUG_INFO_PGM_FAILED Could not enter debug mode because programming the debug information failed Invalid combinations of...

Страница 41: ...ying to load the program executive FAILED_GETTING_TEX Unable to obtain the ToolExecMediator FAILED_GETTING_TOOL_INFO Initialization failed Failed while retrieving tool database ri4 information FAILED_...

Страница 42: ...IDS_ST_CLKWRITE_SUCCESS Test interface PGC clock line write succeeded IDS_ST_DATREAD_ERR Test interface PGD data line read failure IDS_ST_DATREAD_NO_TEST Test interface PGD data line read not tested...

Страница 43: ...ddress boundary Please check the manual program ranges on the debug tool s Memories to Program property page MEM_RANGE_ERROR_UNKNOWN An unknown error has occurred while trying to validate the user ent...

Страница 44: ...discharge delays POWER_ERROR_UNKNOWN An unknown power error has occurred POWER_ERROR_VDD_TOO_HIGH The VDD voltage desired is out of range It exceeds the maximum voltage of 5 5V POWER_ERROR_VDD_TOO_LO...

Страница 45: ...gram property page PROGRAM_CFG_WARNING WARNING You have selected to program configuration memory Programming invalid values into any of the configuration fields may have unintended consequences Please...

Страница 46: ...rting up properly UNKNOWN_MEMTYPE Unknown memory type UNLOAD_WHILE_BUSY PICkit 4 was unloaded while still busy Please unplug and reconnect the USB cable before using PICkit 4 again UPDATING_APP Updati...

Страница 47: ...communicating with each other 1 Unplug and then plug in the debugger 2 Reconnect to the debugger 3 Try the operation again It is possible the error was a one time event 4 The version of MPLAB X IDE or...

Страница 48: ...and should not happen They are used for internal Microchip development The most likely cause is a corrupted installation 8 2 4 Corrupted Installation Actions Another likely cause is exhausted system...

Страница 49: ...Please see the product web page for details ETN37 MPLAB PICkit 4 VPP Overshoot Modification can be found on the MPLAB PICkit 4 product web page at https www microchip com Developmenttools ProductDeta...

Страница 50: ...Tools find PICkit 4 and click on a serial number SN to select a debugger for use in the project then click Apply 10 2 Debugger Options Selection Debugger options are set in the Project Properties dial...

Страница 51: ...below Program Memory Range s hex The range s of program memory to be programmed These are the starting and ending hex address range s in program memory for programming reading or verification Each ran...

Страница 52: ...software breakpoints Table 10 2 Debug Option Category Use Software Breakpoints Check to use software breakpoints Uncheck to use hardware breakpoints See the following table to determine which type is...

Страница 53: ...default is Normal If programming should fail using a slower speed may solve the problem 10 2 4 Freeze Peripherals Select from the list of peripherals to freeze or not freeze on program halt The availa...

Страница 54: ...Firmware Check to use the latest firmware Uncheck to select the firmware version Firmware File Click in the right hand text box to search for a firmware file jam to associate with the debugger 10 2 9...

Страница 55: ...do further programming the MPLAB PICkit 4 will have to use a high voltage pulse to reactivate the UPDI interface When using the high voltage pulse you must make sure that all circuits connected to the...

Страница 56: ...ctor The target board is powered from its own supply Alternatively the debugger can power the target board only if the target consumes less than 50 mA Cable Length The computer to debugger cable shipp...

Страница 57: ...proper connector alignment 7 Programming Connector The connector is an 8 pin SIL header 0 100 spacing that connects to the target device see 11 3 2 Pinouts for Interfaces 8 MicroSDHC Card Slot1 The m...

Страница 58: ...ror Descriptions Bootloader Errors Description Red slow blink Power accessing the debugger s serial EEPROM Red fast blink Bootloader API commands cannot be processed White fast blink A runtime excepti...

Страница 59: ...rcuit Debugger system Clock and data signals are protected from high voltages caused by faulty target systems or improper connections Clock and data signals are protected from high current caused from...

Страница 60: ...IPS EJTAG CORTEX SWD AVR JTAG AVR ISP DW UPDI PDI AW DW IRE TPI 1 TVPP MCLR MCLR MCLR 2 TVDD VDD VIO_REF VTG VTG VTG VTG VTG VTG VTG VTG 3 GND GND GND GND GND GND GND GND GND GND GND 4 PGD DAT TDO SWO...

Страница 61: ...his is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied Exposure to max...

Страница 62: ...3 2 5 Circuits That Will Prevent the Debugger From Functioning Hardware Specification 2020 Microchip Technology Inc User Guide DS50002751D page 62...

Страница 63: ...d 3 2 Target Communication Connections 12 3 Revision C October 2018 Updated diagram in Figure 11 2 Updated information in TableTable 11 5 Added Figure 11 3 to provide pinout information for the debugg...

Страница 64: ...gories of tools are listed below Compilers The latest information on Microchip C compilers assemblers linkers and other language tools These include all MPLAB C compilers all MPLAB assemblers includin...

Страница 65: ...c characters and decimal digits 0 1 9 ANDed Breakpoints Set up an ANDed condition for breaking i e breakpoint 1 AND breakpoint 2 must occur at the same time before a program halt This can only be acco...

Страница 66: ...language program which are used to describe machine specific properties Attribute Section GCC Characteristics of sections such as executable read only or data that can be specified as flags in the as...

Страница 67: ...PIC MCU and dsPIC DSC modes of operation A Configuration bit may or may not be preprogrammed Control Directives Directives in assembly language code that cause code to be included or omitted based on...

Страница 68: ...or is a microprocessor that is designed for use in digital signal processing Directives Statements in source code that provide control of the language tool s operation Download Download is the process...

Страница 69: ...or symbols separated by arithmetic or logical operators Extended Microcontroller Mode In extended microcontroller mode on chip program memory as well as external memory is available Execution automat...

Страница 70: ...from the stack based local variables Provides a convenient base from which to access local variables and other values for the current function Free Standing An implementation that accepts any strictly...

Страница 71: ...side source such as from a hex file Initialized Data Data which is defined with an initial value In C int myVar 5 defines a variable which will reside in an initialized data section Instruction Set Th...

Страница 72: ...the command files of a linker They define linker options and describe available memory on the target platform Listing Directives Listing directives are those directives that control the assembler list...

Страница 73: ...Directives Directives that control the execution and data allocation within macro body definitions Makefile Export to a file the instructions to Make the project Use this file to Make your project out...

Страница 74: ...Microchip s next generation in circuit emulator that works with MPLAB IDE MPLAB X IDE See ICE ICD MPLAB SIM Microchip s simulator that works with MPLAB IDE MPLAB X IDE in support of PIC MCU and dsPIC...

Страница 75: ...Octal The base 8 number system that only uses the digits 0 7 The rightmost digit counts ones the next digit counts multiples of 8 then 82 64 etc Off Chip Memory Off chip memory refers to the memory se...

Страница 76: ...gger Other names are Puck if the enclosure is round and Probe not be confused with logic probes Power on Reset Emulation A software randomization process that writes random values in data RAM areas to...

Страница 77: ...ion or target board Psect The OCG equivalent of a GCC section short for program section A block of code or data which is treated as a whole by the linker PWM Signals Pulse Width Modulation Signals Cer...

Страница 78: ...signed to a fixed location in memory Relocatable Section 16 bit assembler A section whose address is not fixed absolute The linker assigns addresses to relocatable sections through a process called re...

Страница 79: ...a fetch during the execution of the previous instruction the source data address and value and the destination data address appear when the opcodes is actually executed and the destination data value...

Страница 80: ...ne gets into an endless loop or does not return properly the next breakpoint will never be reached The Step Over command is the same as Single Step except for its handling of CALL instructions Step Ou...

Страница 81: ...is uploaded to the MPLAB IDE MPLAB X IDE trace window Trace Memory Trace memory contained within the emulator Trace memory is sometimes called the trace buffer Trace Macro A macro that will provide tr...

Страница 82: ...compiler applying optimizations that affect how the variable is accessed in memory Warning Warning MPLAB IDE MPLAB X IDE An alert that is provided to warn you of a situation that would cause physical...

Страница 83: ...sentative or Field Application Engineer FAE for support Local sales offices are also available to help customers A listing of sales offices and locations is included in the back of this document Techn...

Страница 84: ...KS Analog for the Digital Age Any Capacitor AnyIn AnyOut BodyCom CodeGuard CryptoAuthentication CryptoAutomotive CryptoCompanion CryptoController dsPICDEM dsPICDEM net Dynamic Average Matching DAM ECA...

Страница 85: ...52 China Xiamen Tel 86 592 2388138 China Zhuhai Tel 86 756 3210040 India Bangalore Tel 91 80 3090 4444 India New Delhi Tel 91 11 4160 8631 India Pune Tel 91 20 4121 0141 Japan Osaka Tel 81 6 6152 7160...

Отзывы: