Re: Help with writing device driver for RS-485 transceiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007/3/23, Erik Mouw <mouw@xxxxxxxxxxxx>:
I fail to see how the 3085 can be used to generate an IRQ. It has only
6 pins, two are for GND and VCC, 2 for the UART side, 2 for the line
side, and 2 control inputs. The chip is a *tranceiver*, it only
translates between two different electrical domains. You're supposed to

Thanks for your kind reply, Erik. And you're right, I think I
misunderstood the schematic.

hook it up to an UART and it will translate UART electrical signals
into RS485 line signals and vice versa (might require some extra
components, though, check the data sheet).

Yes, the two MAX3085Es were connected to UARTs in the schematic as follows:
    ________
   |         DI  |--------------------- TXD1
   | A     DE |---------|
   |              |        |
   | B    nRE |--------|------------- GPF6 (EINT6)
   |        RO |---------------------- RXD1
   |________|

    ________
   |         DI  |--------------------- TXD2
   | A     DE |---------|
   |              |        |
   | B    nRE |--------|------------- GPF7 (EINT7)
   |        RO |---------------------- RXD2
   |________|

In the schematic, the multi-functional pin GPF6 of S3C2410's GPIO was
only marked by the label 'EINT6' (GPF7 by 'EINT7'), which made me
thought that MAX3085E could generate external interrupts (as you said,
it can NOT).

Actually, these two pins are configured in 'output' mode (NOT 'EINT'
mode), which can be used to control MAX3085E's DE (Driver output
Enable) pin and nRE (Receiver output Enable) pin by writing '0' or '1'
to corresponding bits of S3C2410's GPFDAT register.

Like I said, there is no way the 3085 can generate an interrupt, so
this approach is useless. You somehow have to hook up the 3085 to the
UART (this might need some extra circuits) and treat the whole thing
as a normal serial port.

Actually, I plan to use MODBUS-RTU over serial line protocol [1] to
pack the data into a frame before transmit and unpack the frame after
receiving it, can I still treat 'the whole thing' as a normal serial
port?

And one more question: the development board that I'm using was
shipped with a working ARM Linux (2.4.18-rmk7), but I don't know how
to enable UART1 and UART2 from the kernel source code (these is only a
'/dev/ttyS0' device node under /dev which stands for UART0).

Thank you very much.

--
Best regards,

WANG Zhen
----
Only the paranoid survive.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux