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

3.119 disables global interrupts

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







3.119 disables global interrupts
PostPosted: Thu Oct 31, 2002 4:13 am     Reply with quote

<font face="Courier New" size=-1>Dear,

3.119 and 18F452

I have updated from 3.110 to 3.119 and after that my program fails. I have determined that something disables the global interrrupt a few seconds after power up the PIC. After introducing an additional enable_interrupts(GLOBAL); into the main loop everything seems to work fine, but this is not acceptable because it is unknows how often the global interrupt will be disabled from 3.119. In worst case the global interrupt will be disabled immediately after the enable_interrupts(GLOBAL); directive.
I have checked this with different projects and always the same problem.
Has anyone seen this before ?

Code in general:

enable_interrupts(GLOBAL);
enable_interrupts(INT_RDA); enable_interrupts(INT_EXT); enable_interrupts(INT_TIMER1);
enable_interrupts(INT_TIMER3);

main()
{
while(1)
{
enable_interrupts(GLOBAL); // prog fails without this directive
...
...
code
...
...
}

regards nilsener</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8323
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: 3.119 disables global interrupts
PostPosted: Thu Oct 31, 2002 6:47 am     Reply with quote

Are you using an ICE2000 or an actual chip. I have as well as others here experienced this problem with the ICE. The actual chip works fine. I believe the problem is in the ICE module. This problem happens to me with both the CCS compiler and the Microchip C18 compiler.

Regards,
Mark

:=<font face="Courier New" size=-1>Dear,
:=
:=3.119 and 18F452
:=
:=I have updated from 3.110 to 3.119 and after that my program fails. I have determined that something disables the global interrrupt a few seconds after power up the PIC. After introducing an additional enable_interrupts(GLOBAL); into the main loop everything seems to work fine, but this is not acceptable because it is unknows how often the global interrupt will be disabled from 3.119. In worst case the global interrupt will be disabled immediately after the enable_interrupts(GLOBAL); directive.
:=I have checked this with different projects and always the same problem.
:=Has anyone seen this before ?
:=
:=Code in general:
:=
:=enable_interrupts(GLOBAL);
:=enable_interrupts(INT_RDA); enable_interrupts(INT_EXT); enable_interrupts(INT_TIMER1);
:=enable_interrupts(INT_TIMER3);
:=
:=main()
:={
:=while(1)
:={
:=enable_interrupts(GLOBAL); // prog fails without this directive
:=...
:=...
:=code
:=...
:=...
:=}
:=
:=regards nilsener</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8325
nilsener
Guest







Re: 3.119 disables global interrupts
PostPosted: Thu Oct 31, 2002 7:36 am     Reply with quote

Dear Mark,

thanks for your response,

I use MPLAB 5.70.00. and ICD2
I am not sure what ICE2000 is ? a chip ? If you mean that newer chips of 18F452 are working, perhaps do you know the datecode of those chips ?

:=Are you using an ICE2000 or an actual chip. I have as well as others here experienced this problem with the ICE. The actual chip works fine. I believe the problem is in the ICE module. This problem happens to me with both the CCS compiler and the Microchip C18 compiler.
:=
:=Regards,
:=Mark
:=
:=:=<font face="Courier New" size=-1>Dear,
:=:=
:=:=3.119 and 18F452
:=:=
:=:=I have updated from 3.110 to 3.119 and after that my program fails. I have determined that something disables the global interrrupt a few seconds after power up the PIC. After introducing an additional enable_interrupts(GLOBAL); into the main loop everything seems to work fine, but this is not acceptable because it is unknows how often the global interrupt will be disabled from 3.119. In worst case the global interrupt will be disabled immediately after the enable_interrupts(GLOBAL); directive.
:=:=I have checked this with different projects and always the same problem.
:=:=Has anyone seen this before ?
:=:=
:=:=Code in general:
:=:=
:=:=enable_interrupts(GLOBAL);
:=:=enable_interrupts(INT_RDA); enable_interrupts(INT_EXT); enable_interrupts(INT_TIMER1);
:=:=enable_interrupts(INT_TIMER3);
:=:=
:=:=main()
:=:={
:=:=while(1)
:=:={
:=:=enable_interrupts(GLOBAL); // prog fails without this directive
:=:=...
:=:=...
:=:=code
:=:=...
:=:=...
:=:=}
:=:=
:=:=regards nilsener</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8328
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: 3.119 disables global interrupts
PostPosted: Thu Oct 31, 2002 8:06 am     Reply with quote

ICE is In-Circuit-Emulator. I know there are some differences is how the emulator and the actual chip handle interrupts. There is errata on the interrupt handling for the PIC18's. According to Microchip support, the emulator module was built base on the orginal documentation in the datasheet. The PIC18's were built based on the errata. I know have have some early engineering samples that do not work. They no longer verify correctly (if my memory is correct). The latest chips I have all seem to work fine. The code on the chips that I am currently using is 0231JGF.


:=Dear Mark,
:=
:=thanks for your response,
:=
:=I use MPLAB 5.70.00. and ICD2
:=I am not sure what ICE2000 is ? a chip ? If you mean that newer chips of 18F452 are working, perhaps do you know the datecode of those chips ?
:=
:=:=Are you using an ICE2000 or an actual chip. I have as well as others here experienced this problem with the ICE. The actual chip works fine. I believe the problem is in the ICE module. This problem happens to me with both the CCS compiler and the Microchip C18 compiler.
:=:=
:=:=Regards,
:=:=Mark
:=:=
:=:=:=<font face="Courier New" size=-1>Dear,
:=:=:=
:=:=:=3.119 and 18F452
:=:=:=
:=:=:=I have updated from 3.110 to 3.119 and after that my program fails. I have determined that something disables the global interrrupt a few seconds after power up the PIC. After introducing an additional enable_interrupts(GLOBAL); into the main loop everything seems to work fine, but this is not acceptable because it is unknows how often the global interrupt will be disabled from 3.119. In worst case the global interrupt will be disabled immediately after the enable_interrupts(GLOBAL); directive.
:=:=:=I have checked this with different projects and always the same problem.
:=:=:=Has anyone seen this before ?
:=:=:=
:=:=:=Code in general:
:=:=:=
:=:=:=enable_interrupts(GLOBAL);
:=:=:=enable_interrupts(INT_RDA); enable_interrupts(INT_EXT); enable_interrupts(INT_TIMER1);
:=:=:=enable_interrupts(INT_TIMER3);
:=:=:=
:=:=:=main()
:=:=:={
:=:=:=while(1)
:=:=:={
:=:=:=enable_interrupts(GLOBAL); // prog fails without this directive
:=:=:=...
:=:=:=...
:=:=:=code
:=:=:=...
:=:=:=...
:=:=:=}
:=:=:=
:=:=:=regards nilsener</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8330
Ned Konz
Guest







Re: 3.119 disables global interrupts
PostPosted: Thu Oct 31, 2002 6:07 pm     Reply with quote

:=<font face="Courier New" size=-1>Dear,
:=
:=3.119 and 18F452
:=
:=I have updated from 3.110 to 3.119 and after that my program fails. I have determined that something disables the global interrrupt a few seconds after power up the PIC. After introducing an additional enable_interrupts(GLOBAL); into the main loop everything seems to work fine, but this is not acceptable because it is unknows how often the global interrupt will be disabled from 3.119. In worst case the global interrupt will be disabled immediately after the enable_interrupts(GLOBAL); directive.
:=I have checked this with different projects and always the same problem.
:=Has anyone seen this before ?

Yes, I see it when changing from 3.116 to 3.118.
I haven't gotten around to tracking it down, and probably won't, as I've moved to the Microchip C18 compiler.
This was the last straw for me.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8357
Regan
Guest







Re: 3.119 disables global interrupts
PostPosted: Fri Nov 01, 2002 12:25 am     Reply with quote

I had a similar problem to Mark while using the RICE17A emulator. I kept finding that interrupts would be disabled.
I put the following command at the beginning of my main() routine and everything has been smooth sailing since then.

#define RCON 0xFD0
main()
{
bit_clear(RCON,7); // clear IPEN bit
etc...

This disables interrupt priority management and puts the processor into PIC16C compatability mode with respect to interrupts. Unless you have specifically coded some high-priority interrupts, this may do the trick.

regards,

Regan.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8367
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