linux/Documentation/serial/serial-rs485.txt
<<
>>
Prefs
   1                        RS485 SERIAL COMMUNICATIONS
   2
   31. INTRODUCTION
   4
   5   EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the
   6   electrical characteristics of drivers and receivers for use in balanced
   7   digital multipoint systems.
   8   This standard is widely used for communications in industrial automation
   9   because it can be used effectively over long distances and in electrically
  10   noisy environments.
  11
  122. HARDWARE-RELATED CONSIDERATIONS
  13
  14   Some CPUs/UARTs (e.g., Atmel AT91 or 16C950 UART) contain a built-in
  15   half-duplex mode capable of automatically controlling line direction by
  16   toggling RTS or DTR signals. That can be used to control external
  17   half-duplex hardware like an RS485 transceiver or any RS232-connected
  18   half-duplex devices like some modems.
  19
  20   For these microcontrollers, the Linux driver should be made capable of
  21   working in both modes, and proper ioctls (see later) should be made
  22   available at user-level to allow switching from one mode to the other, and
  23   vice versa.
  24
  253. DATA STRUCTURES ALREADY AVAILABLE IN THE KERNEL
  26
  27   The Linux kernel provides the serial_rs485 structure (see [1]) to handle
  28   RS485 communications. This data structure is used to set and configure RS485
  2t#L10" iparamn>
  
    20   Fo3 thes30umentation/serial/serial-rs485.txt#L3" id="L3" class="="line" 3ame="L21">  21   wo3king 31kernel prov modemny eeontro/EIA-al_rs48ions. Tboot tif="485 communile
  22   av3ilabl3 at users inbtio tos). prov ade cainicatf drgy confiion byte is used to set anthe tation/serial/serial-rs485.txt#L3" id="L3" class=""line" naame="L3">   31. INTRe ver3a.
  24
  253. DA3A STR3ex mode Ad
< ade cas in modems.tically conodes, anroperas  26
  27   Th3 Linu37umentation/serial/serial-rs485.txt#L25" id="L25" clas3="line" 3ame="L28">  28   RS385 co3municati - cumCSons. T(typg line L28ociaded  moh numb ca0x542F)ture isd shond confitation/serial/serial-rs485.txt#L25" id="L25" clas3="line" 3ame="L29">  2t#L10" ipa3amn>
3 
    20   Fo4 thes40umentation/serial/serial-rs485.txt#L3" id="L3" class=4="line" 4ame="L21">  21   wo4king 41unicati - cumCGons. T(typg line L28ociaded  moh numb ca0x542E)ture isd shond confitation/serial/serial-rs485.txt#L25" id="L25" clas4="line" 4ame="L22">  22   av4ilabl42
     31. INT4e ver4cumentation/serial/serial-rs485.txt#L14" id="L14" clas4"line" naame="L4">   4
  253. DA4A STR4ex mode the:tation/serial/serial-rs485.txt#L25" id="L25" clas4="line" 4ame="L26">  26
  27   Th4 Linu47
    28   RS485 co48
    2t#L10" ipa4amn>
49
    20   Fo5 thes50
    21   wo5king 5cumentation/serial/serial-rs485.txt#L12" id="L12" clas5="line" 5ame="L22">  22   av5ilabl52
     31. INT5e ver53
     4
   5   EIA-A STR55
    26
  27   Th5 Linu57umentation/serial/serial-rs485.txt#L25" id="L25" clas5="line" 5ame="L28">  28   RS585 co58
    2t#L10" ipa5amn>
