Kuzma30
Posts: 7
Joined: Thu Sep 08, 2022 5:06 pm

Rpi4 uart3 enable

Tue Sep 20, 2022 5:03 pm

Hello.
I need enable uart3(4,5) and disable uart1 (pin 14,15)
I add such lines to config.txt

# Enable UART
enable_uart=1
dtparam=uart0=off
dtoverlay=uart3,ctsrts //here I trying both with and without "ctsrts"

Code: Select all

raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 func=INPUT pull=UP
GPIO 1: level=1 func=INPUT pull=UP
GPIO 2: level=1 alt=0 func=SDA1 pull=UP
GPIO 3: level=1 alt=0 func=SCL1 pull=UP
GPIO 4: level=0 func=OUTPUT pull=NONE
GPIO 5: level=1 alt=4 func=RXD3 pull=UP
GPIO 6: level=1 alt=4 func=CTS3 pull=UP
GPIO 7: level=1 alt=4 func=RTS3 pull=NONE
GPIO 8: level=0 func=OUTPUT pull=UP
GPIO 9: level=0 func=INPUT pull=DOWN
GPIO 10: level=0 func=INPUT pull=DOWN
GPIO 11: level=0 func=INPUT pull=DOWN
GPIO 12: level=0 func=INPUT pull=DOWN
GPIO 13: level=0 func=INPUT pull=DOWN
GPIO 14: level=1 alt=5 func=TXD1 pull=NONE
GPIO 15: level=1 alt=5 func=RXD1 pull=UP
GPIO 16: level=0 func=INPUT pull=DOWN
GPIO 17: level=0 func=INPUT pull=DOWN
GPIO 18: level=0 alt=0 func=PCM_CLK pull=DOWN
GPIO 19: level=0 alt=0 func=PCM_FS pull=DOWN
GPIO 20: level=0 alt=0 func=PCM_DIN pull=DOWN
GPIO 21: level=0 alt=0 func=PCM_DOUT pull=DOWN
GPIO 22: level=0 func=INPUT pull=DOWN
GPIO 23: level=0 func=INPUT pull=DOWN
GPIO 24: level=0 func=INPUT pull=DOWN
GPIO 25: level=1 func=INPUT pull=DOWN
GPIO 26: level=1 func=INPUT pull=DOWN
GPIO 27: level=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=1 func=INPUT pull=UP
GPIO 31: level=1 func=INPUT pull=NONE
GPIO 32: level=1 func=INPUT pull=DOWN
GPIO 33: level=1 func=INPUT pull=DOWN
GPIO 34: level=0 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=0 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=0 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=0 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 func=OUTPUT pull=UP
GPIO 43: level=1 func=INPUT pull=UP
GPIO 44: level=1 func=INPUT pull=UP
GPIO 45: level=1 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 func=INPUT pull=UP
GPIO 47: level=0 func=INPUT pull=UP
GPIO 48: level=0 func=INPUT pull=DOWN
GPIO 49: level=0 func=INPUT pull=DOWN
GPIO 50: level=0 func=INPUT pull=DOWN
GPIO 51: level=0 func=INPUT pull=DOWN
GPIO 52: level=0 func=INPUT pull=DOWN
GPIO 53: level=0 func=INPUT pull=DOWN
I don't see here TXD3 and see RXD1 TXD1(which I disabled) How to enable TXD3?

User avatar
rpdom
Posts: 20561
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Rpi4 uart3 enable

Tue Sep 20, 2022 5:22 pm

TXD3 and RXD3 are Alt-4 functions of gpio 4 and 5.

You can enabled them in config.txt using the gpio function

Code: Select all

gpio=4,5=a4
or from the command line with raspi-gpio

Code: Select all

rpdom@raspi12:~ $ raspi-gpio get 4,5
GPIO 4: level=1 fsel=0 func=INPUT pull=UP
GPIO 5: level=1 fsel=0 func=INPUT pull=UP
rpdom@raspi12:~ $ raspi-gpio set 4,5 a4
rpdom@raspi12:~ $ raspi-gpio get 4,5
GPIO 4: level=1 fsel=3 alt=4 func=TXD3 pull=UP
GPIO 5: level=1 fsel=3 alt=4 func=RXD3 pull=UP
Unreadable squiggle

aBUGSworstnightmare
Posts: 5649
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi4 uart3 enable

Tue Sep 20, 2022 6:05 pm

