The PCB layout is critical for good and reliable operations, especially for high driver currents. A 4-layer PCB is a must and uses thick, straight and short traces for MOSFET and sense resistor interconnections. The datasheet provides some hints, also refer to the TMC5160-EVAL and the TMC5160-BOB breakout board.