Debugging Pinguino-MX220 w/ MPLABX and PICkit 3

Started by andersm, January 08, 2013, 07:29:04 PM

Previous topic - Next topic

andersm

I'm trying to write code for the Pinguino-MX220 board using MPLABX 1.6 and XC32 1.2, using a PICkit 3 for programming, and while programming the flash works just fine, trying to debug just results in the error message "The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding." Has anyone managed to use this combination successfully? My config bit settings are as follows, using just the FRC or FRC/16 as system clock didn't help.
#pragma config PMDL1WAY     = OFF       // Allow multiple reconfigurations
#pragma config IOL1WAY      = OFF       // Allow multiple reconfigurations
#pragma config FUSBIDIO     = OFF       // Controlled by Port Function
#pragma config FVBUSONIO    = OFF       // Controlled by Port Function
#pragma config FPLLIDIV     = DIV_2     // PLL Input Divider
#pragma config FPLLMUL      = MUL_20    // PLL Multiplier
#pragma config UPLLIDIV     = DIV_2     // USB PLL Input Divider
#pragma config UPLLEN       = OFF       // USB PLL Enable
#pragma config FPLLODIV     = DIV_2     // PLL Output Divider
#pragma config FNOSC        = PRIPLL    // Oscillator Selection
#pragma config FSOSCEN      = OFF       // Secondary Oscillator Enable
#pragma config IESO         = OFF       // Internal/External Switch-over
#pragma config POSCMOD      = XT        // Primary Oscillator
#pragma config OSCIOFNC     = OFF       // CLKO Enable
#pragma config FPBDIV       = DIV_2     // Peripheral Clock divisor
#pragma config FCKSM        = CSDCMD    // Clock Switching & Fail Safe Clock Monitor
#pragma config WDTPS        = PS4096    // Watchdog Timer Postscale
#pragma config WINDIS       = OFF       // Watchdog Timer Window Enable
#pragma config FWDTEN       = OFF       // Watchdog Timer
#pragma config FWDTWINSZ    = WINSZ_75  // Watchdog Timer Window Size
#pragma config DEBUG        = ON        // Background Debugger Enable
#pragma config JTAGEN       = OFF       // JTAG Enable
#pragma config ICESEL       = ICS_PGx3  // ICE/ICD Comm Channel Select
#pragma config PWP          = OFF       // Program Flash Write Protect
#pragma config BWP          = OFF       // Boot Flash Write Protect
#pragma config CP           = OFF       // Code Protect

syfre

Hi,
I have exactly the same problem.

Program and run fine in release mode but can't debug

Connecting to MPLAB PICkit 3...
Firmware Suite Version.....01.28.40
Firmware type..............PIC32MX
...
Programming...
Programming/Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.

My PicKit3 is a sure clone but i don't know if it's the pb

here are the pragma i used :

#pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FPLLODIV = DIV_2
#pragma config FPBDIV = DIV_1
#pragma config POSCMOD = HS, FNOSC = PRIPLL
#pragma config FWDTEN = OFF
#pragma config FSOSCEN = OFF
#pragma config IESO = OFF 
#pragma config JTAGEN = OFF
#pragma config DEBUG = ON
#pragma config ICESEL = ICS_PGx3

Do you resolved it ?


andersm

Unfortunately not. I've tried using ICS_PGx1 as the debug port, but that made no difference. It would be nice to know if it's a bug in the PICkit firmware or the chip, but I don't really have the equipment to figure that out. I doubt it's an issue with the board, as it seems to follow the guidelines to a t and works fine otherwise. I filed a support request with Microchip, but have had no reply.


andersm

The same PICkit could debug a PIC32 USB Starter Kit 2 board without problems, so it's not the problem. I also tried using a clone PICkit 3 with the Pinguino board, but it failed with the same error (I guess it's a good clone then!)

andersm

At the suggestion of Microchip's support I went back to MPLAB X 1.51, and after downgrading to PICkit 3 firmware 1.28.18 debugging was working. Hopefully they'll release an updated version of MPLAB X with a fixed firmware soon!

yoyo027

Hello,

Maybe, you can try:

#pragma config ICESEL   = ICS_PGx1
#pragma config DEBUG    = ON

...

andersm

MPLAB X 1.7 includes PICkit 3 firmware version 1.28.57 which fixes this problem.