1

I'm on a Raspberry Pi Zero 2 W.

Let's say I invoke this command.

sudo dtoverlay uart1 txd1_pin=16 rxd1_pin=20 

Does this then mean I can use those two pins via /dev/serial1?

$ raspi-gpio get | grep -i alt=5 GPIO 16: level=0 fsel=2 alt=5 func=CTS1 GPIO 20: level=0 fsel=2 alt=5 func=GPCLK0 

Then if I connect those two pins together to form a simple loopback interface, should I then be able to invoke this, and see my own output?

minicom -b 9600 -o -D /dev/serial1 

From what I can see, this setup does not work and it is likely built on a deep understanding on my part.

1 Answer 1

3

There are 2 UART BUT both use the same pins 14, 15 The pins cannot be assigned arbitrarily and the only options (which are not accessible on the 40 pin header) are shown below:-

dtoverlay -h uart1 Name: uart1 Info: Change the pin usage of uart1 Usage: dtoverlay=uart1,<param>=<val> Params: txd1_pin GPIO pin for TXD1 (14, 32 or 40 - default 14) rxd1_pin GPIO pin for RXD1 (15, 33 or 41 - default 15) 

There are software UART available on pigpio which can use any pins (but I have never used one).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.