On Mon, Mar 22, 2010 at 03:06:34PM +0000, g...@novadsp.com wrote: > Here's the problem: I need to program some hardware via 2 pins of the > PIO (1 clock, 1 data). Timing constraints are tight - 10ms clock cycle > time. All this, of course, whilst I maintain very high level services > (CAN bus, TCP/IP). The downstream unit also ACKS by asserting a PIO pin, > configured as an input, high. So this loop has to both read and write. I > need to send 16 bits in the serial stream. > > Is there an established way to do this sort of thing? > > I'd much prefer to avoid exotics like RTAI extensions at this stage. I > did once see a reference to user-mode IO which implied a possible > interrupt driven driver but lost track of it. > > Any pointers welcomed.
Well one evil solution (which I must admit I find disgusting) would be to handle part of the check every timer tick (which often are 100 times per second, and hence match your 10ms time). I am sure better ways could be made using a timer in a driver that runs every jiffy. It is a rather slow rate after all. I would think some of the bitbang I2C drivers could be an example even (they typically aim for 100khz rather than 100hz) and still manage to do a fairly decent job. They don't have to monitor for input after a transaction finished of course, but parhsp your protocol doesn't either if it is always an ACK at the end of a transaction. -- Len Sorensen _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev