Not always. If was working within the threshold of the sensro perameters it might not, if was totaly broken or has a bad circuit then it would throw a DTC.
Though, if its pounding/knocking like a hammer beating your engine block... its probly not the sensor.
Go get it scanned !