I would test the knock sensor... The knock sensor learns min and max frequency's and reports as a/c voltage to the vcm. If the frequency is out of range (putting a small dent in your header) it will through a Knock Sensor code.

Clear the code and see if it comes back.

If code returns test the resistance from the k/s signal wire to battery ground. Should be 90ish to 105-110 kohms. If not in spec most of the time its a open or short to ground in the harness. (signal wire)

To test the actual knock sensor itsself. Set the volt meter to a/c current and hook up to signal wire and ground near sensor to engine block. Tap the block with a hammer close to the knock sensor. DO NOT hit anything plastic or the sensor If there is no current its the sensor. If there is current its open or shorted to the vcm or bad vcm. But I dought that...

Good luck