To use STOPL or STOPR as a home reference, you need to connect it to the HOME_REF input. Once you've done so, you can use the homing support features as described in the manual.
By setting switch stop_left_is_home (resp. stop_right_is_home) in the REFERENCE_CONF register 0x01, you could alter the stop behavior in case STOPL (resp. STOPR) is triggered.
If this bit is set, it takes the uncertainty range that can be defined for the HOME_REF pin into account before the stop is initiated internally.