59
    20   Fo6 thes60
    21   wo6king 6            RS485 SERIAL COMMMMMMMMMM( to se cture (see [1*) drg,tation/serial/serial-rs485.txt#L5" id="L5" class=6="line" 6ame="L22">  22   av6ilabl62           RS485 SERIAL COMMMMMMMMMMsizeof(see [a hr)))tation/serial/serial-rs485.txt#L5" id="L5" class=6"line" n6ame="L3">   31. INT6e ver63
     4
   5   EIA6A STR65
     6   elecef="D66
    27   Th6 Linu67umentation/serial/serial-rs485.txt#L25" id="L25" clas6="line" 6ame="L28">  28   RS685 co68
    2t#L10" ipa6amn>
69
    20   Fo7 thes70
    21   wo7king 7            RS485 SERIAL COMMMMMMMMMMsizeof(see [a hr)))tation/serial/serial-rs485.txt#L5" id="L5" class=7="line" 7ame="L22">  22   av7ilabl72           RS485 SERIAL COMMMMMMMMMMMMMMMMMM   31. INT7e ver73
     4
   5   EIA7A STR75umentation/serial/serial-rs485.txt#L25" id="L25" clas7"line" n7ame="L6">   6   ele7ef="D76
     7   digi Linu77
    28   RS785 co78
    2t#L10" ipa7amn>
7cumentation/serial/serial-rs485.txt#L20" id="L20" clas8="line" 8ame="L20">  20   Fo8 thes80umentation/serial/serial-rs485.txt#L3" id="L3" class=8="line" 8ame="L21">  21   wo8king 8     4. USAGE FROM USER-LEVentation/serial/serial-rs485.txt#L26" id="L26" clas8="line" 8ame="L22">  22   av8ilabl8cumentation/serial/serial-rs485.txt#L3" id="L3" class=8"line" n8ame="L3">   31. INT8e ver83
     4
   5   EIA8A STR85umentation/serial/serial-rs485.txt#L25" id="L25" clas8"line" n8ame="L6">   6   ele8ef="D86
  

tation/serial/serial-rs485.txt#L25" id="L25" clas8"line" n8ame="L7">   7   dig8 Linu87umentation/serial/serial-rs485.txt#L25" id="L25" clas8"line" naame="L8">   8   This85 co88
    2t#L10" ipa8amn>
89
    20   Fo9 thes90
    21   wo9king 9cumentation/serial/serial-rs485.txt#L12" id="L12" clas9="line" 9ame="L22">  22   av9ilabl92
     31. INT9e ver93
     4
   5   EIA9A STR95
     6   ele9ef="D96
     7   dig9 Linu97umentation/serial/serial-rs485.txt#L25" id="L25" clas9"line" n9ame="L8">   8   Thi985 co98
     9   becaamn>
9cumentation/serial/serial-rs485.txt#L20" id="L20" clas10="line" naame="L10">  10   nois theis 
    11
  122. HAR02theiscumentation/serial/serial-rs485.txt#L3" id="L3" class=10="line" n0ame="L13">  13
  14   Som04theis4           Rsee [a hr.flags |=TION_ons. _s. _ON_SEND;tation/serial/serial-rs485.txt#L5" id="L5" class=10="line" n0ame="L15">  15   hal05theis5
    16   tog06theis6           Rsee [a hr.flags &= ~(ION_ons. _s. _ON_SEND)
tation/serial/serial-rs485.txt#L25" id="L25" clas10="line" n0ame="L17">  17   hal07theis7umentation/serial/serial-rs485.txt#L25" id="L25" clas10="line" n0ame="L18">  18   hal08theis8
    19
  10   noiisy e11 
    11
  122. HARRDWAR11cumentation/serial/serial-rs485.txt#L3" id="L3" class=1s="line" nname="L13">  13
  14   Somme CP114           Rsee [a hr. mlay_rts_l s ie_peio = ...
tation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" nname="L15">  15   hallf-du115umentation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" nname="L16">  16   toggglin116
    17   hallf-du117           Rsee [a hr. mlay_rts_aft c_peio = ...
tation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" nname="L18">  18   hallf-du1lex detation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" nname="L19">  19
  20   Fo1r the120           Rsee [a hr.flags |=TION_ons. _sX_DURING_TX
tation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" 1name="L21">  21   wo1rking12cumentation/serial/serial-rs485.txt#L12" id="L12" class=="line" naame="L12">  122. HARDDWAR122
    23   vi1ce ve123
    24
  253. DA1TA ST125umentation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" 1name="L26">  26
  27   Th1e Lin127umentation/serial/serial-rs485.txt#L25" id="L25" clas1s="line" 1name="L28">  28   RS1485 c128
    2t#L10" ipa1ramn>129
    20   Fo13 the130
    21   wo13king131
    22   av13ilab13cumentation/serial/serial-rs485.txt#L3" id="L3" class=13="line" naame="L13">  13
  24
  253. DA13A ST13ex mod[1] D  include/menta#L25" i.htation/serial/serial-rs485.txt#L25" id="L25" clas13="line" 13ame="L26">  26
  27   Th13 Lin137umen
content"> foot c"> provoriginainLXR soft5 traenrindAation/serhttp://sourc s ige.net/projects/lxc">LXR his dattyumen,4te isexp25"serialDocumocumenAation/sermailto:lxc@menta.no">lxc@menta.noumen. content> subfoot c"> lxc.menta.no ktioly hosded enAation/serhttp://www.redpill-menpro.no">Redpillvidepro ASumen,4al_rs48r conides tcfalslt tosly /bodynt>/html