Check this first
Have the wiring checked at the sensor first – the sensor sits on the engine and cooks its own connector.
What usually fixes it
In the order a good shop checks them. Typical total: $119–$575 at $130 an hour.
Wiring or connector
$119–$282Heat-damaged wiring breaks the signal.
Knock sensor
$248–$575The sensor fails and the computer pulls timing to be safe, so it feels flat.
Code titles are the generic SAE definitions. Prices are typical US parts and labor for a common car or light truck – a guide for judging a quote, not a quote. Always confirm a repair against the vehicle in front of you.