Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 09:40:44 09:40


Login with username, password and session length


Pages: [1]
Print
Author Topic: MPLAB-X PICkit3 DSPIC33EP512GP502 Debug error  (Read 6015 times)
0 Members and 1 Guest are viewing this topic.
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« on: June 13, 2022, 06:45:52 18:45 »

Hello,
Excuse me for my English, it is the first time that I make a request on this site, I am a retiree with the hobby of electronics.
I tested several dsPIC33FJ (64/128) (GP / MC) 802 on a test board and was able to debug correctly by getting the output pin state change.
The board has only the minimum connections for programming with 0.1uF capacitors on the power supply and tantalum capacitor on VCAP.
Then I tried 3 different dsPIC33EP512GP502 on the same board, if I program for production I get the message:

Code:
Device Erased ...
Programming ...
The following memory area (s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
Programming / Verify complete

But it doesn't run the program.
If I program it for debugging I get the message:

Code:
Device Erased ...
Programming ...
The following memory area (s) will be programmed:
program memory: start address = 0x0, end address = 0x3ff
configuration memory
Programming / Verify complete
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and / or PGC / PGD settings.

I have verified that the memory of the dsPIC33EP512GP502 is always written, deleted and read correctly.
Initially I tried the dsPIC33EP512GP502 in a project configured with MCC always getting the same results.
Is there anyone who has any suggestions for me?
I enclose an example with the two configurations.

Thanks in advance

Configuration used:
Windows 10 updated
Pickit3 both original and clone
MPLAB X 5.50 and 6.00
XC16 v1.70 and v2.00 free
Logged
sam_des
Senior Member
****
Offline Offline

Posts: 256

Thank You
-Given: 128
-Receive: 151


« Reply #1 on: June 14, 2022, 05:58:51 05:58 »

Hi,

I don't use MPLABX much. But AFAIK there is option for "Build for Debugging" as shown in attached image.
I have run into debugging issues, when not activated this option in some cases. I guess 0x0000 flash address is written with something that PICKit requires for debugging.
Also you've to uncheck this option & rebuild for production release.

IMHO, MPLAB  & PICKit are mess, but unavoidable if you want to use Microchip.  Angry Sad Embarrassed

sam_des
Logged

Never be afraid to do something new. Remember Amateurs built the Ark, Professionals built the Titanic !
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« Reply #2 on: June 14, 2022, 10:07:42 10:07 »

Hi, I have tried the various compilation options for debugging but the problem remains, the other PICs work correctly. Thank you.
Logged
kreutz
Active Member
***
Offline Offline

Posts: 183

Thank You
-Given: 994
-Receive: 125


« Reply #3 on: June 14, 2022, 01:03:08 13:03 »

Check the oscillator configuration settings, PGC and PGD,  as per the error message recommendations.
Logged
Xwing
Active Member
***
Offline Offline

Posts: 210

Thank You
-Given: 588
-Receive: 1530



« Reply #4 on: June 14, 2022, 01:46:10 13:46 »


Configuration used:
Windows 10 updated
Pickit3 both original and clone
MPLAB X 5.50 and 6.00
XC16 v1.70 and v2.00 free

check the fuse values, surely those for the clock and the one that enables debugging are wrong.
Logged
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« Reply #5 on: June 14, 2022, 02:41:05 14:41 »

I looked at the oscillator configuration in the source that I attached to the first post, it seems right to me.
The configuration for the PIckit3 is certainly correct because the PIC memory is programmed, erased and read.
Logged
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« Reply #6 on: June 14, 2022, 05:10:17 17:10 »

The fuse settings I used are in the source that I attached to the first post (main.c).
There is also the commented configuration for the DSPIC33FJ working correctly.
I don't know Proton, I have installed Proton IDE but I don't have MPLAB 8 to try it, it doesn't seem free to me.
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4666

Thank You
-Given: 833
-Receive: 4319


There is no evidence that I muted SoNsIvRi


« Reply #7 on: June 14, 2022, 07:01:06 19:01 »

my post removed as it's of no use to someone who can't read.
.Do include the config bits in your source code. .Do include the config bits in your source code.
« Last Edit: June 14, 2022, 07:09:07 19:09 by pickit2 » Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« Reply #8 on: June 15, 2022, 07:18:54 19:18 »

I checked the voltage on the VCAP pin and found about 3.3V instead of 1.8V as described in the datasheet.
I find the same voltage on all 3 DSPIC33EPs I have.
Inserting a DSPIC33FJ the voltage is about 2.6V, 2.5V is written in the datasheet.
The DSPIC33EP i I have only used on this test board and I keep swapping the two sets of chips without having any problems on the DSPIC33FJs.
Logged
vovchik02
Junior Member
**
Offline Offline

Posts: 62

Thank You
-Given: 43
-Receive: 13



« Reply #9 on: June 25, 2022, 06:36:50 06:36 »

Check you conecton ISP pin on PCB. Dspic prorgramming by any PGCx/PGDx pair, for debug fuse set PGD3/PGC3 pair.
 
Logged
PaoloBi
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 1
-Receive: 0


« Reply #10 on: June 25, 2022, 05:59:00 17:59 »

The connection is fine, this is the first time something like this has happened to me.
Probably the DSPIC are defective, I communicated it to microchip but no answer.
I bought some STM32s, I will use these for the most demanding projects, ... when they arrive I hope everything goes well.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC