1

I rather stupidly connected 5 V logic directly (without using a level shifter) to Rx, GPIO 15 (pin 10), of my RPi 2B and now it appears to have stopped functioning.

GPIO for RPi 2B

Could I configure another pin as Rx? Be that via a config file, or setting, or kernel recompile?

Greenonline
  • 2,740
  • 4
  • 23
  • 36

2 Answers2

2

There are alternative usable pins on the compute module. There are no alternative hardware pins on the other Pis.

I have bit banged serial using my pigpio library. Anything under 19k2 baud appears rock solid. Anything faster and you would need error checking.

Bit banging the input side is trivial.

sudo pigpiod # start the pigpio daemon

pigs slro 23 19200 8 # open GPIO 23 for 8-bit bytes at 19k2 baud

pigs slr 23 200 # read up to 200 bytes from GPIO 23

The output side is a bit more complicated and uses pigpio waves.

joan
  • 71,024
  • 5
  • 73
  • 106
1

Question

connected 5 V logic directly to Rx now it appears to have stopped functioning.

Could I configure another pin as Rx? Be that via a config file, or setting, or kernel recompile?

Answer

You can use USB UART/TTL cables. Then you can have as many UARTs as you have USB/TTL cables.

I have read others experimenting with software serial. But so far all I have read concludes that the reliability is poor, at best 10% error rate at 9600 8N1.

References

How many [USB] serial ports are on Pi3? - answered Apr 19 by tlfong01

/ to continue, ...

tlfong01
  • 4,665
  • 3
  • 10
  • 24
  • You deleted something about the "overlay... Stretch...", which seemed quite interesting, but I didn't get time to read it properly – Greenonline May 08 '19 at 08:46
  • @Greenonline - Never mind. All I have read so far says software Rpi UART is not reliable, at 10% error rate even at 96008N1. So I hesitated to suggest others to try, especially newbies who happen to read my answer. BTW, this reminds me of the good old days with Arduino's software UARTs. – tlfong01 May 08 '19 at 08:54