Tini Blackbox serial race condition hang?
"Dooley, Skip" <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <DFA43913F010A343B3311B059A7AA9990189830D@exhsv06> |
OS: 1.12 Two DS80C400 evaluation boards hooked back-to-back if you will. Driven by MTTY (MS example TTY) on a PC with 104 byte files every 300-330 ms @ 9600 baud bidirectional simultaneous data flow. The java software is basically derived from the Sun Blackbox example. The program is multithreaded but rather then having a transmitter thread (to keep it simpler) the receiver threads write the data they have received to their peer ports output stream. (crossing streams just like black box). PC<->Serial0<->serialtest<->serial4<->serial4<->serialtest<->serial0<->PC The program works and in most case will run for hours until one or both unit lock up writing data (there is no flow control). The write to serial0 (to the PC) is generally the culprit but I have seen the serial4 write hang also. I have looked at the stream implementation and see synchronized methods. Something is causing the write to block? The debug cycle can be long since it can take hours for this to occur. The only thing I can think of at this point is the serial ports need synchronization on them which could be done but no more simultaneous bidirectional data flow! Certainly someone else has seen a similar problem, but maybe not, my tests push a lot of data over a long time bidirectional. Any thoughts? I am to the point of trashing the code and using NativeComm which may or may not resolve the problem! The code is a little large to post by I am trimming it down to as small as I can get it in a reasonable time and still demonstrate the problem. It is multiple java files. I can send it via e-mail on request or will post it when I get it trimmed down some more Skip Dooley _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini