1. A data storage device comprising: a non-volatile memory; and control circuitry configured to: receive a supply voltage for powering the non-volatile memory; sample the supply voltage to generate supply voltage samples; adjust a power loss threshold based on the supply voltage samples; detect a power loss event based on the power loss threshold and the supply voltage; and execute an emergency operation when the power loss event is detected.