CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

dsPIC on Explorer16 -- SOLVED

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

dsPIC on Explorer16 -- SOLVED
PostPosted: Fri Dec 05, 2014 2:40 am     Reply with quote

Hi All,

I have dsPIC33EP512MU810 on an Explorer16, and I cant get it to debug.

It compiles, and loads the code, but then I get an error dialog,

"Target program not running. Likely cause is wrong debug pins, or wrong oscillator."

But, I have checked both of these.

Fuses are

#include <33EP512MU810.h>
#device ICD=1
#device ADC=8
#use delay(crystal= 8000000)
#fuses PR_PLL, XT
#fuses NOWDT, NOJTAG
#fuses DEBUG
#fuses ICSP1


Compiler PCWHD, Ver 5.032


Last edited by oxo on Tue Dec 09, 2014 5:29 am; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Fri Dec 05, 2014 2:54 am     Reply with quote

Start with your oscillator.

You are specifying that you want to run at 8MHz, with an 8MHz crystal. The fuses for this are PR, XT. The PR_PLL combination, can't do 8MHz....

Then obviously, you do have MCLR pulled up?.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Fri Dec 05, 2014 4:12 am     Reply with quote

Thank TT,

I checked the oscillator with a scope on the processor pins. 8 MHz. Good

Also checked the target connections with a scope on the PGC, PGD and MCLR pins, using CCSLoad diagnostics to flip their states. These work fine.

So, I cut my program down to the minimum.

Code:
#include <33EP512MU810.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOJTAG                   //JTAG disabled

#device ICSP=1


//#device ICD=1
#fuses PR, XT                 
//#fuses DEBUG
//#fuses ICSP1

#use delay(clock= 20000000, crystal=8000000)
#use FIXED_IO( A_outputs=PIN_A7,PIN_A6,PIN_A5,PIN_A4,PIN_A3,PIN_A2,PIN_A1,PIN_A0 )


void main()
{
     
   while(TRUE)
   {
      delay_ms(1000);
      output_low(PIN_A0);
      delay_ms(1000);
      output_high(PIN_A0);
   }

}


This code loads and runs fine, at the correct on/off periods for the LED in run and load mode.

But if I try and use it in debug mode, or uncomment any of the lines shown, it does not run, and I get the error from my first post.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 12:56 am     Reply with quote

I think this is solved, but I can't try the solution yet.

It appears that EP processors require an ICD-U64 Revision 3 or later..
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 3:43 am     Reply with quote

As a comment, have you got the ETN-29 patch, and the latest firmware. The patch is present in the later unit, and might be the problem. This seems to be the only hardware change on the circuits posted between the rev 194, and 195.
Note the 194 can be upgraded to a 195.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 3:54 am     Reply with quote

My ICD-U64 is Rev 2, so I believe that's the issue. I have all firmware updates, but Rev 2 is what kills it. Trying to get a rev 3 quickly for tomorrow.

Thanks.
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 4:01 am     Reply with quote

Have you tried the ETD#29 patch?.
On some chips this is required, and is standard on the later boards. R61 and R62 have to change from 1KR to 100R.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 4:06 am     Reply with quote

That patch is for MPLAB, not ICD-U64.

The info about revision numbers came from CCS..
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 1:46 pm     Reply with quote

No, it is not for MPLAB, it is for the older ICD3 board. However if you look at the published circuits for the U64, it has the same control circuit. I'd suggest it is very likely that this part is the same.
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 2:10 pm     Reply with quote

This page also says it requires a version 3 to debug...

http://www.ccsinfo.com/devices.php?page=icddevices
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 2:19 pm     Reply with quote

Agreed. But it also says they can modify the earlier versions for $25. If you look at the circuits (Microchip nicely publish them), the only hardware changes are to the resistors in the drive circuit.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 2:39 pm     Reply with quote

Its late, but I will try that in the morning. Thanks.
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Dec 08, 2014 2:53 pm     Reply with quote

Look at the circuits first. The part numbers are not the same on all board versions, so you need to check which yours are.
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Tue Dec 09, 2014 2:05 am     Reply with quote

Ttelmah wrote:
Look at the circuits first. The part numbers are not the same on all board versions, so you need to check which yours are.


Can't find the schematics. Do you have a link?
oxo



Joined: 13 Nov 2012
Posts: 219
Location: France

View user's profile Send private message

PostPosted: Tue Dec 09, 2014 5:28 am     Reply with quote

The ICD-U64 Rev 3 arrived, and it all works now.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group