Realtime Processing Issues

It is difficult to provide hard realtime processing information for Windows CE because of the variety of platforms it runs on. On Microsoft's Windows CE reference platform, interrupt driven device drivers can generally be called within 90 to 170 microseconds after the interrupt occurs, yielding about 5.8 to 11 KHz sampling rates. The variability is due to unpredictable factors such as cache state, and whether or not the device driver's process happens to be the one currently executing. On other platforms, factors such as CPU speed, bus speed, and the speed of the manufacturer's interrupt vectoring routines will be the determine the lower limits of interrupt latency. Because device drivers' interrupt service threads can be pre-empted by higher priority threads, there really is no upper limit. In general, however, the latency for servicing interrupts in Windows CE is less than that for Windows 95 or Windows NT; your device drivers are unlikely to lose data unless they are starved for processor time by other high priority threads running on the system.

Peripherals which connect to Windows CE through a serial port can do so at the maximum speed of the serial port. Most Windows CE serial ports are buffered internally by 16550-class UARTs capable of 115Kbps; consult the manufacturer of your target Windows CE platform for specific information. PC Card socket speeds vary as well; again the authoritative source of information is always the platform manufacturer.

A good strategy for reducing the time it takes your installable device driver to handle incoming data is to defer complicated processing until later. If the device driver restricts itself to collecting the data in memory, it can leave processing of that data for later, to be handled by a lower-priority thread or by a user-level application.