Having trouble with firmware. I think.

I've been trying to get it running properly for the last two days and I barely got it to load the firmware, but I don't know if I installed the right one.

My biggest problem is the autohome feature, which weather does not move the Z axis or keeps the steppers running after they reached the endstop and it keeps bumping into the endstop for a few seconds until it stops without having moved the Z axis.

Any help will be much appreciated.

(not having a device disclaimer)
Do these endstops have sensors build in? if so check the wiring
as this sounds like a feedback loop is not working

Thank you.
Looks like I switched two of my endstop cables when wiring. It now preforms autohome as expected.

great!