I am designing a quenching operation for controlling bias voltage across my photodiode. The idea is as photons hits it, the diode produces a corresponding current pulse which I want to fed as an input of a comparator which senses the current and outputs a logic which finally triggers the biasing source i.e. when the diode is biased above breakdown, Vr while it detects the photon and gives current then immediately the bias voltage go below the breakdown, Vc (<Vr) then again switches back to above Vr for another detection. And the process repeats at a very fast rate.