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.
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.
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.
| System | Powertrain — ignition and misfire |
|---|
Symptoms you may notice
What causes P0340
Camshaft position sensor failed
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
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
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
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
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.
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.
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.
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.
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.