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.

-A.
_______________________________________________
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