1

Raspberry pi 4 has 4 usable uart ports, uart 4 with rx in gpio 9 and tx in gpio 8, share rx pin with SPI0 miso0 pin.

I would like to use both peripherals no ate the same time, but in different moment of time.

In config.txt I enable uart4 with dtoverlay=4, but spi0 stop working. Is there any way to solve this issue. I am thinking in load dtoverlay dynamically, but I am not sure if this is possible.

toyota Supra
  • 560
  • 2
  • 6
  • 9

1 Answers1

0

See Raspberry Pi4 UART.

As you will see there is a conflict. While there are extra functions on the Pi4 there are only the same number of pins, so overlap is inevitable.

You need to consider your needs and pick appropriate options.

NOTE you can enable overlays on the fly e.g sudo dtoverlay uart4.


Changes to the OS mean that enabling some overlays on the fly is not currently working, although formerly it worked.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • and for disable overlays on the fly? This is really helpful. My hardware is adapted to support the overlap pin. But sw does not allow me change between functionalities on the fly. – Jefferson Alexis Jun 17 '22 at 15:06
  • It does not work, the uart4 is not loaded, even the list of loaded dtoverlay is empty. I check with 'sudo dtoverlay -l' – Jefferson Alexis Jun 17 '22 at 22:15
  • @JeffersonAlexis "does not work" is futile because you haven't what "it" is. I use dtoverlay often in testing. – Milliways Jun 17 '22 at 22:38