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

5.080 PIC24 fuse issues

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



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

5.080 PIC24 fuse issues
PostPosted: Wed Aug 22, 2018 3:12 am     Reply with quote

Hi,
Has anyone else had issues with 5.080, and the fuses on PIC24's?.
May be specific to just one chip, or may be more generic...

I have code that compiled with 5.078 loads and runs fine. Compile with 5.080 and it won't work.
PIC24FJ256GA702

They seem to have 'tidied' the fuse handling, with half the number of lines of Intel hex now being generated for the fuses, but a couple not don't seem to be working right.
When you load the file to the programmer, some fuses are setting differently, and a couple don't seem to allow you to set them.
Have had to manually set the fuses in the programmer to get the code to work.

So has anyone else seen fuse issues with the current compiler?.
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Wed Aug 22, 2018 6:06 am     Reply with quote

I have code for a 24FJ256GA704 where I moved up from 5.075 to 5.080. With 5.080 I have a new dll from CCS for a const problem I was having.
There are differences in the same code compiled between the two but the config words in the hex file are the same between them.

Code:

Configuration Fuses:
   Word  1L: FFFF   NOWRTB NOBSS NOBS NOWRT NOPROTECT NOWPCFG NOPROTECT_CFG NOAIVT
          H: 0000 
   Word  2L: FFFF 
          H: 0000 
   Word  3L: FFFF 
          H: 0000 
   Word  4L: FFFF 
          H: 0000 
   Word  5L: FFFF 
          H: 0000 
   Word  6L: 7FFF 
          H: 0000 
   Word  7L: FFF9   FRC_PLL NOPLL IESO
          H: 0000 
   Word  8L: FF03   NOPR OSCIO SOSC_DIG PLL_FROM_FRC NOIOL1WAY CKSFSM
          H: 0000 
   Word  9L: FF9F   WPOSTS16 WDT128 NOWDT WINDIS WDTWIN_25% WDTCMX WDTCLK_LPRC
          H: 0000 
   Word 10L: FFFC   NOBROWNOUT NOLVR DNVP
          H: 0000 
   Word 11L: FFDF   ICSP1 NOJTAG NODEBUG
          H: 0000 
   Word 12L: FFFF   NOALTCMPI NOTMPRPIN SOSC_HIGH NOALTI2C1
          H: 0000 
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Wed Aug 22, 2018 6:24 am     Reply with quote

That's the .LST, not the .HEX. Very Happy

That is what is 'odd'. The .LST is the same between both versions. The .HEX changes. When I read the fuses in with the programmer, there are things not being set. I'm talking to CCS (having huge hassles with something else as well...), but unfortunately Darren is away for a few days. Sad

The .LST doesn't display the values right anyway. If you look your's shows byte 3 and 4 in each word being 0. However byte 3, has to be 0xFF, since this always reads as 0xFF from the chip. If though you look at the .HEX, you have:
:105E0000FFFF00FFFFFF00FFFFFF00FFFFFF00FF9E

Which decodes as
0xFFFF
0x00FF
0xFFFF
0x00FF
0xFFFF
0x00FF
0xFFFF
0x00FF
Only one byte in four as 0x00.

It correctly has the third byte as 0xFF.

So the .LST and the .HEX are not actually agreeing... Sad

The .LST gives:
Code:

Configuration Fuses:
   Word  1L: FFFF   NOWRTB NOBSS NOBS NOWRT NOPROTECT NOWPCFG NOPROTECT_CFG NOAIVT
          H: 0000 
   Word  2L: FFFF 
          H: 0000 
   Word  3L: FFFF 
          H: 0000 
   Word  4L: FFFF 
          H: 0000 
   Word  5L: FFFF 
          H: 0000 
   Word  6L: 7FFF 
          H: 0000 
   Word  7L: FF89   FRC_PLL PLL2 IESO
          H: 0000 
   Word  8L: FF33   NOPR OSCIO SOSC_DIG PLL_FROM_PRIMARY IOL1WAY CKSFSM
          H: 0000 
   Word  9L: FFCF   WPOSTS16 WDT32 WDT_SW WINDIS WDTWIN_25% WDTCMX WDTCLK_LPRC
          H: 0000 
   Word 10L: FFFF   BROWNOUT NOLVR DNVP
          H: 0000 
   Word 11L: FFDF   ICSP1 NOJTAG NODEBUG
          H: 0000 
   Word 12L: FFEF   NOALTCMPI NOTMPRPIN SOSC_HIGH ALTI2C1
          H: 0000 

