OBD-II trouble code · Powertrain (engine and transmission)

P0340 Camshaft Position Sensor A Circuit Malfunction (Bank 1 or Single Sensor)

The engine computer is not getting a usable signal from the camshaft position sensor, which helps it know which cylinder is on which stroke. You may notice hard starting or rough running.

SeverityModerate
Safe to drive?Often drivable short-term if it runs normally, but some vehicles can stall or not restart, so get it checked soon and avoid long trips.

I'm not hearing from my camshaft sensor, so I'm guessing a bit about which cylinder is which. I may still run, but I might be grumpy about starting.

— FRED, speaking as your car

What P0340 means

The camshaft position sensor tells the engine computer where the camshaft is, which, combined with the crankshaft sensor, lets it time fuel injection and spark for each cylinder. P0340 sets when the computer sees no signal or an invalid signal from cam sensor A on bank 1 or a single-cam engine. Causes include a failed sensor, damaged wiring or connector, a bad reference voltage supply, or a damaged cam reluctor. On many engines the car will still run, but starting and performance may suffer. Sensor naming and location vary by make.

Common symptoms

  • Hard starting or long cranking
  • Check-engine light on
  • Rough running or misfire
  • Engine stalls or will not restart in some cases
  • Reduced power or limp mode
  • Lower fuel economy

Likely causes (most likely first)

  1. Failed camshaft position sensor
  2. Damaged wiring or connector
  3. Loss of sensor reference voltage or ground
  4. Oil leak contaminating the connector
  5. Damaged cam reluctor or trigger wheel
  6. Timing chain or belt problem (less common for this code)

What you can check yourself

  1. Scan for other codes, especially crank sensor or timing correlation codes
  2. Locate the cam sensor and inspect the connector for oil, corrosion, or loose pins
  3. Inspect the wiring harness for damage or chafing
  4. Check for reference voltage at the connector with a multimeter, per the service manual
  5. Remove the sensor and inspect for damage or debris
  6. Clear the code and see if it returns before replacing parts

FRED reads freeze frame and live data, so you can see what the engine was doing when P0340 set, before you buy any parts.

Typical repair costs

RepairTypical range
Replace camshaft position sensor$120–$350
Repair wiring or connector$100–$400
Fix oil leak contaminating sensor$150–$500
Timing chain or belt repair if required$800–$3,500

Typical US independent-shop ranges, parts and labor. Your price varies by vehicle, region and shop.

Get a second opinion from your own car. Plug a $15–30 OBD-II adapter into the port under your dash, open FRED and ask “Fred, what are my codes?” Get the free beta →
Which adapter?

P0340 FAQ

Many vehicles will start and run, sometimes with longer cranking. Others may stall or not restart, so do not count on it for long trips until fixed.
Check the wiring and connector first. Oil-soaked or damaged connectors are a common cause, and a sensor will not fix a wiring fault.

Related codes