Author Topic: when on rs232 two cts collide: will it kill the device?  (Read 1472 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
when on rs232 two cts collide: will it kill the device?
« on: July 11, 2019, 09:30:23 am »
so, one week ago I got a phone call by a customer claiming that some of his equipment was not working and they sent me the whole inside a parcel. They assembled the cables by their self, and the software doesn't use any handshake, but rather a NULL-modem setup, which weirdly manifested a randomly bad behavior, so they phoned me thinking the problem was in the electronics.

After some inspection, I found out that pin 7 and pin 8 on their RS232 serial cable are swapped.



Pin7 is RTS, input
Pin8 is CTS, output

This means that the host (a laptop? a computer? whatever they used) had its CTS signal wired to the CTS signal of the equipment, two outputs signals wired together in a collision.


host CTS --------------?-------------- CTS equipment


I haven't visited this customer yet, and I wonder if this kind of mistake in cables wiring can cause permanent damage.

What do you think?  :-//
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: when on rs232 two cts collide: will it kill the device?
« Reply #1 on: July 11, 2019, 09:35:45 am »
CTS0 = host CTS
CTS1 = equipment CTS

Code: [Select]
CTS0  CTS1   current
   0     0   no current flows
   0     1   current does flow -> any damage?
   1     0   current does flow -> any damage?
   1     1   no current flows
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4223
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: when on rs232 two cts collide: will it kill the device?
« Reply #2 on: July 11, 2019, 09:43:39 am »
I've never seen a serial interface physically damaged this way. Getting inputs and outputs swapped is incredibly common.

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1559
  • Country: gb
Re: when on rs232 two cts collide: will it kill the device?
« Reply #3 on: July 11, 2019, 10:15:03 am »
IIRC, it is a design goal and a requirement of the RS-232 standard that any pin can be connected to any other pin without causing damage, if the transmitters & receivers are in specification.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: when on rs232 two cts collide: will it kill the device?
« Reply #4 on: July 11, 2019, 10:24:30 am »
ok, that's reassuring, thanks guys  :D

Just a note. The equipment doesn't use any handshake, the software is NULL-modem (it only uses TX and RX), but the customer reported a randomly reset of their equipment only for cables with pin 7 and pin 8 swapped. What I wonder is: what did cause the random reset? In theory, since the software doesn't use the CTS,  those reset should haven't happened  :-//

(probably there is more to investigate)
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 279
  • Country: nl
Re: when on rs232 two cts collide: will it kill the device?
« Reply #5 on: July 11, 2019, 10:33:20 am »
Even when the pins aren't used in software, they do have some state. Is the equipment also made by yours, so you can be sure it doesn't care etiher? Also, some boards (such Arduino) (ab)use the RTS pin to RESET the device, might this reset mechanism be implemented in your equipment?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14167
  • Country: de
Re: when on rs232 two cts collide: will it kill the device?
« Reply #6 on: July 11, 2019, 10:41:38 am »
With some not so good designed drivers the CTS-CTS connection may draw more current than expected and this way result in a temporary malfunction (e.g. charge pump does no longer deliver enough voltage).  Still it should normally not cause a crash - this is more like a windows thing.

Even if not used the false handshake signal could stop the transmission on the PC side.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: when on rs232 two cts collide: will it kill the device?
« Reply #7 on: July 11, 2019, 11:12:24 am »
Is the equipment also made by yours, so you can be sure it doesn't care etiher?

No the equipment is not made by me, I am the software guy in this case, working on a thirdy party hardware.

Also, some boards (such Arduino) (ab)use the RTS pin to RESET the device, might this reset mechanism be implemented in your equipment?

Yup, even the MIT "Handyboard" and its clone "Fingerboard" (m68hc11 boards made in the 90s) used a similar mechanism to reset the board on firmware upload, but it was possible to exclude it by a jumper.



It just costs 0.10 Euro, and it doesn't take too much space on the PCB, but Arduino does not have any jumper.

Anyway, according to the documentation, my customer's equipment doesn't have a reset-mechanism wired to RTS.
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: when on rs232 two cts collide: will it kill the device?
« Reply #8 on: July 11, 2019, 11:16:33 am »
Just to muddy the water a little bit  :)  Note that the function of CTS can be either an input or an output depending on whether the equipment is a DTE (e.g. a PC) or DCE (modem)

DTE - input
DCE - Output
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9007
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: when on rs232 two cts collide: will it kill the device?
« Reply #9 on: July 11, 2019, 12:45:11 pm »
I recall that RS232 drivers are supposed to be protected against short circuits. That's not to say a 7c Shenzhen market special is guaranteed to survive, of course.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf