You can read out HOME_REF by using the HOME_ERROR_Flag (STATUS register).
To do so, you only have to do the following:
- Set VMAX=0
- Set X_HOME unequal to X_ACTUAL
- Set HOME_EVENT=0110 and HOME_UNCERTAINTY=0
Now, the TMC4361A expects HOME_REF pin to have a low voltage since it's outside X_HOME. Therefore:
- in case HOME_REF=0 → HOME_ERROR_F = 0
- in case HOME_REF=1 → HOME_ERROR_F = 1
Since you know the HOME_REF polarity, you can now switch the home reference registers to the values which fit your application.