View previous topic :: View next topic |
Author |
Message |
Marco27293
Joined: 09 May 2020 Posts: 126
|
PIC18F47J53 CCS C Compiler 5.090 #FUSES DSWDT issue |
Posted: Fri Jul 17, 2020 9:46 am |
|
|
Hi,
when I try to use (they are included in 18F47J53.h device library):
#FUSES DSWDT_38HRS
or
#FUSES DSWDT_9HRS
I got: Error#111 Unknown keyword in #FUSES "DSWDT_*"
I need to use these fuses, does anyone know any workaround ?
Is it a compiler bug?
Regards,
Marco |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Fri Jul 17, 2020 12:25 pm |
|
|
OK.
Understand the .h file only 'lists' the fuses that should exist, doesn't
define them. The actual definition is in the .dat file for the compiler.
Sounds as if these ones have got missed...
So the solution is two part:
1) Talk to CCS, and point out that this is not working. They may
well have already fixed it and send you a new file to fix the compiler.
2) To get round it, set the fuse needed manually.
The syntax is:
#FUSES 1=0xCF00 // sets config word 1 to 0xCF00
So you need to identify what word needs to be set, and to what
value, and use this. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Sat Jul 18, 2020 10:53 am |
|
|
The fuse database for this seems to be completely screwed....
If you try:
#fuses 3=0xF9DF
The .lst file reports is as:
Word 3: F9DF DSWDTOSC_INT RTCOSC_T1 DSBOR DSWDT DSWDT_8SEC NOIOL1WAY ADC12 MSSPMSK5
So says this is the setting for 8 seconds. However the data sheet says
that 0b1101 in the upper nibble of the low word, is the setting for 38.5
hours...
This should be the setting for 38 hours. |
|
|
Marco27293
Joined: 09 May 2020 Posts: 126
|
|
Posted: Mon Jul 20, 2020 1:36 am |
|
|
Thank you Ttelmah,
I really appreciate your help.
Regards,
Marco |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Mon Jul 20, 2020 1:50 am |
|
|
I have emailed CCS pointing out that there is a problem.... |
|
|
|