Re: WRITE_PORT_BUFFER_ULONG



You need to figure out the capabilities of the underlying serial port
hardware first.
WRITE_PORT_BUFFER_ULONG is normally used in a disk driver or ethernet
driver where there is a 32 bit I/O port register on the peripheral that
writing to repeatedly will write consecutive ULONGs to an internal RAM/DMA
buffer on the peripheral.
This sounds like too high speed of an operation for a serial port. Also,
the serial port needs to consider flow control and such.

If the hardware you are using can support such high data-rates, then maybe
the COMMTIMEOUTS need to be reduced using SetCommTimeouts.

David Kanz [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Telis" <adosis@xxxxxxxxxxxxx>
| Newsgroups: microsoft.public.windowsce.embedded.vc
| Subject: Re: WRITE_PORT_BUFFER_ULONG
| Date: 5 Oct 2006 04:26:35 -0700
| Organization: http://groups.google.com
| Lines: 31
| Message-ID: <1160047594.920867.310070@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
| References: <1159954902.518204.298450@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
| <OXhFKH85GHA.2104@xxxxxxxxxxxxxxxxxxxx>
| NNTP-Posting-Host: 83.67.51.45
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1160047600 21284 127.0.0.1 (5 Oct 2006
11:26:40 GMT)
| X-Complaints-To: groups-abuse@xxxxxxxxxx
| NNTP-Posting-Date: Thu, 5 Oct 2006 11:26:40 +0000 (UTC)
| In-Reply-To: <OXhFKH85GHA.2104@xxxxxxxxxxxxxxxxxxxx>
| User-Agent: G2/1.0
| X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
| Complaints-To: groups-abuse@xxxxxxxxxx
| Injection-Info: i3g2000cwc.googlegroups.com; posting-host=83.67.51.45;
| posting-account=fuFrHA0AAADsAK-xdtNdTGJ0h9Zf_5YC
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTFEEDS01.phx.gbl!msrtrans!m
srn-in!newshub.sdsu.edu!postnews.google.com!i3g2000cwc.googlegroups.com!not-
for-mail
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.windowsce.embedded.vc:47461
| X-Tomcat-NG: microsoft.public.windowsce.embedded.vc
|
| Thanks Steve for your reply,
| The answer to your question is because either WinCE or my PC104
| processor/Eurotech delays the serial outgoing packet after calling the
| serial WriteFile. I contacted Eurotech and after following their
| suggestions I tried to set the thread priorities higher, using
| Priority256 as 10 in the registry, and also CeSetThreadPriority etc but
| I'm still getting the same results.
| I understand that going through WRITE_PORT_BUFFER_ULONG is maybe worst
| than climbing the Everest, but I'd like to know if there's anybody
| there who went through that and is kind enough to give me some hints.
| If its impossible, then I certainly need to find an alternative way.
|
| still hoping..
| Telis
|
|
| Steve Maillet (eMVP) wrote:
| > >I would like to know if there is any chance to bypass the serial
| > >WriteFile() by using WRITE_PORT_BUFFER_ULONG straight on the serial com
| > >I/O.
| > Ummm, why? The driver will usually do that underneath anyway. It hides
the
| > hardware specifics of where the port is and even if such a thing is even
| > possible given the hardware the driver is for. (It's possible a hardware
| > implementation won't work with that particular function).
| >
| > --
| > Steve Maillet
| > EmbeddedFusion
| > www.EmbeddedFusion.com
| > smaillet at EmbeddedFusion dot com
|
|

.



Relevant Pages

  • Re: Accessing peripherals from a managed application
    ... There's a driver for, ... I did find that System.IO.Port has the functionalities of a serial port ... Paul G. Tobey wrote: ... Call on the imported functions to access the hardware. ...
    (microsoft.public.windowsce.app.development)
  • Oldskool variety
    ... mostly expect a windoze operating system. ... to code for every different hardware a different thing. ... reminder, the code, the way the BIOS does it is there. ... the serial port using billy's API, ...
    (alt.lang.asm)
  • Re: Accessing peripherals from a managed application
    ... I did find that System.IO.Port has the functionalities of a serial port ... Bruce Eitman (eMVP) ... Maybe you open the driver with CreateFile, ... Call on the imported functions to access the hardware. ...
    (microsoft.public.windowsce.app.development)
  • Re: Serial port failure
    ... message to a group of embedded boxes daisy chained via the serial port. ... Assuming the driver is locking up then it looks like a serial port ... My advice is to try a different serial port hardware. ...
    (comp.lang.python)
  • Re: [RFC/RFT] [patch] Elo serial touchscreen driver
    ... >>These are in a lot of POS hardware, too, and sometimes they're a pain to ... Touch screens doing this are severely brain-damaged. ... state, by talking directly to the serial port, and "calibrating" it to ... and just simulate key presses for MSR ...
    (Linux-Kernel)