The Knock Sensor is there to detect pre-ignition and detonation, if the ECU does
detect such a condition then the timing is made retard to prevent distruction
of the engine. The sound of the engine knocking resembles the sound of
shaking of metal bearings inside a glass bottle. There are many reasons that
would cause an engine to knock and throw out an error code, suggest you
first check to see that the wire to the knock sensor is not disconnected. Have
you recently up'ed the boost?, if so it could be that the air/fuel mixture
may not be correct and that it possibly is running lean. Low on fuel with hard
accelaration coming off a corner can cause knocking to occur too, or maybe a
weak fuel pump?, atmospheric air is hot, etc....
good luck !.