EDIT:
Second question. Is it possible to supply STM32 directly with 5V as in the picture or is it better to give 3.3v via VBAT?

It will create voltage divider as signal pin in servo motor is pulled to ground.dannyf wrote: Tue Jun 14, 2022 12:05 am I would put a resistor (10K?) on the data line and find a 5v tolerant pin for that. just in case.