Serial port Rx queue size
From: Meir Tseitlin (meir_tseitlin_at_softhome.net)
Date: 05/25/04
- Next message: visi: "why be unloading ?"
- Previous message: Taryn: "Re: Installing ISR"
- Next in thread: David Liao \(MS\): "Re: Serial port Rx queue size"
- Reply: David Liao \(MS\): "Re: Serial port Rx queue size"
- Messages sorted by: [ date ] [ thread ]
Date: 24 May 2004 23:53:25 -0700
Hi guys,
(1)
As far as I understood from the previous posts in this thread, the Rx
and the Tx buffers of RS232 port in Windows CE are always size 1
(GetCommProperties... dwMaxRxQueue/dwMaxTxQueue). That is because
WinCE uses ReadFile/WriteFile internal buffers to transfer data and no
overlapped io available. If that's so, why do I get different values,
when I call GetCommStatus in stat.cbInQue? What is the meaning of this
value, if no Rx buffer available. In fact this value seems correct
because it grows when I send more data to the port and I don't call
ReadFile to process it.
(2)
One more question. If I use WriteFile to transfer data and it doesn't
return till all of the data is sent. Therefore, the time it takes for
WriteFile to return depands on the serial port connection speed (and
the amount of data to transfer, of course). In fact WriteFile time =
DataSize*8/PortSpeed. If it's correct, does it mean I should not
implement any other functionality at my Tx Thread, because if I do -
my transfer speed would decrease? What happends when scheduler jumps
to another thread which uses a lot of CPU cycles, does the Tx speed
affected?
(I am using Pocket Pc 2003 platform on iPaq 3950)
Thanks
Meir Tseitlin
- Next message: visi: "why be unloading ?"
- Previous message: Taryn: "Re: Installing ISR"
- Next in thread: David Liao \(MS\): "Re: Serial port Rx queue size"
- Reply: David Liao \(MS\): "Re: Serial port Rx queue size"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|