Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

GPIO BCM14/15 do not have GP capability even when UART disabled #32

Open
rmc47 opened this issue Dec 5, 2020 · 1 comment
Open

GPIO BCM14/15 do not have GP capability even when UART disabled #32

rmc47 opened this issue Dec 5, 2020 · 1 comment

Comments

@rmc47
Copy link

rmc47 commented Dec 5, 2020

Describe the bug
GPIO BCM 14 and 15 only have the UARTTXD / UARTRXD capabilities, even when the UART is disabled with enable_uart=0 in config.txt. This prevents use as regular GPIO pins.

To Reproduce

  1. Disable the UART on pins BCM14/15 in config.txt with enable_uart=0.
  2. Attempt to set Pin Mode to Input or Output using Pi.GPIO[14].PinMode = GpioPinDriveMode.Input
  3. Receive System.NotSupportedException: Pin 14 'BCM 14 (TXD)' does not support mode 'Input'. Pin capabilities are limited to: UARTTXD
  4. Using the gpio(1) command-line tool on the Pi, run gpio -g mode 14 in to set the pin mode to input
  5. Verify signals can be read using gpio readall

Expected behavior
When the UART is not using pins BCM14/15, it should be possible to use these as general purpose I/O pins.

I'm very happy to submit a PR to just add the GP capability to those pins, but I wasn't sure if you wanted to do some runtime detection of whether the UART is enabled before allowing it (i.e. only report that capability if the UART is not enabled), or whether it's acceptable to always report the capability, because the underlying hardware possesses it.

Environment:

  • OS: Raspbian GNU/Linux 10 (buster)
  • .NET 5.0
  • Unosquare.WiringPi 0.5.1
  • Unosquare.Raspberry.IO 0.27.1
  • Raspberry Pi 3
@geoperez
Copy link
Member

We are looking for maintainers, you can apply at https://adoptoposs.org/p/67b02bee-a00e-446a-a321-c1a6449014bc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants