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

Fuses wrong when loading in ccsload

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



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

Fuses wrong when loading in ccsload
PostPosted: Tue Nov 17, 2015 5:47 am     Reply with quote

Goodday.

Compiler 5.025
CCSLOAD 5.021/5.017/5.005

When I load the following program in CCSLoad the configuration bits are wrong. Also if I change them the checksum does not change. Looking at the LST file everything OK. If I change something in the program the checksum does change, so I am sure I am loading the correct HEX file.

Using MPLABX and ICD3 to program, everything works OK.
Using CCSLoad to program I actually brick the PIC. After programming I get a squarewave signal (as if you are programming)on the PGC/PGD pins and not even MPLABX want anything to do with the PIC. This only happens with U64.

Only happens with dsPIC33EPGM306, when using 8 bit Pic's everything OK.

Any ideas

Code:

#include <33EP128GM604.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES NOJTAG                   //JTAG disabled
#FUSES T5G_IS_T5G               //Timer 5 Gate is driven by the T5G input
#FUSES NOALTI2C1                //I2C1 mapped to SDA1/SCL1 pins
#FUSES NOALTI2C2                //I2C2 mapped to SDA2/SCL2 pins
#FUSES WDTWIN_25%               //Watchdog Window is 25% of WDT period
#FUSES NOPLLWAIT                //Clock switch will not wait for the PLL lock signal
#FUSES NOWINDIS                 //Watch Dog Timer in Window mode
#FUSES OSCIO                    //OSC2 is general purpose output
#FUSES IOL1WAY                  //Allows only one reconfiguration of peripheral pins
#FUSES NOCKSNOFSM               //Clock Switching is disabled, fail Safe clock monitor is disabled
//#FUSES NOPWMLOCK                //PWM register may be written without key sequence
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NODEBUG

#use delay(internal=60000000)


void main()
{



   while(TRUE)
   {
      //TODO: User Code
      output_low(PIN_B0);
   }

}


Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19482

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 2:11 am     Reply with quote

MPLABX

Critical that you change the project settings from 'DEBUG' to 'RELEASE'.

If not, MPLAB, will override several of the fuses to make them compatible with debugging.....
alan



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 3:00 am     Reply with quote

Thanks Ttelmah.

Maybe I wasn't too clear. It works 100% with MPLABX and ICD3, but brick the PIC with CCS and ICD-U64 and I mean brick, have to replace the PIC.

Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19482

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 4:25 am     Reply with quote

I still repeat the point....

If you are generating the Hex file in MPLAB, it'll be generated by default for DEBUG mode.

If you then program this into a PIC with an external programmer, this will not run.
It would however run in MPLAB, with the debugger connected.
alan



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 4:54 am     Reply with quote

I built in CCS then load in CCSLoad.

If I use the CCS plugin in MPLABX to build, and look at the configuration bits they are correct and when programmed board works.

You have put me onto something else though. Looks like the problem lies with CCSLoad as I used the file produced by MPLABX and it does not read the fuses correctly.

I tried all 5.xx versions of CCSload and they all do the same.

Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19482

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 6:47 am     Reply with quote

Okay. That makes sense. I've got a fault in with CCS at present on CCSLoad. You need to report yours.
alan



Joined: 12 Nov 2012
Posts: 357
Location: South Africa

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 7:04 am     Reply with quote

Thanks Ttelmah, will do.

The sad thing is all did work, got a computer crash, re-install Windoze8 and voila nothing works as previous.

Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19482

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 8:04 am     Reply with quote

Had you been keeping CCSLoad 'up to date'?. If not I'd guess newer version has introduced problem. I've had a couple recently were releases have stopped individual chips programming right, but fixed other problems. It'll be interesting to hear what they say (they were quick with my faults).
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Wed Nov 18, 2015 8:47 am     Reply with quote

I've had issues with ccsload and a load-n-go. Similar story, except ccsload found a new set of FW for the load-n-go, which I updated. The update ended up "bricking" the dsPIC I use in most of our products....in front of customers. Fortunately, rolling back the FW on the load-n-go and reprogramming the dsPIC fixed everything.

Since then I've found that the newer versions of the load-n-go FW don't seem to support (or "play nice") with old HW revs of the load-n-go. CCS is aware of the issue but given the response I've thus far received (which is nil), I'm assuming they're not going to fix it.
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