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

debugging the dspic33ck256mp202

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



Joined: 26 Nov 2008
Posts: 12

View user's profile Send private message

debugging the dspic33ck256mp202
PostPosted: Mon Nov 09, 2026 3:56 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Nov 11, 2026 12:46 pm     Reply with quote

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

View user's profile Send private message

debugging the dspic33ck256mp202
PostPosted: Thu Nov 12, 2026 11:08 am     Reply with quote

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

View user's profile Send private message

debugging the dspic33ck256mp202
PostPosted: Thu Nov 12, 2026 1:50 pm     Reply with quote

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

View user's profile Send private message

dspic33ck256mp202
PostPosted: Fri Nov 13, 2026 10:30 am     Reply with quote

Sorry jumped the gun. It does not work.
Ttelmah



Joined: 11 Mar 2010
Posts: 20156

View user's profile Send private message

PostPosted: Sun Nov 15, 2026 11:52 am     Reply with quote

That is really annoying. So the MPLAB configuration got a little closer,
but still has issues. Crying or Very sad
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.
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