How disable attachment of sio(4) driver to device?

Bernd Walter ticso at cicely12.cicely.de
Sat Oct 22 05:18:34 PDT 2005


On Sat, Oct 22, 2005 at 04:00:59PM +0930, Daniel O'Connor wrote:
> On Sat, 22 Oct 2005 06:09, Bernd Walter wrote:
> > I personally build specialized USB and Ethernet devices for doing
> > Modbus/RTU RS485 timing.
> 
> We use 9 bit data RS485 (the ninth bit is used as an address mark so 
> microcontrollers can sleep until it turns up then check if it's addressed to 
> it and go back to sleep).

That's the big win with 9 bit.
Modbus uses 8 bit so each controller has to actively listen.
The RTU variant uses fixed idle times to mark packet ends, which is
hard to do right in kernel and unreliable to do from userland.
Since I needed multi-OS support and have at least one customer with
many busses the kernel was no option.

> I have been told it could be implemented as a line discipline but I am not so 
> sure (since to do 9 bit transmition you need to change between mark & space 
> parity on a byte by byte basis)

Don't know about line discipline abilities, but I remember that some
trustfull persons declared this to be doable.
It is the whole hardware design that won't fit.
As long as timing is not critical and you have legacy serials it is OK.
But many USB uarts don't have native 9 bit support as well, and the
nature of USB is that you really want large FiFos.
This is a dead track IMHO.

> We (well msmith originally) implemented it as a cut down hacked up copy of sio 
> - this IS suboptimial so I think I'll have a look at implementing it via 
> uart.

The whole thing is suboptiomal.
Today there are no reasons to not offload the tricky parts into
external devices.

I'd originaly used Atmel Mega8 plus Philips PDIUSBD11 for this.
It was a slow but reliable and cheap combination, but Piliphs stopped
production of the chip.
Today I use Mega64 and PDIUSBD12 for USB and Mega128 with RTL8019AS for
Ethernet, which gives me two UART for use in a single device.
The controller have 9 bit wide FiFos.
If you are already in the 8051 world, you might look at TI TUSB3410.

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd at bwct.de                                  info at bwct.de



More information about the freebsd-hackers mailing list