Rpi zero 2w in Prusa 3D printer; aka: data received via UART (over GPIO) disturbs the boot process

I was able to get past u-boot without needing to change extlinux.conf. Just requiring a keyed autoboot was enough to make things working for me. (I still wanted the ability to go back a generation, if I take the RPi out of the printer for debugging). Here are the config variables I used:

    (self: super: {
      ubootRaspberryPi3_64bit = super.ubootRaspberryPi3_64bit.overrideAttrs (oldAttrs: {
        extraConfig = ''
          CONFIG_AUTOBOOT=y
          CONFIG_AUTOBOOT_KEYED=y
          CONFIG_AUTOBOOT_STOP_STR="\x0b"
          CONFIG_AUTOBOOT_KEYED_CTRLC=y
          CONFIG_AUTOBOOT_PROMPT="autoboot in 1 second (hold 'CTRL^C' to abort)\n"
          CONFIG_BOOT_RETRY_TIME=15
          CONFIG_RESET_TO_RETRY=y
        '';
      });
    })

Still, I couldn’t get uart to function after loading the kernel. The device would show up, but it would neither send nor receive any data.

Interestingly, because I had hooked up a uart<->usb dongle to test things, I noticed that the input and output u-boot would send & receive would turn out to be garbled. I didn’t verify this, but I assume that data wasn’t being sent or received at the configured 115200 baud rate. I haven’t spent the effort to find out what was the actual baud rate, but I confirmed it wasn’t any other “standard” one.

I have not experienced any issues with using the official RPiOS 2022-09-22 (kernel 5.15.61).

A couple of minor notes:

  • removing enable_uart=1 in config.txt does not seem to have any effect in u-boot not using the uart interface
  • I have tried various approaches in trying to get u-boot to completely ignore the serial device. I couldn’t find success in changing the device trees, applying patches to the rpi env config, tweaking the CONFIG variables to ignore serial support (it either doesn’t work when running, or ends up with a myriad of compilation errors).
1 Like