A low speed 115200 baud link does the job, with applicative CRC on both side to be sure there is no corruption.
My method to test communication robustness: I inject pulses through a capacitor directly on the UART lines. I did it on this project, no problem. The four bytes CRC32 prevents random EM noise errors.
STM32 telemetry code is here:
https://github.com/makers-for-life/makair-firmware/blob/mast...
Pierre, author of the article.
Sounds like a fun project!
I've seen 18 months before, but that was primarily software. I think the FDA clock on evaluation is 120 days now, that's after all the i's are dotted and t's crossed. EU MDD/MDR is similar, iirc.
Congrats on getting something together quickly!
Also there are CAN hats for rPi (SPI) or USB<->CAN bridges (using slcan protocol and Linux driver).
I can see the convenience of using UART but as a very cautionary advice, hospital environments are electrically quite harsh in terms of EM noise. A serial line even a short one can absolutely suffer from interference.
You already made it relatively fail-safe with the heartbeat/watchdog but please consider upgrading your design to use comms with a differential signal, anything like CAN or even RS-485 in that Rpi/STM32 link would be a significant improvement.