• AVR Freaks

AnsweredHot!Curiosity Board Problem

Author
Sal Ammoniac
Super Member
  • Total Posts : 234
  • Reward points : 0
  • Joined: 2011/11/27 14:04:14
  • Location: 0
  • Status: offline
2020/05/27 14:21:03 (permalink)
0

Curiosity Board Problem

I just found an old PIC32 Curiosity Board (the original one) in the closet. This board has the PIC32MZ2048EFM100 on it and a 24 MHz crystal. I've created a simple project, and the code gets programmed correctly using an ICD3, but it won't run. The error message in the debugger console window is:
Launching
Programming target
An error occurred in the debugger. Terminating the debug session.
com.microchip.mplab.mdbcore.debugger.DebugException
User program finished

 
The ICD3 window output:
 
Device Erased...

Programming...

The following memory area(s) will be programmed:
program memory: start address = 0x1d000000, end address = 0x1d00ffff
boot config memory
configuration memory
Programming/Verify complete

Running

 
Anyone have an idea of what causes this and how I can fix it? Here are my configuration settings:
 
#pragma config DEBUG = OFF
#pragma config JTAGEN = OFF
#pragma config ICESEL = ICS_PGx2
#pragma config TRCEN = OFF
#pragma config BOOTISA = MIPS32
#pragma config FECCCON = OFF_UNLOCKED
#pragma config FSLEEP = OFF
#pragma config DBGPER = PG_ALL
#pragma config SMCLR = MCLR_NORM
#pragma config SOSCGAIN = GAIN_LEVEL_3
#pragma config SOSCBOOST = ON
#pragma config POSCGAIN = GAIN_LEVEL_3
#pragma config POSCBOOST = ON
#pragma config EJTAGBEN = NORMAL
#pragma config CP = OFF

/*** DEVCFG1 ***/
#pragma config FNOSC = SPLL
#pragma config DMTINTV = WIN_127_128
#pragma config FSOSCEN = OFF
#pragma config IESO = OFF
#pragma config POSCMOD = OFF
#pragma config OSCIOFNC = OFF
#pragma config FCKSM = CSECME
#pragma config WDTPS = PS1048576
#pragma config WDTSPGM = STOP
#pragma config FWDTEN = OFF
#pragma config WINDIS = NORMAL
#pragma config FWDTWINSZ = WINSZ_25
#pragma config DMTCNT = DMT31
#pragma config FDMTEN = OFF

/*** DEVCFG2 ***/
#pragma config FPLLIDIV = DIV_3
#pragma config FPLLRNG = RANGE_8_16_MHZ
#pragma config FPLLICLK = PLL_POSC
#pragma config FPLLMULT = MUL_50
#pragma config FPLLODIV = DIV_2
#pragma config UPLLFSEL = FREQ_24MHZ

/*** DEVCFG3 ***/
#pragma config USERID = 0xffff
#pragma config FMIIEN = ON
#pragma config FETHIO = ON
#pragma config PGL1WAY = ON
#pragma config PMDL1WAY = ON
#pragma config IOL1WAY = ON
#pragma config FUSBIDIO = ON

/*** BF1SEQ0 ***/

#pragma config TSEQ = 0xffff
#pragma config CSEQ = 0x0

 
#1
RISC
Super Member
  • Total Posts : 5772
  • Reward points : 0
  • Status: online
Re: Curiosity Board Problem 2020/05/27 14:50:27 (permalink)
0
Hi,
Which MPLAB X version do you use ?
If programming mode works but not debugging mode maybe you selected the wrong ICD pair in the config bits...
Regards
#2
MisterHemi
Super Member
  • Total Posts : 272
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
Re: Curiosity Board Problem 2020/05/27 15:13:22 (permalink)
0
RISC
Hi,
Which MPLAB X version do you use ?
If programming mode works but not debugging mode maybe you selected the wrong ICD pair in the config bits...
Regards




Possibly this could be the problem:

#pragma config ICESEL = ICS_PGx2


Maybe it should be:

#pragma config ICESEL = ICS_PGx1


My configuration:
MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
 
Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
#3
dan1138
Super Member
  • Total Posts : 3708
  • Reward points : 0
  • Joined: 2007/02/21 23:04:16
  • Location: 0
  • Status: offline
Re: Curiosity Board Problem 2020/05/27 15:39:47 (permalink)
0
Are you using the DM320104 - Curiosity PIC32MZEF Development Board - :
 

post edited by dan1138 - 2020/05/27 16:04:58
#4
Sal Ammoniac
Super Member
  • Total Posts : 234
  • Reward points : 0
  • Joined: 2011/11/27 14:04:14
  • Location: 0
  • Status: offline
Re: Curiosity Board Problem 2020/05/27 16:32:56 (permalink)
0
Thanks for the replies. I'm using MPLABX v5.40 and the DM320104 Curiosity board.
 
I found a way to get it to run, but I don't understand why. In the Configuration Properties for the project, there's a "Packs" section item called PIC32MZ-EF_DFP with two choices: 1.0.20 and 1.2.51. Like this:

 
When I choose 1.0.20 everything builds and loads without error, but won't run. If I choose 1.2.51 everything builds, loads, and runs just fine.
 
Anyone know what this DFP stuff is for?
 
 
#5
RISC
Super Member
  • Total Posts : 5772
  • Reward points : 0
  • Status: online
Re: Curiosity Board Problem 2020/05/27 16:41:43 (permalink) ☼ Best Answerby Sal Ammoniac 2020/05/28 08:44:21
5 (1)
Hi
DFP contains all the files necessary for each device and the debuggers.
In MPLAB X v5.40 device DFP are fully available (look at release notes)
Previously devices and tools related informations use to be included in MPLAB X and the compilers.
The key advantage is that there is no need to wait for a new MPLAB X version to have support for a new device which is released after MPLAB X Just load the newest device pack.
Regards
post edited by RISC - 2020/05/29 16:25:11
#6
Jump to:
© 2020 APG vNext Commercial Version 4.5