configStatorCurrentLimit method of the WPI_TalonFX class takes a configuration argument specifying whether or not the current limit feature is enabled, the value to which current should be limited and a triggering current and time that when exceeded will cause the current limit to go into effect.
I can find no documentation that states when the current limit will be removed, if at all. Reasonable choices might be when the current falls below the limit value for some amount of time or when the motor output is set to 0. Does anyone know how it actually behaves?
I ask because we have a mechanism where it is required to briefly exceed the limit occasionally, so it is important that the limit be reset without, say, having to power off the motor.
Going off of this documentation, I believe the motor goes to limit when the motor exceeds trigger limit for trigger time.
Keep in mind the errata, which I believe is unfortunately still current: Errata — Phoenix documentation
The trigger threshold current and time are not honored in 20.0.0 firmware. Stator current limit will trigger when the measured current exceeds the limit (within 1ms).
When we tried to use the feature a couple years ago, it aggressively backed-off power for maybe 1/4 of a second or so then recovered. So the mechanism jerked around.
A few weeks ago when we were triggering the limit we did not see the oscillating behavior described by @jnicho15, which is good. And we seem to be avoiding triggering it now so the need for an answer to my question is not so urgent. But I do think the behavior about when the limit gets removed should be documented.
I asked CTRE and learned that the behavior is documented here: Bring Up: Talon FX/SRX and Victor SPX — Phoenix documentation. The current limit behavior resets when the requested output can be applied with the current staying below the continuous current limit.