The .HEX with .078 gives:
Code:

:1057F00000000000000000000000000000000000A9
:105E0000FFFF00FFFFFF00FFFFFF00FFFFFF00FF9E
:105E1000FFFF00FFFFFF00FFFFFF00FFFFFF00FF8E
:105E2000FFFF00FFFFFF00FFFF7F00FFFFFF00FFFE
:105E3000F9FF00FFFFFF00FF33FF00FFFFFF00FF40
:105E4000CFFF00FFFFFF00FFFFFF00FFFFFF00FF8E
:105E5000DFFF00FFFFFF00FFEFFF00FFFFFF00FF7E
:00000001FF
;PIC24FJ256GA702
;CRC=136B  CREATED="22-Aug-18 10:16"


While with .080 I get:
Code:

:105DF00000000000000000000000000000000000A3
:105E0000FFFF00FFFFFF00FFFFFF00FFFFFF00FF9E
:105E1000FFFF00FFFF7F00FF89FF00FF33FF00FF50
:105E2000CFFF00FFFFFF00FFDFFF00FFEFFF00FFDE
:00000001FF
;PIC24FJ256GA702
;CRC=0353  CREATED="22-Aug-18 13:33"


Load it into the programmer, and it's got the AIVT enabled and lots of other things that stop it working. Turn these off explicitly, and they remain set....
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Wed Aug 22, 2018 6:59 am     Reply with quote

I did compare the hex files, just pasted the listing in to get human readable version to see.

Code:

5.075
:105E0000FFFF00FFFFFF00FFFFFF00FFFFFF00FF9E
:105E1000FFFF00FFFFFF00FFFFFF00FFFFFF00FF8E
:105E2000FFFF00FFFFFF00FFFF7F00FFFFFF00FFFE
:105E3000F9FF00FFFFFF00FF03FF00FFFFFF00FF70
:105E40009FFF00FFFFFF00FFFCFF00FFFFFF00FFC1
:105E5000DFFF00FFFFFF00FFFFFF00FFFFFF00FF6E

5.080
:105E0000FFFF00FFFFFF00FFFFFF00FFFFFF00FF9E
:105E1000FFFF00FFFFFF00FFFFFF00FFFFFF00FF8E
:105E2000FFFF00FFFFFF00FFFF7F00FFFFFF00FFFE
:105E3000F9FF00FFFFFF00FF03FF00FFFFFF00FF70
:105E40009FFF00FFFFFF00FFFCFF00FFFFFF00FFC1
:105E5000DFFF00FFFFFF00FFFFFF00FFFFFF00FF6E

gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Wed Aug 22, 2018 7:05 am     Reply with quote

This is the build version of 5.080 I have with the new dll from CCS

Quote:

CCS PCD C Compiler, Version 5.080, xxxxx 22-Aug-18 07:08
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Wed Aug 22, 2018 7:12 am     Reply with quote

Thanks.
As you say looks the same.
It may well be chip specific. I have another project on a different chip, and this seems OK.
For now I'll run with .078, and wait to see what CCS say. The other issues I'm having are more 'major' in some ways. May suggest something they have changed is 'uncomfortable' with my code...
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Mon Oct 01, 2018 7:06 am     Reply with quote

Just an update to this.

This fault, and another that I had found with large const arrays in PCD, have both been fixed in 5.081.
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