Kuzma30 wrote:
Tue Sep 20, 2022 5:03 pm
Hello.
I need enable uart3(4,5) and disable uart1 (pin 14,15)
I add such lines to config.txt

# Enable UART
enable_uart=1
dtparam=uart0=off
dtoverlay=uart3,ctsrts //here I trying both with and without "ctsrts"

Code: Select all

raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 func=INPUT pull=UP
GPIO 1: level=1 func=INPUT pull=UP
GPIO 2: level=1 alt=0 func=SDA1 pull=UP
GPIO 3: level=1 alt=0 func=SCL1 pull=UP
GPIO 4: level=0 func=OUTPUT pull=NONE
GPIO 5: level=1 alt=4 func=RXD3 pull=UP
GPIO 6: level=1 alt=4 func=CTS3 pull=UP
GPIO 7: level=1 alt=4 func=RTS3 pull=NONE
GPIO 8: level=0 func=OUTPUT pull=UP
GPIO 9: level=0 func=INPUT pull=DOWN
GPIO 10: level=0 func=INPUT pull=DOWN
GPIO 11: level=0 func=INPUT pull=DOWN
GPIO 12: level=0 func=INPUT pull=DOWN
GPIO 13: level=0 func=INPUT pull=DOWN
GPIO 14: level=1 alt=5 func=TXD1 pull=NONE
GPIO 15: level=1 alt=5 func=RXD1 pull=UP
GPIO 16: level=0 func=INPUT pull=DOWN
GPIO 17: level=0 func=INPUT pull=DOWN
GPIO 18: level=0 alt=0 func=PCM_CLK pull=DOWN
GPIO 19: level=0 alt=0 func=PCM_FS pull=DOWN
GPIO 20: level=0 alt=0 func=PCM_DIN pull=DOWN
GPIO 21: level=0 alt=0 func=PCM_DOUT pull=DOWN
GPIO 22: level=0 func=INPUT pull=DOWN
GPIO 23: level=0 func=INPUT pull=DOWN
GPIO 24: level=0 func=INPUT pull=DOWN
GPIO 25: level=1 func=INPUT pull=DOWN
GPIO 26: level=1 func=INPUT pull=DOWN
GPIO 27: level=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=1 func=INPUT pull=UP
GPIO 31: level=1 func=INPUT pull=NONE
GPIO 32: level=1 func=INPUT pull=DOWN
GPIO 33: level=1 func=INPUT pull=DOWN
GPIO 34: level=0 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=0 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=0 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=0 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 func=OUTPUT pull=UP
GPIO 43: level=1 func=INPUT pull=UP
GPIO 44: level=1 func=INPUT pull=UP
GPIO 45: level=1 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 func=INPUT pull=UP
GPIO 47: level=0 func=INPUT pull=UP
GPIO 48: level=0 func=INPUT pull=DOWN
GPIO 49: level=0 func=INPUT pull=DOWN
GPIO 50: level=0 func=INPUT pull=DOWN
GPIO 51: level=0 func=INPUT pull=DOWN
GPIO 52: level=0 func=INPUT pull=DOWN
GPIO 53: level=0 func=INPUT pull=DOWN
I don't see here TXD3 and see RXD1 TXD1(which I disabled) How to enable TXD3?
change to

Code: Select all

# Enable UART
#enable_uart=1
#dtparam=uart0=off
dtoverlay=uart3
dtoverlay=uart3 is all you need for enabling it (either w/ or w/o flow control).
I.e. on my CM4 DUT

Code: Select all

dtoverlay=uart4
dtoverlay=uart3
gives me

Code: Select all

