Cannot enter debug mode?

Beta Testing discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
stevencovert
Posts: 247
Joined: 19 May 2009 21:46
Location: Virginia, USA

Cannot enter debug mode?

#1 Post by stevencovert » 12 Jun 2012 19:57

I am using the MMB for dsPIC. When I try to get to debug mode, I get a clock error. Works fine if I program in release mode.

I am using the code that came with an example, just changed it to run at 80MHz instead of 64MHz. XT with PLL is set in config bits.

Code: Select all

    // (must be within 0.8 MHz to 8 MHz range)
    // PLLPRE<4:0> = 0  ->  N1 = 1    8MHz
    CLKDIVbits.PLLPRE = 0;       // 8mhz crystal, so no divisor
    // multiply up the 8mhz (must be within 100 MHz to 200 MHz range)
    PLLFBD =   18;               // PLLDIV<8:0> = 18 ->  M = 20     8MHz * 20 = 160MHz
    // (must be within 12.5 MHz to 80 MHz range)
    CLKDIVbits.PLLPOST = 0;     // PLLPOST<1:0> = 0 ->  N2 = 2    160MHz / 2 = 80MHz
This is my first time with dsPIC, do I have to use a different clock configuration? Run straight from 8MHz crystal & set clock to 8MHz?

Thanks,
Steve
I like apple P=IE!

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Cannot enter debug mode?

#2 Post by janko.kaljevic » 13 Jun 2012 08:17

Hello,

This could be caused by two things.

First, your mikromedia board is not powered during ICD. Try connecting it to USB or got to Tools->mikroProg Power Options, and check Power Target Circuit From mikroProg box.

Second, you have not selected proper COMM channel. Go to Project->Edit Project and select proper channel under Comm Channel Select.

Best regards.

stevencovert
Posts: 247
Joined: 19 May 2009 21:46
Location: Virginia, USA

Re: Cannot enter debug mode?

#3 Post by stevencovert » 13 Jun 2012 13:00

Comm channel fixed it!! thanks!
I like apple P=IE!

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 Beta Testing”