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 support@ccsinfo.com

PIC24FV32KA304 - PUT fuse not configured

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



Joined: 27 Jun 2012
Posts: 6

View user's profile Send private message

PIC24FV32KA304 - PUT fuse not configured
PostPosted: Tue Nov 19, 2013 9:01 pm     Reply with quote

HI All

am working on a Project in PIC24FV32KA304 with CCS PCD Compiler Version 4.130.

I am enabling the PUT fuse in the header file. as below.

Code:
#include <24FV32KA304.h>
#device ICD=TRUE

#FUSES WPOSTS1                  //Watch Dog Timer PostScalar 1:1
#FUSES FRC_PLL                  //Internal Fast RC Oscillatorwith PostScalar and 4X PLL
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOCKSFSM             //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOWINDIS                 //Watch Dog Timer in Window mode
//#FUSES NOBROWNOUT               //No brownout reset
//#FUSES NOPUT                    //No Power Up Timer
#FUSES BORV_MID
#FUSES PUT                       //Power Up Timer
#FUSES DEBUG                    //Debug mode for use with ICD
#FUSES ICSP3                    //ICD uses PGC3/PGD3 pins
#FUSES NODSBOR                  //BOR disabled in Deep Sleep
#FUSES NODSWDT                  //Deep Sleep Watchdog Timer disabled
#FUSES NODSWDT                  //Deep Sleep Watchdog Timer disabled
#FUSES PROTECT                  //Code protected from reads
#FUSES SOSC_DIGITAL         
#FUSES OSCIO                    //OSC is general purpose output



After compilation, when i check the configuration bits in MPlab IDE ,still it shows " PWRT Disabled".

I checked for other configuration bits. It works fine. only the PUT is not configuring properly.

So, every time after compilation i have to change that manually before programming.

Anyone have any idea how to resolve this? is it possible to fix it in code without changing the config manually??

Thanks

Vino
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Wed Nov 20, 2013 1:35 am     Reply with quote

It's because you have debug selected.
In common with things like WDT, this is disabled when ICD is selected.

If you read the ICD manual, this is referenced. Not a CCS problem, but an oddity of ICD....

Best Wishes
vino182k6



Joined: 27 Jun 2012
Posts: 6

View user's profile Send private message

PostPosted: Wed Nov 20, 2013 2:03 am     Reply with quote

Hi Ttelmah

Thanks for your response.

I tried after disabling the "debug" fuse and still am getting the same.

is anything else am missing here???

Code:
#include <24FV32KA304.h>
//#device ICD = True

#FUSES WPOSTS1                  //Watch Dog Timer PostScalar 1:1
#FUSES FRC_PLL                  //Internal Fast RC Oscillatorwith PostScalar and 4X PLL
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOCKSFSM             //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES NOWINDIS                 //Watch Dog Timer in Window mode
#FUSES NOBROWNOUT               //No brownout reset
//#FUSES NOPUT                    //No Power Up Timer
//#FUSES BORV_MID
#FUSES PUT                       //Power Up Timer
//#FUSES DEBUG                    //Debug mode for use with ICD
#FUSES ICSP1                    //ICD uses PGC3/PGD3 pins
#FUSES NODSBOR                  //BOR disabled in Deep Sleep
#FUSES NODSWDT                  //Deep Sleep Watchdog Timer disabled
#FUSES NODSWDT                  //Deep Sleep Watchdog Timer disabled
#FUSES PROTECT                  //Code protected from reads
#FUSES SOSC_DIGITAL         
#FUSES OSCIO                    //OSC is general purpose output


Even I disabled #device ICD = also.

Thank you

vinoth
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Wed Nov 20, 2013 2:12 am     Reply with quote

Are you compiling through MPLAB?.
If so, this sets the chip to debug mode by default. You need to set this to release mode to override it.
You don't need the DEBUG fuse, selecting ICD automatically sets this.

Try a simple test, compile in CCS 'only', and look at the fuses at the end of the .lst file.

With ICD selected:
Code:

Configuration Fuses:
   Word  1L: 000F   NOWRTB NOBSS
          H: FF00 
   Word  2L: 0000 
          H: FF00 
   Word  3L: 0003   NOWRT NOPROTECT
          H: FF00 
   Word  4L: 0041   FRC_PLL SOSC_DIGITAL LPRCHIGH NOIESO
          H: FF00 
   Word  5L: 00BB   NOPR OSCIO POSCFREQ_H SOSC_HIGH NOCKSFSM
          H: FF00 
   Word  6L: 0010   WPOSTS1 WDT128 NOWINDIS NOWDT
          H: FF00 
   Word  7L: 00D7   BROWNOUT NOLVR NOPUT NOALTI2C BORV_MID MCLR
          H: FF00 
   Word  8L: 0003   ICSP1 DEBUG
          H: FF00 
   Word  9L: 001F   DSWDT2147483648 DSWDTCK_LPRC NODSBOR NODSWDT
          H: FF00 

   Some fuses have been forced to be compatible with the ICD debugger.


Then with ICD turned off:
Code:

Configuration Fuses:
   Word  1L: 000F   NOWRTB NOBSS
          H: FF00 
   Word  2L: 0000 
          H: FF00 
   Word  3L: 0001   NOWRT PROTECT
          H: FF00 
   Word  4L: 0041   FRC_PLL SOSC_DIGITAL LPRCHIGH NOIESO
          H: FF00 
   Word  5L: 00BB   NOPR OSCIO POSCFREQ_H SOSC_HIGH NOCKSFSM
          H: FF00 
   Word  6L: 0010   WPOSTS1 WDT128 NOWINDIS NOWDT
          H: FF00 
   Word  7L: 00DF   BROWNOUT NOLVR PUT NOALTI2C BORV_MID MCLR
          H: FF00 
   Word  8L: 0081   ICSP3 NODEBUG
          H: FF00 
   Word  9L: 001F   DSWDT2147483648 DSWDTCK_LPRC NODSBOR NODSWDT
          H: FF00

Note the comment disappearing, the PUT fuse being selected, and the DEBUG fuse automatically changing.

Best Wishes
vino182k6



Joined: 27 Jun 2012
Posts: 6

View user's profile Send private message

PostPosted: Wed Nov 20, 2013 3:37 am     Reply with quote

Hi Ttelmah

Thanks.

Yes I am using Mplab IDE for compiling.

yeh its working now after i disable the "Compile for use with ICD debugger" option in Project build options.

But , the Mplab ide doesn't show up the checksum after compilation. even if i import also i doesn't.

I am using that for tracking the hex file without opening it.
is there any other way to get that??

Thanks for your valid time.

Thanks
Vinoth
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Wed Nov 20, 2013 7:45 am     Reply with quote

If you are not using the ID for anything else, if you use #ID CHECKSUM in the code, then you can look at the ID memory, and see this. - configure - ID memory, and it'll show the checksum.

Best Wishes
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