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

Delay problems

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



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

Delay problems
PostPosted: Mon Jul 26, 2004 11:19 am     Reply with quote

Has anybody had problems with the delay_ms() statement hanging your program? I had a program working just fine and after adding a bit of code things hang when it hits the first delay statement. I didn't touch the #fuses or #use statments and I added code in various parts of the body and now POOF it pukes on me. I'm not sure if I want to scratch my head and try to remember where I changed things either. Rolling Eyes Just wondered if anybody has had a problem with them hanging a program.

Ronald
valemike
Guest







PostPosted: Mon Jul 26, 2004 11:27 am     Reply with quote

Nope, never had delay_ms() cause problems, even with the supposed bugs in some of the recent versions.

Do you use delay_ms() both in an ISR and in your non-isr code? The compiler makes delay_ms() reentrant if you are using it in both. Part of reentrancy I think involves turning off interrupts. Perhaps you're missing an interrupt. But then again, that interrupt flag would pend, so who knows.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Mon Jul 26, 2004 1:10 pm     Reply with quote

A-HA! I was able to figure out what I had done. During my edits, I had remarked out timer_2's ISR but left the interrupt enabled. The program would run just fine until I called my first delay_ms() and then it would hang. I tested this with the other timer interrupts and they caused the same thing. Oh well. *shrug*

Ronald
Smile, you're one day closer to retirement.
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