[EMAIL PROTECTED] wrote: > I've setup FG to output pitch and bank information > on a com port and a separate device that takes that > serial information and processes it. However, I > can't set FG to output the information any faster > than 1Hz because if I do FG locks up on me. There > is nothing in the console or portmon that indicate > anything went wrong - everything just freezes. > > Here are some more specifics. > > * As I increase the output frequency, the shorter > the time it takes to lockup > > * Changing port settings (baud, bits, etc.) do > not have any effect > > * At 2 HZ, FG locks up about 2 minutes after FG starts > > * If I unplug my device, FG runs fine > > * I've changed the sampling rate of my device to > match the output frequency, but FG still locks-up > > * My device does not have a serial buffer > > * I haven't run FG @ 1Hz with my device connected > for more than 5 minutes, but my I have a feeling that > it would lockup in this configuration given enough time > > * If I use HyperTerminal on another computer and > connect to FG with a null modem cable, FG does not lockup > > * I'm running XP > > * When running FG, all my CPU cycles are used > even when there are no other programs running > > Obviously, my device is causing the problem, but > I'm not sure what problem it is causing. My gut > tells me that either a) there is a port buffer > (on the PC) that is getting filled up and when it > does it causes FG to lockup, or b) there is some > sort of feedback to the PC port from my device > that's causing the lockup. Just so you know, I am > using a Parallax BS2 microcontroller as the device > processing the FG serial data. > > Any suggestions?
It seems to be a flow control problem. FG use Xon/Xoff flow control, and the lockup seems to be related to the amount of data sent. And if the com port receive an Xoff character, the PC serial device will block the write operation ( not multi-threaded ) after a while. So I would check if the device is not emitting an Xoff character at one moment or another without reenabling the flow by an Xon in a reasonable amount of time. Perhaps something to program on the controller side. When you use hyperterminal, your PC is fast enough to consume characters before emitter's buffer reach the high limit, so you are not seeing the problem in that configuration. Does it seems reasonable to you ? -Fred _______________________________________________ Flightgear-users mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-users
