View previous topic :: View next topic |
Author |
Message |
oxo
Joined: 13 Nov 2012 Posts: 219 Location: France
|
dsPIC on Explorer16 -- SOLVED |
Posted: Fri Dec 05, 2014 2:40 am |
|
|
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: 19551
|
|
Posted: Fri Dec 05, 2014 2:54 am |
|
|
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
|
|
Posted: Fri Dec 05, 2014 4:12 am |
|
|
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
|
|
Posted: Mon Dec 08, 2014 12:56 am |
|
|
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: 19551
|
|
Posted: Mon Dec 08, 2014 3:43 am |
|
|
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
|
|
Posted: Mon Dec 08, 2014 3:54 am |
|
|
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: 19551
|
|
Posted: Mon Dec 08, 2014 4:01 am |
|
|
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
|
|
Posted: Mon Dec 08, 2014 4:06 am |
|
|
That patch is for MPLAB, not ICD-U64.
The info about revision numbers came from CCS.. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Mon Dec 08, 2014 1:46 pm |
|
|
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
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Mon Dec 08, 2014 2:19 pm |
|
|
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
|
|
Posted: Mon Dec 08, 2014 2:39 pm |
|
|
Its late, but I will try that in the morning. Thanks. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Mon Dec 08, 2014 2:53 pm |
|
|
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
|
|
Posted: Tue Dec 09, 2014 2:05 am |
|
|
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
|
|
Posted: Tue Dec 09, 2014 5:28 am |
|
|
The ICD-U64 Rev 3 arrived, and it all works now. |
|
|
|