Petrols have them, put simply its so the ecu can advance the timing as far as possible before it starts to 'Knock' (also known as pinking detonation etc), when it detects 'knock' it retards the ignition timing. Basically allows the engine to run on its limit of ignition timing advance and hence run more efficiently.
Is the fault sparadic, sometimes has SP next to fault for sporadic, if so then it was poss disconnected, (but shouldn't log a fault unless ignition was on), I'd delete the fault then recheck in a couple of days time.
If it isn't sporadic, then still delete and check it in a couple of days. If fault code returns get it checked out or try a new knock sensor (around £30- £40 from dealers), just fit in right place as theres 2 of them and there the same i believe, also torque it down to the proper setting.
If it still has fault after replacing the sensor then I'd check the wiring?
What were the other 2 codes logged?