P0340 — Camshaft Position Sensor Circuit Malfunction

P0340 can range from a hard start to a no-start. The camshaft signal tells the module which stroke each cylinder is on, and without it the engine either takes much longer to start or does not start at all.

High

The engine may start and run, may take a long crank, or may not start at all. A signal that is failing intermittently can cut out while driving, which is why this should not be left. This code will cause an emissions test failure.

$20–$300Parts, typical range
0.4–3 hLabour
estimateNot a quote · 2026 basis

What P0340 means

The crankshaft sensor tells the module where the engine is in its rotation; the camshaft sensor tells it which of the two rotations in a four-stroke cycle it is on. Without that, the module cannot fire injectors and coils in sequence and falls back on strategies that either delay starting significantly or prevent it. Many vehicles will still start on the crankshaft signal alone after a longer crank, which is why the symptom varies so much between engines.

Technical summary
SystemPowertrain — ignition and misfire
How a misfire is detectedThe crankshaft sensor gives position and speed, the camshaft sensor gives which stroke, and the module times the coil and injector for each cylinder from both. It detects a misfire by the small deceleration of the crankshaft that follows a cylinder which failed to fire, and attributes it to a cylinder when the pattern is consistent.Crank sensorposition, speedCam sensorwhich strokeModuletimes the sparkCoil & injectorper cylinderA misfire is measured as crankshaft deceleration, not as a missing spark

Symptoms you may notice

What causes P0340

Camshaft position sensor failed

Very likelylow costeasy

The sensor fails with heat and age, often intermittently before it fails completely — which produces the classic pattern of a car that cuts out when hot and restarts when cool.

Wiring or connector fault

Likelylow costmoderate

The sensor sits on the cylinder head where heat cycling hardens insulation and connectors work loose. An intermittent connection produces the same code as a failed sensor.

Timing chain or belt has jumped

Possiblevery-high costprofessional

If the camshaft is no longer where the crankshaft expects it, the signal arrives at the wrong moment. This usually stores a correlation code alongside, and is far more serious than a sensor fault.

Common misdiagnosis

If a correlation code such as P0016 is stored with P0340, investigate timing before replacing any sensor.

Damaged reluctor ring or tone wheel

Rarehigh costprofessional

The sensor reads teeth on a wheel. A damaged or contaminated wheel produces a signal the module cannot interpret even with a perfect sensor.

How to diagnose it

1

Check for a correlation or crankshaft code alongside

Scan for all stored codes. P0340 with a correlation code points at mechanical timing, not at the sensor, and changes the whole diagnosis.

Tools: OBD-II scannerIf it passes: P0340 is the only relevant code. Continue to step 2.If it fails: A correlation or crankshaft code is stored too. Investigate mechanical timing before replacing anything.
2

Inspect the sensor connector and harness

Examine the connector for oil contamination, corrosion and looseness. Oil tracking down the harness from a leaking seal is a common cause and needs both faults repaired.

Tools: Inspection lightIf it passes: The connector is clean and secure. Continue to step 3.If it fails: Repair the wiring or seal the oil leak, clear the code and re-test.
3

Watch the signal while cranking

Monitor camshaft RPM or the sensor signal on the scanner while cranking. A signal that is absent or erratic confirms the fault is in the sensor or its wiring.

Tools: OBD-II scanner with live dataIf it passes: A clean signal is present. Re-examine the wiring for an intermittent fault.If it fails: The signal is absent or erratic. Continue to step 4.
4

Check supply, ground and signal at the connector

With the ignition on, confirm the supply voltage and ground, then check the signal line while cranking. This separates a failed sensor from a wiring fault before you buy a part.

Tools: Multimeter, Wiring diagramIf it passes: Supply and ground are good but no signal is produced. Replace the sensor.If it fails: Supply or ground is missing. Repair the circuit.

Related codes

Common questions

Can I drive with P0340?

It is unwise. A signal failing intermittently can stall the engine while driving, and an engine that stalls in traffic is a safety problem regardless of the repair cost.

Why does it start sometimes and not others?

Many engines can start on the crankshaft signal alone after a longer crank. As the sensor degrades with heat, the failure comes and goes with engine temperature.

Is this an expensive repair?

Usually not — the sensor is inexpensive and often accessible. It becomes expensive only if the real cause is mechanical timing rather than the sensor.

Last verified 2026-07-27 · Sources: SAE J2012 — Diagnostic Trouble Code Definitions and Failure Type Byte (SAE International)

This information is for general guidance and is not a substitute for professional diagnosis. Cost figures are estimates, not quotes.