funnel
Posts: 48
Joined: Sat May 05, 2012 8:00 am

I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 1:11 pm

Somehow a current spike damaged the 14 and 15 pin on my Rpi Zero 1.3. Like the title says is there an easy way to remap the serial port to other free pins?
I did some googling and theoretically it's possible to enable UART1 on pins 32,33 and 40,41 but the pins are only available on the compute module Rpi.

Thanks.

User avatar
thagrol
Posts: 2696
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 2:54 pm

funnel wrote:
Sun Apr 28, 2019 1:11 pm
Somehow a current spike damaged the 14 and 15 pin on my Rpi Zero 1.3. Like the title says is there an easy way to remap the serial port to other free pins?
I did some googling and theoretically it's possible to enable UART1 on pins 32,33 and 40,41 but the pins are only available on the compute module Rpi.
AFAIK that's correct.

Given you have a zero not a zeroW and depending on what exactly you have damaged you might get away with using the other UART on pins 14 and 15. See https://github.com/raspberrypi/firmware ... t/overlays

Failing that, it might be simplest to buy another zero though you could try USB, I2C or SPI to serial depending on which exist, have linux drivers, and you can get hold of.

Obviously, if switching to a different UART, you'll need to ammend your code.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

funnel
Posts: 48
Joined: Sat May 05, 2012 8:00 am

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 3:34 pm

I already ordered a new Pi Zero. I tried putting the UART1 on 14,15 and it doesn't work either. The ttyUSB also works but I need the usb port and Zero has only 1 usb port. Adding a usb hub and a usb ttl adapter would take too much space for what I need and a Zero for $5 is cheaper than buying a hub.

Thanks.

User avatar
HermannSW
Posts: 2332
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 5:02 pm

funnel wrote:
Sun Apr 28, 2019 3:34 pm
Adding a usb hub and a usb ttl adapter would take too much space for what I need and a Zero for $5 is cheaper than buying a hub.
You can get a 2nd USB cheaper and with less space than with a USB hub when using the Zero test pads and DIP2USB adapter for few cents:
Image
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

User avatar
thagrol
Posts: 2696
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 5:19 pm

HermannSW wrote:
Sun Apr 28, 2019 5:02 pm
funnel wrote:
Sun Apr 28, 2019 3:34 pm
Adding a usb hub and a usb ttl adapter would take too much space for what I need and a Zero for $5 is cheaper than buying a hub.
You can get a 2nd USB cheaper and with less space than with a USB hub when using the Zero test pads and DIP2USB adapter for few cents:
No, you can't. You might be able to wire up a second physical connector via the test pads but that won't let you connect two USB devices. There is only one USB port on the SoC.

What you suggest will share the D+ and D- lines from the single USB port on the SoC between the two connectors. That's gonna violate the USB spec and with a device connected to both physical ports neither can be expected to function.

Edit: Stop and think for a moment. If that were possible, why would USB hubs A. exist and B. be actual USB devices rather than just a set of connectors wired in parallel?
Last edited by thagrol on Sun Apr 28, 2019 5:23 pm, edited 1 time in total.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

User avatar
HermannSW
Posts: 2332
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Sun Apr 28, 2019 5:21 pm

Thanks for correcting me.
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

User avatar
Burngate
Posts: 6258
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: I damaged the TX/RX pins. Is there a way to remap the serial port to another free GPIO port?

Mon Apr 29, 2019 9:51 am

funnel wrote:
Sun Apr 28, 2019 1:11 pm
Somehow a current spike damaged the 14 and 15 pin on my Rpi Zero 1.3.
Note that over time any damage can propagate throughout the SoC, causing it to fail, so any "fix" is likely to be only temporary.

Return to “Interfacing (DSI, CSI, I2C, etc.)”