On Thu, Apr 01, 2010 at 01:43:51PM -0400, Andrew Kohlsmith (mailing lists 
account) wrote:
> On Thursday 01 April 2010 01:36:52 pm Fabio Giovagnini wrote:
> > I' have connected my SCIF1 port (of sh2a 7203) to  a MAX485, and the
> > TXEn/!RxEn to an I/O port.
> > I had the idea to write a driver for proc FS to manage the TxEn/!RxEn line
> >  and using the ttySCx driver to send and receive data at 38400.
> > But I need to wait the end of the last byte trasmission before to set low
> >  the TxEn/!RxEn line.
> > Now I'm doing it with a dilay time; but I was looking for a more elegent
> > solution
> 
> There are a couple of solutions that are more elegant.
> 
> First is to have a "transmitter shift register empty" interrupt deassert the 
> line, but that's not the most elegant, if you hardware has support to 
> automatically control the RS485 transmitter enable pin.
> 
> Some UARTs have the ability to do this (ColdFire does for sure, I've never 
> used SH2A) but check your UART documentation for the ability to automatically 
> control a transmit enable pin.

Yeah I have only ever done it using a UART that can automatically control
the direction based on the transmit FIFO containing data or not (with
a programable delay before switching of the transmitter of course).

I would hate to try and do it from software with an interrupt.  Yuck.

-- 
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

Reply via email to