Setting up M8P v2 w/CB1 for X5SA - before migrating over

This sensor appears to be an inductive probe but with very limited information available.
So every following advice is under the heading “usually…” with no guarantee nor liability whatsoever:

  • brown cable is VCC
  • blue cable is GND
  • black is signal
  • VCC should be at least 12V, but most inductive probes work better with higher voltage (then again, no information available)
  • the black signal cable goes to your z-min or z-max endstop pin and needs to be reflected in the printer.cfg
  • it is good practice or even mandatory (depending on the type) to put a diode, e.g. a fast BAT85 diode, in the black signal cable with the “black ring” on the diode facing towards the probe

See ADC out of range
In your case caused by the bed, either because the temp sensor of the bed is not plugged in at all or wrongly connected.
You have configured PB1 for the bed’s thermistor, which corresponds to THB on the board.