Given is a STM32 G431 CBUx MCU and a TJA1051/3 CAN transciever.
As I also need USB on this MCU, the only way to connect the CAN transceiver are pins PB8 (FDCAN1_Rx) and PB9 (FDCAN1_Tx). The problem with that is: PB8 is also the Boot0 Pin. At power up the transceiver is in sleep mode, pulling the pin to HIGH.
I could solve this through the option bits. But I'd prefer a hardware solution. I use PB7 as control pin for the "S" (sleep, active low) input pin of the CAN transceiver, which is hardwired (via a 10k resistor) to Vcc and pulled down by a 2N7002 (Gate <---> PB7), I could also use this pin to make sure the Boot0 Pin is pulled to GND during power-up.
If I only take the functionality into consideration, a mini SPDT relay would do the job. Or I could use an AND-gate. The benefit of the relay would be: I could connect the NC pin to a push-button or a jumper and use the Boot0 Pin of the MCU in standard configuration without chaining the option bytes. But I do not recall considering that as a "sophisticated solution", rather I'd see that as inappropriate...
What I'd need would be some kind of IC that is able to switch the signal path according to an input pin. Could an analog channel multiplexer be a solution? What about the signal delay in such circuits? Has someone an idea and can point me in the right direction?