| View previous topic :: View next topic |
| Author |
Message |
tems
Joined: 26 Nov 2008 Posts: 12
|
| debugging the dspic33ck256mp202 |
Posted: Mon Nov 09, 2026 3:56 pm |
|
|
I'm using version 5.125 and rev3 and version 3.70 of the ICD-U64 and cannot debug. CCS support has been great and they have sent other ICD firmware versions to test but still havent had any luck. There still working on it but i had to ask if anyone else has used this chip and debugged it successfully?
| Code: |
#include <33CK256MP202.h>
// Configure internal oscillator to run at 70 MHz
#use delay(clock=70Mhz, internal)
// Configuration Fuses
#FUSES ICSP1
#FUSES DEBUG
#FUSES NOWDT // Watchdog Timer Disabled
#FUSES NOPR // Primary Oscillator Disabled (using internal FRC/PLL)
//#FUSES FRC_PLL // Internal fast RC oscillator with PLL
// --- Peripheral Pin Select (PPS) for UART1 on RB10 and RB11 ---
#pin_select U1RX = PIN_B10 // UART1 Receive Pin (RP for RB10)
#pin_select U1TX = PIN_B11 // UART1 Transmit Pin (RP for RB11)
// --- RS232 Serial Port Configuration ---
#use rs232(baud=115200, uart, bits=8, parity=N, stop=1, stream=SERIAL_PORT)
void main(void) {
char incoming_char;
// Short stabilization delay after startup
delay_ms(100);
// Send a startup greeting banner to verify transmission
fprintf(SERIAL_PORT, "\r\n--------------------------------------------\r\n");
fprintf(SERIAL_PORT, " dsPIC33CK256MP202 Serial Test (RB10/RB11) \r\n");
fprintf(SERIAL_PORT, "--------------------------------------------\r\n");
fprintf(SERIAL_PORT, "Echo mode active. Type anything...\r\n\r\n");
while(TRUE) {
// Check if data is available in the UART buffer
if (kbhit(SERIAL_PORT)) {
incoming_char = fgetc(SERIAL_PORT);
// Echo the received character back to the terminal
if (incoming_char == '\r' || incoming_char == '\n') {
fprintf(SERIAL_PORT, "\r\n");
} else {
fputc(incoming_char, SERIAL_PORT);
}
}
}
}
|
The debugger seems to load the program however when it reads for verification it errors with the locations not programmed. In this case all of them. I tried other firmware icd versions, no change.
When using CCSLOAD i can program and run the code.
Is there something im missing? Thanks for any help. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 20156
|
|
Posted: Wed Nov 11, 2026 12:46 pm |
|
|
Try different ICSP settings.
I've had another version of the same chip (512), where the ICSPx pins
required did not match the data sheet. I was connected to ICSP2, but had
to say to use ICSP1.
Programming works on any pin pair. Only the debug is affected by the ICSP
setting.
Sounds like exactly the same problem..... |
|
 |
tems
Joined: 26 Nov 2008 Posts: 12
|
| debugging the dspic33ck256mp202 |
Posted: Thu Nov 12, 2026 11:08 am |
|
|
| Did as you suggested. All three ports did the same. Programming available on all ports. Debugging on none. |
|
 |
tems
Joined: 26 Nov 2008 Posts: 12
|
| debugging the dspic33ck256mp202 |
Posted: Thu Nov 12, 2026 1:50 pm |
|
|
| installed MPLABX . Not my favorite but it will do. Tested debug with MPLABX using ccs compiler. It works. |
|
 |
tems
Joined: 26 Nov 2008 Posts: 12
|
| dspic33ck256mp202 |
Posted: Fri Nov 13, 2026 10:30 am |
|
|
| Sorry jumped the gun. It does not work. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 20156
|
|
Posted: Sun Nov 15, 2026 11:52 am |
|
|
That is really annoying. So the MPLAB configuration got a little closer,
but still has issues.
I wonder if there is something in the hardware affecting it?
What is it doing?. The CCS version was not programming in the debug.
What does the MPLAB version do?. Is it behaving as if possibly some
cells are not programming?. Mo you have access to any other programmer?.
Have you got, or can make a slightly shorter connection cable between the
ICD and the board?. I have had issues on several chips/boards, where
shortening this cable has helped things quite a lot. I now use one that are
under 100mm long. |
|
 |
|