PINE64
Repurpose debug UART as GPIO - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Repurpose debug UART as GPIO (/showthread.php?tid=18124)



Repurpose debug UART as GPIO - wishindo - 04-11-2023

Is it possible to reuse the SoC debug UART as two independent GPIO pins that can be controlled from Linux? If so, how?


RE: Repurpose debug UART as GPIO - KC9UDX - 04-11-2023

Without revisiting the schematics, I'll say "no" until someone confirms it.

But converting RS232 to as much GPIO as you care to multiplex is do-able, even with off-the-shelf controllers. However I'm not aware of any that are cheap (think obscure industrial automation) nor any that would work at the PBPs baud rate. But if you're savvy you could make your own controller with a BASIC Stamp, Arduino, or even RockPro64.

What's even easier and much cheaper, is USB GPIO. You can even hide this inside the case (I've already thought about doing this).


RE: Repurpose debug UART as GPIO - wishindo - 04-12-2023

(04-11-2023, 06:26 PM)KC9UDX Wrote: Without revisiting the schematics, I'll say "no" until someone confirms it.

But converting RS232 to as much GPIO as you care to multiplex is do-able, even with off-the-shelf controllers.  However I'm not aware of any that are cheap (think obscure industrial automation) nor any that would work at the PBPs baud rate.  But if you're savvy you could make your own controller with a BASIC Stamp, Arduino, or even RockPro64.

What's even easier and much cheaper, is USB GPIO.  You can even hide this inside the case (I've already thought about doing this).

I was planning on rolling my own solution for UART <--> GPIO conversion with an AVR if I needed to. But USB GPIO might be easier - Are there any USB pads outside the shielding (I'm 100% not removing it if not necessary)?

Additionally, is it straightforward to disable the debug console on the serial port? So that it doesn't interfere with the GPIO conversion. Is it simply the same steps as it might be on a Raspberry Pi board?


RE: Repurpose debug UART as GPIO - KC9UDX - 04-13-2023

I think there are. I had planned on using USB internally. But I could be wrong. It should be easy to tell by looking at the schematic and board layout.

Disabling the console would have to be done in your kernel (and U-Boot). It won't be the same as a Pi.