pi@64bit-test:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT pull=UP
GPIO 1: level=1 fsel=0 func=INPUT pull=UP
GPIO 2: level=1 fsel=0 func=INPUT pull=UP
GPIO 3: level=1 fsel=0 func=INPUT pull=UP
GPIO 4: level=1 fsel=3 alt=4 func=TXD3 pull=NONE
GPIO 5: level=1 fsel=3 alt=4 func=RXD3 pull=UP
GPIO 6: level=1 fsel=0 func=INPUT pull=UP
GPIO 7: level=1 fsel=0 func=INPUT pull=UP
GPIO 8: level=1 fsel=3 alt=4 func=TXD4 pull=NONE
GPIO 9: level=1 fsel=3 alt=4 func=RXD4 pull=UP
GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 12: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 14: level=1 fsel=0 func=INPUT pull=NONE
GPIO 15: level=1 fsel=0 func=INPUT pull=UP
GPIO 16: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 18: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 19: level=0 fsel=2 alt=5 func=PWM0_1 pull=NONE
GPIO 20: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 21: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 22: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 23: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 24: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 26: level=1 fsel=1 func=OUTPUT pull=DOWN
GPIO 27: level=1 fsel=1 func=OUTPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=0 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=0 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=1 fsel=0 func=INPUT pull=DOWN
GPIO 41: level=1 fsel=0 func=INPUT pull=DOWN
GPIO 42: level=0 fsel=1 func=OUTPUT pull=DOWN
GPIO 43: level=1 fsel=0 func=INPUT pull=DOWN
GPIO 44: level=1 fsel=5 alt=1 func=SDA0 pull=NONE
GPIO 45: level=1 fsel=5 alt=1 func=SCL0 pull=NONE
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK pull=DOWN
GPIO 49: level=0 fsel=4 alt=0 func=SD0_CMD pull=DOWN
GPIO 50: level=0 fsel=4 alt=0 func=SD0_DAT0 pull=DOWN
GPIO 51: level=0 fsel=4 alt=0 func=SD0_DAT1 pull=DOWN
GPIO 52: level=0 fsel=4 alt=0 func=SD0_DAT2 pull=DOWN
GPIO 53: level=0 fsel=4 alt=0 func=SD0_DAT3 pull=DOWN
Fokus on GPIO4/5 and GPIO8/9 (UART4)

Code: Select all

pi@64bit-test:~ $ ls -l /dev
total 0
...
crw-rw----  1 root dialout 204,  65 Sep  2 16:27 ttyAMA1
crw-rw----  1 root dialout 204,  66 Sep  2 16:27 ttyAMA2
...
some other device (overlay) may configure your GPIO4! Post entire config.txt

Kuzma30
Posts: 7
Joined: Thu Sep 08, 2022 5:06 pm

Re: Rpi4 uart3 enable

Wed Sep 21, 2022 3:55 pm

I found what overlay is overwrite GPIO4 pin to OUTPUT.
This is line
dtoverlay=max98357a, sdmode-pin=6
For some reason it don't recognize sdmode-pin setting and use default GPIO4.
It works only when I set it to
dtoverlay=max98357a, no-sdmode

Code: Select all

GPIO 0: level=1 func=INPUT pull=UP
GPIO 1: level=1 func=INPUT pull=UP
GPIO 2: level=1 alt=0 func=SDA1 pull=UP
GPIO 3: level=1 alt=0 func=SCL1 pull=UP
GPIO 4: level=1 alt=4 func=TXD3 pull=NONE
GPIO 5: level=1 alt=4 func=RXD3 pull=UP
GPIO 6: level=1 func=INPUT pull=UP
GPIO 7: level=1 func=OUTPUT pull=UP
GPIO 8: level=1 func=OUTPUT pull=UP
GPIO 9: level=0 alt=0 func=SPI0_MISO pull=DOWN
GPIO 10: level=0 alt=0 func=SPI0_MOSI pull=DOWN
GPIO 11: level=0 alt=0 func=SPI0_SCLK pull=DOWN
GPIO 12: level=0 func=INPUT pull=DOWN
GPIO 13: level=0 func=INPUT pull=DOWN
GPIO 14: level=1 func=INPUT pull=NONE
GPIO 15: level=1 func=INPUT pull=UP
GPIO 16: level=0 func=INPUT pull=DOWN
GPIO 17: level=0 func=INPUT pull=DOWN
GPIO 18: level=0 alt=0 func=PCM_CLK pull=DOWN
GPIO 19: level=0 alt=0 func=PCM_FS pull=DOWN
GPIO 20: level=0 alt=0 func=PCM_DIN pull=DOWN
GPIO 21: level=0 alt=0 func=PCM_DOUT pull=DOWN
GPIO 22: level=0 func=INPUT pull=DOWN
GPIO 23: level=0 func=INPUT pull=DOWN
GPIO 24: level=0 func=INPUT pull=DOWN
GPIO 25: level=1 func=INPUT pull=DOWN
GPIO 26: level=1 func=INPUT pull=DOWN
GPIO 27: level=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=1 alt=3 func=CTS0 pull=UP
GPIO 31: level=1 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 alt=3 func=RXD0 pull=UP
GPIO 34: level=0 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=0 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 func=OUTPUT pull=UP
GPIO 43: level=1 func=INPUT pull=UP
GPIO 44: level=1 func=INPUT pull=UP
GPIO 45: level=1 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 func=INPUT pull=UP
GPIO 47: level=0 func=INPUT pull=UP
GPIO 48: level=0 func=INPUT pull=DOWN
GPIO 49: level=0 func=INPUT pull=DOWN
GPIO 50: level=0 func=INPUT pull=DOWN
GPIO 51: level=0 func=INPUT pull=DOWN
GPIO 52: level=0 func=INPUT pull=DOWN
GPIO 53: level=0 func=INPUT pull=DOWN
I need sdmode-pin non default settings.

