Very very interesting; I'll go deeper and keep you informed

Cheers



In data mercoledì 07 aprile 2010 13:31:27, Philippe De Muyter ha scritto:
: > On Tue, Apr 06, 2010 at 10:45:51AM +1200, Gavin Lambert wrote:
> > Quoth Andrew Kohlsmith:
> > > > I would hate to try and do it from software with an interrupt.
> > > > Yuck.
> > >
> > > It's not that bad. :-)  IRQ on transmit holding or shift register
> > > empty (ideally the latter). If you have only a THRE type interrupt
> > >
> > > then you have to set a timer for 1 word time (usually 9 bits) and
> > > after that timer, disable the transmitter. Of course when you go
> > > to send data again you have to make sure you turn on the
> > > transmitter.
> >
> > We've gone that route, for a master device (ie. other hardware will
> > start transmitting back on the half-duplex channel almost
> > immediately after the end of transmission) and had no end of trouble
> > with getting the interrupt processed in time to avoid corrupting the
> > reply.  And this was on a board that wasn't even running an OS, so
> > demands were relatively light.  Sure, it worked fine *most* of the
> > time, but that's not good enough. :)  (Of course, it also had a
> > pretty low-spec CPU, which didn't help.)
> >
> > We eventually switched to a UART that had hardware control of that
> 
> I have just discovered that there are now 'standard' linux ioctls to
> work with rs485 lines : TIOCGRS485 & TIOCSRS485.
> 
> (see
>  http://git.kernel.org/?p=linux/kernel/git/gerg/m68knommu.git;a=commitdiff;
> h=c26c56c0f40e200e61d1390629c806f6adaffbcc)
> 
> Of course, not all hardware drivers implement them.
> 
> And also, I do not know how to use them.
> 
> Philippe
> 

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
_______________________________________________
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

Reply via email to