PIC32MZ programming - Page 1
Forum section: electronics / general

author: BRV64
author_rank: Newbie
timestamp: April 09, 2018, 02:04:25 am
content: Hello!I've been using up to PIC18, but I'm new using PIC32. I thought that it would be the same process, but I'm having a hard time making it work.I'm developing a board for my graduation proyect with this PIC32MZ2048ECH100PIC32MZ EC Processor Plug-In Module (PIM) - MA320012 | Microchip Technology Inc.http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=MA320012The thing is that I can't seem to make it work with the programmer.This is what i get from MPLAB IPE*****************************************************Connecting to MPLAB PICkit 3...Currently loaded firmware on PICkit 3Firmware Suite Version.....01.51.08Firmware type..............PIC32MZProgrammer to target power is enabled - VDD = 3,500000 volts.Unable to connect to the target device.Failed to get Device ID2018-04-08 20:58:05 -0500 - Read failed

author: oilburner
author_rank: Contributor
timestamp: April 11, 2018, 07:33:49 pm
content: hi, besides checking to see if you got the clocks all set up correctly, did you do the ICESEL = ICS_PGx2 if you are on those pins for programming?g

author: Ash
author_rank: Regular Contributor
timestamp: April 11, 2018, 11:45:03 pm
content: Hi,Watch out - Microchip is recommending the PIC32MZ2048EFH100 for new designs as a replacement.basically there are a significant number of silicon errors on the EC series, some of them render the peripherals almost useless. Not that the EF series doesn't have its issues as well.. Check the device errata datasheets from Microchip to see if any of them will affect your project.As for programming, as BRV64 mentioned, double check your ISCP programming pin selections. You may be using the wrong pair. If you have switched them using configuration bits, you may need to temporarily swap pairs to do an erase... Not sure, I've not needed to try that.Ash.

author: JPortici
author_rank: Super Contributor
timestamp: April 12, 2018, 05:58:42 am
content: That's incorrect. every ICSP pair is always accessible for programming. with the configuration bits you select which pair you want to use with the debuggerFeel free to check the datasheetQuoteFailure to find the device could be-Wrong PGD/PGC connections but the wiring seems correct at glance-incorrect power applied, that's more probable. Why are you supplying power from both the PK3 and the demoboard?it's best if you don't supply power from the PK3.if you have access to a scope try to probe the MCLR,PGD and PGC pins during programmer connection and see for abnormalities (sags, clock not being a clock, mclr at incorrect levels..)also try using the IPE to connect, i find it faster to use when i have connection problems

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 12, 2018, 07:41:58 am
content: Quote from: JPortici on April 12, 2018, 05:58:42 amI don't recall offhand if the MZ has a VCap pin, but lack of this on the MX devices will stop programming working.Also 3.5v sounds a little high for Vdd, and if you are trying to power the target from PicKit bear in mind it may not be able to supply enough current for a 32MZ

author: JPortici
author_rank: Super Contributor
timestamp: April 12, 2018, 09:23:04 am
content: I checked and there isn't.. but he's using a Plugin-module anyway, which has all the necessary cap and oscillators on board, also all the VDD and VSS are connected together@BRV64: Did you also connect ADVV/ADSS? AVDD is on a separate pin on the PIM and it is required to be within Vdd +/- something to ensure correct behaviour

author: NorthGuy
author_rank: Super Contributor
timestamp: April 12, 2018, 02:16:58 pm
content: ICESEL has absolutely no effect on programming, only on debugging. Think about that. How the setting within the program you're only going to program on the device can affect the programming process?It's most likely your connection - bad contact or wrong pins.EC chips are obsolete. They had so many bugs that Microchip decided not to fix them and created new EF chips instead.

author: JPortici
author_rank: Super Contributor
timestamp: April 12, 2018, 05:20:11 pm
content: maybe he has to use an EC because that's what his university lab has