aBUGSworstnightmare
Posts: 5649
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi4 uart3 enable

Wed Sep 21, 2022 6:16 pm

Well,that should work. Will have to see how it behaves on one of my DUTs

EDIT: Sorry, don't see this! GPIO6 get's configured to output!
I'm on a 2GB Pi4

Code: Select all

pi@32bit:~ $ uname -a
Linux 32bit 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux
adding below to the default config.txt

Code: Select all

[all]
dtoverlay=max98357a,sdmode-pin=6
dtoverlay=uart4
dtoverlay=uart3
results in

Code: Select all

pi@32bit:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT pull=UP
GPIO 1: level=1 fsel=0 func=INPUT pull=UP
GPIO 2: level=1 fsel=0 func=INPUT pull=UP
GPIO 3: level=1 fsel=0 func=INPUT pull=UP
GPIO 4: level=1 fsel=3 alt=4 func=TXD3 pull=NONE
GPIO 5: level=1 fsel=3 alt=4 func=RXD3 pull=UP
GPIO 6: level=0 fsel=1 func=OUTPUT pull=UP
GPIO 7: level=1 fsel=0 func=INPUT pull=UP
GPIO 8: level=1 fsel=3 alt=4 func=TXD4 pull=NONE
GPIO 9: level=1 fsel=3 alt=4 func=RXD4 pull=UP
GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 12: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 14: level=1 fsel=0 func=INPUT pull=NONE
GPIO 15: level=1 fsel=0 func=INPUT pull=UP
GPIO 16: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 18: level=1 fsel=4 alt=0 func=PCM_CLK pull=DOWN
GPIO 19: level=1 fsel=4 alt=0 func=PCM_FS pull=DOWN
GPIO 20: level=0 fsel=4 alt=0 func=PCM_DIN pull=DOWN
GPIO 21: level=0 fsel=4 alt=0 func=PCM_DOUT pull=DOWN
GPIO 22: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 23: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 24: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 26: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 27: level=0 fsel=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=0 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=0 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=1 fsel=4 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=0 fsel=4 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=0 fsel=1 func=OUTPUT pull=UP
GPIO 43: level=1 fsel=0 func=INPUT pull=UP
GPIO 44: level=1 fsel=0 func=INPUT pull=UP
GPIO 45: level=1 fsel=0 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 49: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 50: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 51: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 52: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 53: level=0 fsel=0 func=INPUT pull=DOWN
adding below (default -> now GPIO4 should be output)

Code: Select all

[all]
dtoverlay=max98357a
dtoverlay=uart4
dtoverlay=uart3
and YES, it is!

Code: Select all

