Hi,
The symptom you describe — the probe homes, moves to X0/Y0, goes down, touches the plate, repeats twice as configured, but returns NAN every time and then loops forever — almost always points to an inverted Z-probe signal logic in the configuration, not to a hardware or firmware defect. The mechanical part clearly works (it touches the plate), so the firmware just isn't accepting the signal as a valid trigger.
Internally, a "NAN" probe result means the routine returned ILLEGAL_Z_PROBE. With your description ("pin goes HIGH when activated, LOW when idle"), one of these two checks is most likely firing:
"z-probe triggered before starting probing" — the firmware thinks the probe is already active before it even moves down, or
"z-probe did not untrigger" — the firmware thinks the probe is still active after lifting back up.
Both happen when Z_PROBE_ON_HIGH doesn't match your sensor's actual behavior.
Please check the following:
Verify the signal with M119. This is the key test. Send M119 once while idle, and once with the probe manually triggered. The z_probe status must toggle between the two states (e.g. "low/open" when idle, "high/triggered" when pressed). If it stays the same, or reads triggered when idle, that's the problem.
Set Z_PROBE_ON_HIGH to match your sensor. Since your pin goes HIGH when activated, this must be set to 1. If it's 0, the firmware inverts the logic and treats your idle state (LOW) as "triggered" → instant NAN.
Check Z_PROBE_PULLUP. If you use an active sensor (inductive/NPN-PNP, Hall, optical) that drives a defined HIGH level, the internal pull-up should normally be off, otherwise it can falsify the idle level. (Side note: an open-collector sensor pulling to GND would usually idle LOW with pull-up — which doesn't quite match your "HIGH when activated" description, so it's worth double-checking how the sensor is actually wired.)
If the probe shares the Z-min pin (Z_PROBE_PIN == Z_MIN_PIN), make sure ENDSTOP_Z_MIN_INVERTING is also consistent with the sensor logic — a mismatch there causes the same effect.
If M119 toggles correctly but probing still returns NAN, let us know — in that case we'd look at Z_PROBE_SWITCHING_DISTANCE (the sensor may not be releasing fast enough between repetitions).
Best regards