COM port init

Discussion in 'Windows Vista Drivers' started by andsin, Jul 30, 2003.

  1. andsin

    andsin Guest

    i need monopolize com ports by my prog. i can't use
    standart windows com port api because i have to
    immediatelly response to request. i decided to use kmd.
    driver works under XPE with "standart computer"
    (not "computer with acpi"). driver works properly until i
    deleted serial.sys and serenum.sys to prevent windows to
    connect to ports. when i deleted drivers port read always
    return 0xff.
    what i have to do to initiate ports.
    thank you!
    andsin, Jul 30, 2003
    1. Advertisements

  2. andsin

    andsin Guest

    in this case i have to "redesign" all my
    system. "redesign" one system component is the better way
    to fullfill my task.
    andsin, Jul 31, 2003
    1. Advertisements

  3. Problem is, you don't have access to changing that particular component.
    Bill McKenzie, Jul 31, 2003
  4. in this case i have to "redesign" all my
    And what are your timing requirements?

    Are they really so strict that you cannot spin up a user-mode realtime thread
    to work with the COM port?
    Are they really so strict that you cannot write a state-machine based (the "IRP
    resubmit from the completion routine" thing) driver, like the serial mouse one,
    to talk to COM port?

    Maxim S. Shatskih, Jul 31, 2003
  5. andsin

    andsin Guest

    i have to answer in 3 byte-time immediatelly after 4 byte-
    time after receiving end. byte-time is the time required
    to tramsnit 1 byte.
    andsin, Aug 1, 2003
  6. i have to answer in 3 byte-time immediatelly after 4 byte-
    You will have major problems with Windows with such a hardware. Very major.
    Maybe even replacing SERIAL with your own driver will not help. The ISR latency
    can possibly be long enough to make the 3 byte time timeout too short,
    especially if you have things like IDE CD-ROM in PIO mode in the machine, which
    do lots of work in the ISR.

    Why designing the hardware this way? If the hardware is related to realtime
    signal processing (like audio/video), then large buffers must be used.
    Otherwise, the hardware is not isochronous, but asynchronous, and asynchronous
    hardware usually waits for response forever, either without having any timeouts
    at all (after all, the timeout can be implemented in the driver with resetting
    the hardware on timeout) or having very large timeouts (seconds).

    Maybe even throwing away the timeout facility from the device can help, I dunno
    the particular design.

    Another way is to use the CPU and the firmware in the device, and process this
    latency-demanding stuff in the firmware, without reporting each such
    transaction to the host and the driver. The driver only does the general
    control over the device.

    For instance, let's look at SCSI controllers. Stupidiest among them - like
    NCRxxx with the driver in DDK samples, I believe it was shipped once with the
    HP ScanJet scanners - report each SCSI bus change (bus
    free/arbitration/selection/reselection etc) as an interrupt to the host, thus
    requiring to implement the SCSI bus state machine in the driver code. The
    hardware is very simple, but the driver is very complex, and the flow of
    interrupts is very large.

    Smarter SCSI controllers like aic78xx use the small CPU in them, and the
    firmware code. The SCSI bus phase changes are reported as interrupts only to
    the chip's internal CPU, not to the host. The host interface is thus working on
    more high level of "IO request execution".

    Maxim S. Shatskih, Aug 1, 2003
  7. andsin

    Pavel A. Guest

    and what is this "end" - a specific character, or timeout (like in Modbus

    - PA
    Pavel A., Aug 2, 2003
  8. andsin

    andsin Guest

    i tested my kmd in 7 days continuously in 4 machines. was
    appeared 2 errors.
    i have no IDE cd-rom in my controller.
    standart computer already sypplied with uart. i think the
    development of special device will unjustified raise the
    price of system.

    yes! i wish process class of requestion by driver without
    reporting to host.
    driver is simple but it not contains wdm specific code. i
    mean init code, power control code etc...
    andsin, Aug 4, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.