Skip to main content
added 323 characters in body
Source Link
Dmitry Grigoryev
  • 28.2k
  • 6
  • 54
  • 145

While this might work with some low speed devices, it's a bad idea for two reasons:

  1. While you might be able to reprogram GPIO pins to high impedance state, that would only work until you reboot. For the time from power on to the moment your scripts disable the pins, you have potential for overcurrent conditions between USB and GPIO. This might be solved by putting resistors between the two, which may in turn have significant effects on USB communication.

  2. USB 2.0 uses high-frequency signals (about 0.5 GHz) and requires careful signal routing. GPIO pins aren't designed to run at such frequencies, so PCB traces attached to them don't respect routing constraints. As a result, USB signals will get all sorts of artefacts (spikes, reflections etc.) which will probably prevent USB 2.0 devices from working. The same may be true for wires you solder, if you're not careful.

EDIT: to clarify about USB voltage levels, USB 2.0 Specification, section 7.3.2 "Bus Timing/Electrical Characteristics" says that voltage on data pins driven HIGH must be between 2.8 and 3.6 V, which should be generally compatible with 3.3V voltage levels of GPIO.

While this might work with some low speed devices, it's a bad idea for two reasons:

  1. While you might be able to reprogram GPIO pins to high impedance state, that would only work until you reboot. For the time from power on to the moment your scripts disable the pins, you have potential for overcurrent conditions between USB and GPIO. This might be solved by putting resistors between the two, which may in turn have significant effects on USB communication.

  2. USB 2.0 uses high-frequency signals (about 0.5 GHz) and requires careful signal routing. GPIO pins aren't designed to run at such frequencies, so PCB traces attached to them don't respect routing constraints. As a result, USB signals will get all sorts of artefacts (spikes, reflections etc.) which will probably prevent USB 2.0 devices from working. The same may be true for wires you solder, if you're not careful.

While this might work with some low speed devices, it's a bad idea for two reasons:

  1. While you might be able to reprogram GPIO pins to high impedance state, that would only work until you reboot. For the time from power on to the moment your scripts disable the pins, you have potential for overcurrent conditions between USB and GPIO. This might be solved by putting resistors between the two, which may in turn have significant effects on USB communication.

  2. USB 2.0 uses high-frequency signals (about 0.5 GHz) and requires careful signal routing. GPIO pins aren't designed to run at such frequencies, so PCB traces attached to them don't respect routing constraints. As a result, USB signals will get all sorts of artefacts (spikes, reflections etc.) which will probably prevent USB 2.0 devices from working. The same may be true for wires you solder, if you're not careful.

EDIT: to clarify about USB voltage levels, USB 2.0 Specification, section 7.3.2 "Bus Timing/Electrical Characteristics" says that voltage on data pins driven HIGH must be between 2.8 and 3.6 V, which should be generally compatible with 3.3V voltage levels of GPIO.

Source Link
Dmitry Grigoryev
  • 28.2k
  • 6
  • 54
  • 145

While this might work with some low speed devices, it's a bad idea for two reasons:

  1. While you might be able to reprogram GPIO pins to high impedance state, that would only work until you reboot. For the time from power on to the moment your scripts disable the pins, you have potential for overcurrent conditions between USB and GPIO. This might be solved by putting resistors between the two, which may in turn have significant effects on USB communication.

  2. USB 2.0 uses high-frequency signals (about 0.5 GHz) and requires careful signal routing. GPIO pins aren't designed to run at such frequencies, so PCB traces attached to them don't respect routing constraints. As a result, USB signals will get all sorts of artefacts (spikes, reflections etc.) which will probably prevent USB 2.0 devices from working. The same may be true for wires you solder, if you're not careful.