I have two Nano 33's communicating with each other over SERCOM0. If one of them is powered down, the other receives junk. I would think that could be prevented by having a pullup on the input pin (that would be pin 5).
So I need to use an external pullup, or can I enable an internal pullup on a pin that is enabled for serial I/O?
It is a bad idea to connect two devices by I/O pins, when one of them is powered down.
An output pin on the powered device that is set high, while connected to the unpowered device will be overloaded, and may even "phantom" power the other device via the input protection diodes, causing it to malfunction.
Optoisolators are a good solution. I should have mentioned the possibility.
Some people use a less safe approach for a UART connection: a 4.7K or 10K resistor between the input and output pins will limit the current into the unpowered device. May not work with high baud rates.