ESP32(STM32)+AMT-103V+STEP/DIR - possible voltage logic level issues

I have some Esp32 boards and also STM32(GD32) blue pill, an encoder AMT103V and a BLDC gimbal motor.
I want to build a closed loop setup driven by a step/dir signals from a 3Dprinter.
My issues are.

  • AMT-103 output 5v logic signals(min voltage is 3.6V according with data sheet) and is powered from a 5V source from 3Dprinter.
  • step/dir signals are also 5V logic signals coming from an Atmega2560.

Esp32 and Stm32 accepts on its pins 3.3V logic signals.
On both MCU there are pins 5V tolerant pins which in theory can be used in hobby amateurish testing setups but not a good reliable solution to connect directly 5V logic signal to 3.3V inputs, imho.
I tested one time on an ESp32 directly a 5Vlogic (UART serial) signal and the signal is not so reliable decoded. Maybe other issues but was working fine with 3.3V signals. I’m not saying was not working at all after a while start spitting garbage bits.

I checked the diagrams on simplefoc site and forum but I see only direct connections and nothing about this potential issue.
My question is how do you reconcile this issue…do you connect directly on the ESP32(STM32)pins and cross fingers or use a logic level shifter(5Vto3,3V)?