From: Andrew Cottrell Newsgroups: comp.os.msdos.djgpp Subject: Re: Int 0x22??? (DJGPP and CWSDPMI) Date: Tue, 08 Oct 2002 18:22:08 +1000 Organization: ECLiPSE Lines: 35 Message-ID: References: NNTP-Posting-Host: p225-tnt8.syd.ihug.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: lust.ihug.co.nz 1034065335 1880 203.173.147.225 (8 Oct 2002 08:22:15 GMT) X-Complaints-To: abuse AT ihug DOT co DOT nz NNTP-Posting-Date: Tue, 8 Oct 2002 08:22:15 +0000 (UTC) X-Newsreader: Forte Agent 1.92/32.572 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >We are currently performing a "stress test" on the serial comm link >used as part of our application. The test is very simple. We send a >"poll" command to the piece of equipment with which we are communicating. >The equipment responds with a "poll response" message. The incoming >message generates a series of interrupts to tell us that there is data >available in the UART. We read and display this data before sending out >the next poll command. > >This all works very well for a while. After somewhere between 0 and 15 >minutes, the program will crash with the following error (example): Which comms library are you using? If you aren't have you taken care of the FIFO when setting up the uart and checking for RX's chars. How much data is transmitted from master to slave and then back again each seconds etc? I have not seen this before and have been using serial comms with DJGPP and various comms libraries for a long long time. Some things to try to see where the problem may be:- 1) If you mod the software to tx only does the program still crash? 2) If you mod the firmware to tx only does the program still crash? If yes then you may have a buffer problem in the tx code. If you are using RS485 (os similar) in half duplex then I would check to see that the hardware is not looping the data back to the RX and when a corrupted char is received the program fails because it jumps into hyperspace. You may want to put a data sniffer on the comms. I have one availabel at http://homepages.ihug.com.au/~acottrel/ . It has full source code and may be of some use. Hope this helps. Andrew