pi@32bit:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT pull=UP
GPIO 1: level=1 fsel=0 func=INPUT pull=UP
GPIO 2: level=1 fsel=0 func=INPUT pull=UP
GPIO 3: level=1 fsel=0 func=INPUT pull=UP
GPIO 4: level=0 fsel=1 func=OUTPUT pull=NONE
GPIO 5: level=1 fsel=3 alt=4 func=RXD3 pull=UP
GPIO 6: level=1 fsel=0 func=INPUT pull=UP
GPIO 7: level=1 fsel=0 func=INPUT pull=UP
GPIO 8: level=1 fsel=3 alt=4 func=TXD4 pull=NONE
GPIO 9: level=1 fsel=3 alt=4 func=RXD4 pull=UP
GPIO 10: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 11: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 12: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 13: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 14: level=1 fsel=0 func=INPUT pull=NONE
GPIO 15: level=1 fsel=0 func=INPUT pull=UP
GPIO 16: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 17: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 18: level=1 fsel=4 alt=0 func=PCM_CLK pull=DOWN
GPIO 19: level=1 fsel=4 alt=0 func=PCM_FS pull=DOWN
GPIO 20: level=0 fsel=4 alt=0 func=PCM_DIN pull=DOWN
GPIO 21: level=0 fsel=4 alt=0 func=PCM_DOUT pull=DOWN
GPIO 22: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 23: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 24: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 25: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 26: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 27: level=0 fsel=0 func=INPUT pull=DOWN
BANK1 (GPIO 28 to 45):
GPIO 28: level=1 fsel=2 alt=5 func=RGMII_MDIO pull=UP
GPIO 29: level=0 fsel=2 alt=5 func=RGMII_MDC pull=DOWN
GPIO 30: level=0 fsel=7 alt=3 func=CTS0 pull=UP
GPIO 31: level=0 fsel=7 alt=3 func=RTS0 pull=NONE
GPIO 32: level=1 fsel=7 alt=3 func=TXD0 pull=NONE
GPIO 33: level=1 fsel=7 alt=3 func=RXD0 pull=UP
GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK pull=NONE
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD pull=UP
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0 pull=UP
GPIO 37: level=1 fsel=7 alt=3 func=SD1_DAT1 pull=UP
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2 pull=UP
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3 pull=UP
GPIO 40: level=0 fsel=4 alt=0 func=PWM1_0 pull=NONE
GPIO 41: level=1 fsel=4 alt=0 func=PWM1_1 pull=NONE
GPIO 42: level=1 fsel=1 func=OUTPUT pull=UP
GPIO 43: level=1 fsel=0 func=INPUT pull=UP
GPIO 44: level=1 fsel=0 func=INPUT pull=UP
GPIO 45: level=1 fsel=0 func=INPUT pull=UP
BANK2 (GPIO 46 to 53):
GPIO 46: level=0 fsel=0 func=INPUT pull=UP
GPIO 47: level=0 fsel=0 func=INPUT pull=UP
GPIO 48: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 49: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 50: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 51: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 52: level=0 fsel=0 func=INPUT pull=DOWN
GPIO 53: level=0 fsel=0 func=INPUT pull=DOWN
Which OS are you on?

Kuzma30
Posts: 7
Joined: Thu Sep 08, 2022 5:06 pm

Re: Rpi4 uart3 enable

Thu Sep 22, 2022 2:45 pm

I use Yocto based boot2Qt OS
uname -a
Linux b2qt-raspberrypi4-64 5.15.34-v8 #1 SMP PREEMPT Tue Apr 19 19:21:26 UTC 2022 aarch64 GNU/Linux

aBUGSworstnightmare
Posts: 5649
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi4 uart3 enable

Thu Sep 22, 2022 3:28 pm

Kuzma30 wrote:
Thu Sep 22, 2022 2:45 pm
I use Yocto based boot2Qt OS
uname -a
Linux b2qt-raspberrypi4-64 5.15.34-v8 #1 SMP PREEMPT Tue Apr 19 19:21:26 UTC 2022 aarch64 GNU/Linux
Well, then it's related to your OS. Get in touch with the devs (as I can't/will not support here).

Kuzma30
Posts: 7
Joined: Thu Sep 08, 2022 5:06 pm

Re: Rpi4 uart3 enable

Thu Sep 22, 2022 4:18 pm

Thanks for your help.
When you use
[all]
dtoverlay=max98357a,sdmode-pin=6
dtoverlay=uart4
dtoverlay=uart3

it show uart0, uart3, uart4 (in your raspi-gpio log). How to disable uart0?

aBUGSworstnightmare
Posts: 5649
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rpi4 uart3 enable

Thu Sep 22, 2022 4:23 pm

Kuzma30 wrote:
Thu Sep 22, 2022 4:18 pm
Thanks for your help.
When you use
[all]
dtoverlay=max98357a,sdmode-pin=6
dtoverlay=uart4
dtoverlay=uart3

it show uart0, uart3, uart4 (in your raspi-gpio log). How to disable uart0?
is I don't want to disable my Bluetooth I'm fine with that ;)
look into the docu how to disable BT (if yoi don't need it). Keep in mind this is a Pi4 used for my testing!

Why do you need to disable UART0?

Kuzma30
Posts: 7
Joined: Thu Sep 08, 2022 5:06 pm

Re: Rpi4 uart3 enable

Thu Sep 22, 2022 4:37 pm

Because in future this software will be used on CM4 module. I am testing software on Rpi4 then trace PCB for CM4.

Update
adding disable-bt helps

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