The TMC262 will not clear its register settings upon an error condition. The registers only become reset at power up and
* upon undervoltage on VS
* upon undervoltage on VCC_IO
* upon undervoltage on 5VOUT
Therefore, if you are seeing your TMC26x reset its register, probably the ICs encounters a voltage spike or current spike upon motor stall, that leads to undervoltage detection. This can be due to an overload of the power supply, or due to too high distance / too low value of filter capacitors.
* Check that VCC_IO capacitor is located near to the chip with only a few millimeters of trace in between.
* Same for VS capacitor, but less critical with regards to distance
* Check that 5VOUT capacitor has sufficient value and is located near IC.
* Check that power supply for VCC_IO and VS do not use a common GND connection to the power supply, if interconnected via cable. Check that VCC_IO GND and VS GND share a common GND plane on the board.
* Check your power supply for overcurrent occuring upon high motor load.