Hi Luc,

On Mon, 13 Sep 1999, Luc Hermans wrote:

> In my embedded linux application I've written a modbus interface (RS485)
> 
> on /dev/ttyS1 (cfmakeraw) the RTS is used to enable/disable the RS485
> driver.
> 
> I use the  ioctl(fd[c], TIOCMSET, &status)  fucntion.to change RTS'
> 
> Before sending I enable RTS, send all data, (the RS485 echo's all)
> wait until all data is received,  and then disable RTS.
> 
> The problem is that the RTS is sometimes dropped to slow, up to 5ms,
> witch is to long (because I get an answer from the polled device withing
> 3ms)
> but sometimes also fas, lesser then 500us.
> 
> What is the cause of this ?
> I work with an i386 40MHz cpu at 9600 baud

This is because of task-switching within the kernel.  You may circumvent
this by putting your protocol inside a device driver, as I have done with
my "driver for KeenView".  This is similar to yours, a RS-485 network with
multipoint microterminals.  Please look at my home page for the driver.
If you need some assistance, I will be happy to give it.

best regards,
Rildo
 _____   _ __    __       __      __      ___      __  Rildo Pragana
/\ '__`\/\`'__\/'__`\   /'_ `\  /'__`\  /' _ `\  /'__`\ P.O. Box 721
\ \ \L\ \ \ \//\ \L\.\_/\ \L\ \/\ \L\.\_/\ \/\ \/\ \L\.\_ Camaragibe
 \ \ ,__/\ \_\\ \__/.\_\ \____ \ \__/.\_\ \_\ \_\ \__/.\_\ PE Brazil
  \ \ \/  \/_/ \/__/\/_/\/___L\ \/__/\/_/\/_/\/_/\/__/\/_/ 54792-990
   \ \_\ [EMAIL PROTECTED] /\____/ FPGA/uControllers * Linux * tcl/tk
    \/_/ +55-81-459-1776  \_/__/  http://members.xoom.com/rpragana/



--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to