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

serial receive halt

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








serial receive halt
PostPosted: Fri Sep 01, 2006 2:02 pm     Reply with quote

Hi All,
I have a strange problem, after sending the following strings the INT_RDA stops receiving even if there is data.

disable_interrupts(GLOBAL);
//disable_interrupts(INT_RDA);
delay_ms(100);
printf("%s", cmgs);
printf("%s,129\n\r", Number);
delay_ms(250);
printf("%s%c\r\n", sendText, 0x1a);
delay_ms(100);
while (kbhit()) getc();
//enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);

I have tryed to stop the GLOBAL interrupts but it didnt work,
What I'm doing wrong ?
Ttelmah
Guest







PostPosted: Fri Sep 01, 2006 2:24 pm     Reply with quote

The problem is that you have huge periods of time, where the receive part of the UART, is not being serviced. Depending on the chip (some have a two character FIFO, and some only a one character FIFO), if more than 1.99999 characters (or 2.99999 for the chips with a two character FIFO), arrive at any point from the start of the program to the end of the 100mSec delay in front of the getc, unless you have the 'ERRORS' keyword in your #use RS232, the receive part of the UART, will be locked out. It'll still be locked with the 'ERRORS' heyword, but should recover when getc is called (this automatically clears the ERROR status).
Have a look at the thread 'INT_rda disable interrupts'.

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