Try a different sata cable, make sure the bios/uefi is set to defaults/optimized defaults. If those don't work the mobo or hard drive are bad and need to be replaced. Try the hard drive on/in another pc to rule it out as the cause. If it work's the mobo is at fault (I/e: faulty sata connectors, etc.).