P0340: Camshaft Position Sensor Circuit — Diagnosis, Causes & Testing
P0340 means the ECM cannot reliably read the camshaft position signal. Learn signal integrity, power/ground, crank/cam correlation, reluctor/trigger faults, VVT interaction and oscilloscope diagnosis.
Pressure, voltage, torque, pin and waveform values on this page are guidance only. Vehicle-specific verified specification required before acting on any test.
What the code means
P0340 is a circuit / signal code for the camshaft position sensor. The ECM has detected that the camshaft position signal is missing, implausible, or intermittent — it cannot reliably identify cam position for sequential injection and ignition timing. The code often appears alongside crank/cam correlation codes (P0016 / P0017) when the issue is mechanical timing rather than the sensor.
System involved
- Camshaft position sensor (CMP) — Hall (3-wire) or inductive (2-wire)
- Reluctor / trigger on the cam (tone ring, magnet, single-tooth reference)
- VVT / VANOS / VVT-i / cam-phaser system (affects cam position relative to crank)
- Sensor power, ground, signal circuits
- Timing chain / belt (mechanical correlation to crank)
Common symptoms
- Long crank (sequential injection falls back to batch)
- Hard start
- MIL on
- Rough idle (batch-fire instead of sequential)
- Reduced fuel economy
- Sometimes no obvious drivability symptom (code only)
Possible causes
- Sensor failure: internal open or thermal breakdown
- Wiring: open or shorted signal/power/ground; chafing
- Connector: heat damage, pins, corrosion
- Air gap / sensor-to-reluctor (Hall type)
- Reluctor / trigger: damaged, loose, foreign material
- VVT / cam phaser: mistimed or stuck — desynchronises cam from crank
- Timing chain / belt: jumped or stretched
- EMI
Why the DTC does NOT prove a particular component has failed
P0340 reports that the cam signal is unreliable. It does not say whether the sensor is dead, the wiring is broken, the reluctor is damaged, or the mechanical timing has jumped so the cam no longer correlates with the crank. A dead sensor, a chafed wire, a stuck VVT phaser, and a jumped timing chain all set the same code. Replacing the cam sensor because "P0340 is the cam sensor" is the parts cannon — a jumped chain will produce the identical code and the new sensor will not fix it.
Initial checks
- Read all codes. P0335 (crank), P0016/P0017 (correlation), P0341/P0342/P0343 (CMP variants). Correlation codes point to mechanical timing, not the sensor.
- Does it start at all? Long-crank start suggests cam-only; no-start suggests crank also affected.
- VVT / cam-phaser codes present? → Timing/phase issue, not the sensor.
- Visual: connector, wiring, reluctor access.
Freeze-frame values worth reviewing
- Engine speed
- Whether set during crank or running
- VVT / cam-phase command and actual position (if available)
- Correlation status
Live-data parameters worth reviewing
| Parameter | Why | |---|---| | Cam signal status / sync | ECM confidence | | Crank/cam correlation | Desynchronisation = timing/VVT | | VVT command vs actual | Stuck or mistimed phaser | | Engine speed stability | Dropouts | | Sequential vs batch injection status | Cam-signal fallback |
Electrical tests
- Hall (3-wirire): power, ground, signal — back-probe during cranking; clean square wave expected.
- Inductive (2-wire): resistance and AC voltage during cranking.
- Oscilloscope: cam and crank together — the decisive test. The cam pulse must occur at the correct phase relative to the crank missing-tooth. Phase shift = mechanical timing; missing/corrupted signal = sensor/wiring.
Mechanical tests
- Reluctor / trigger inspection.
- VVT / cam phaser command vs actual — a stuck or slow phaser desynchronises.
- Timing chain / belt correlation — if P0016/P0017 accompany P0340, verify mechanical timing before condemning the sensor.
Next-best-test decision logic
- Are P0016/P0017 (correlation) also set? → Yes: mechanical timing or VVT, not the sensor. → No: continue.
- Power/ground/signal at the sensor? → Missing: wiring. → Present: continue.
- Oscilloscope: cam vs crank phase? → Correct phase, signal corrupt/missing: sensor/wiring. → Wrong phase: timing/VVT.
- VVT command vs actual? → Disagrees: phaser/oil control. → Agrees: continue.
- Reluctor intact? → Damaged: reluctor. → Intact: sensor.
Common diagnostic mistakes
- Replacing the cam sensor when the timing chain has jumped.
- Not checking VVT / cam phaser on variable-valve-timing engines.
- Skipping the dual-trace oscilloscope (crank + cam).
- Overlooking correlation codes (P0016/P0017) that point away from the sensor.
Related DTCs
- P0335 — Crankshaft position sensor
- P0016 / P0017 — Crank/cam correlation (mechanical timing)
- P0341 / P0342 / P0343 — CMP circuit variants
- P0300 — misfire (batch-fire fallback)
Manufacturer-specific considerations
- BMW: VANOS solenoid/phaser issues desynchronise cam on N-series; cam sensors and reluctors. Vehicle-specific verified specification required.
- Audi / VW: cam phaser / chain tensioner on EA888; Hall sensors. Vehicle-specific verified specification required.
- General: on VVT engines, always check phaser command vs actual before the sensor.
Driveability and safety considerations
- A jumped timing chain can cause piston-to-valve contact — do not crank repeatedly if correlation codes are present.
- Long cranking drains the battery; address promptly.
Example evidence-driven diagnostic workflow
- Complaint: "Long crank, MIL on, rough idle."
- Scan: P0340, P0016 (crank/cam correlation).
- Hypothesis: mechanical timing desynchronisation, not the cam sensor (correlation code present).
- Test 1 — Dual-trace scope (crank + cam): cam pulse phase-shifted relative to crank missing-tooth. Confirms timing, not sensor.
- Test 2 — VVT command vs actual: phaser slow to respond. Oil control / phaser issue.
- Test 3 — Oil pressure / VVT solenoid: solenoid clogged, slow response.
- Confirmed root cause: VVT solenoid restriction desynchronising cam phasing.
- Repair: clean/replace VVT solenoid; confirm timing.
- Verification: cam phase correct on scope; correlation codes clear; no return.
The cam sensor was never replaced — a correlation code pointed to the mechanical system from the start.
Related DTCs
Related MechanIQ guides
Diagnosing this fault on a real vehicle?
Start a MechanIQ diagnosis — import your scan data and let the evidence engine find the next best test.