3. What is the best-practice solution for shifting SPI from 3.3V to 5V? The best I could think of would be to use a non-inverting schmitt trigger buffer like the 74HC7014 or the like. Would appreciate any input on this as well.
I'm just a hobbyist and not an EE, but I do quite often interface single board computers running Linux to microcontrollers, using 1.8V, 3.3V, and 5V logic levels. I even use logic level isolators for both USB (1.1 full speed or 12 Mbit/s currently, using ADuM3160; waiting for
ISOUSB211 chips to become available, as they support USB 2.0 high speed, 480 Mbit/s, that my Teensy 4.x are capable of).
I use unidirectional logic level shifters. For a single pin, configurable direction (using a second pin), I like
74LVC1T45 in SOT-23-6. There are multi-channel variants, but when Chipageddon started, I started looking at alternatives, since these are now a bit difficult to find. LCSC does have a few SOT-323-6/SC-70-6 in stock, though.
For UART (RX and TX, one per direction), I'm switching to
TXU0202 (which you can still find in VSSOP at Mouser right now). For SPI, I'm switching to
TXU0304 (which is well in stock at Mouser right now).
Either end of a TXU0202 or TXU0x04 can use Vcc on either side between 1.1V and 5.5V, and between 3.3V and 5V, can do up to 200 Mbit/s, so they're fast, too. The direction of the signals is fixed, and the x determines the directions of the channels:
TXU0102 has two channels in the same direction, TXU0202 one channel in either direction,
TXU0104 has all four channels in the same direction,
TXU0204 has two in each direction, and TXU0304 has three in one direction and one in the other direction and is thus best suited for SPI: CS, SCK, MOSI/PICO/DO, plus MISO/POCI/DI.
For SPI isolation, I'd recommend Si8641B* (in SOIC-16), which can support up to 150 Mbit/s per channel, and Vcc between 2.5V and 5.5V on either side. It is useful when you want to have a SPI- or serial-connected "front end" with its own ground, isolated from your microcontroller. You obviously need an isolated DC-DC supply or similar to provide current to the isolated side. As of right now, Mouser does have a couple of hundred of SI8641BC-B-IS1R in stock, for less than 4€ apiece in a lot of ten.
For I²C (and only for I²C and similar protocols like one-wire), do I use bidirectional/autosensing level shifters, like
TXB0102 (which is commonly used in I²C break-out boards for interfacing 3.3V and 5V – note that side A can be 1.2V to 3.6V, and side B 1.65V to 5.5V, and you do need to use VccA ≤ VccB). Bidirectional/autosensing level shifters may cause issues with unidirectional signals, and you can find threads about that here and elsewhere; I have chosen this policy to avoid those problems, and simply have appropriate level shifting chips always at hand.
In all cases, you should use at least 0.1µF=100nF bypass capacitor from each Vcc to ground as close to the chip as possible (both logic level shifters and Si8641B isolators). Hope this helps, but do remember, me no EE, just another hobbyist!