Comparison

OBD-II diagnostic trouble code

P0340Caution

Camshaft Position Sensor Circuit Malfunction

The camshaft position sensor tells the computer which stroke each cylinder is on, which is what allows sequential fuel injection and correct ignition timing. Unlike a crankshaft sensor failure, many engines can still limp along without a good camshaft signal, just running worse.

Symptoms

  • Hard starting, especially a longer crank time before the engine catches
  • Rough idle and reduced power
  • Occasional stalling, though usually less abrupt than a crankshaft sensor failure
  • Reduced fuel economy

Likely causes

  • Failed camshaft position sensor — the most common cause
  • Damaged or corroded wiring or connector at the sensor
  • Timing chain/belt wear that's thrown the camshaft slightly out of its expected position
  • Oil-fouled sensor tip on engines where the sensor sits close to moving parts

How to diagnose it

  1. Inspect the sensor connector and wiring for corrosion or damage first
  2. Test the sensor signal with a scan tool while cranking or idling
  3. If timing-chain wear is suspected (rattling noise on startup), check timing marks/chain stretch before condemning the sensor
Code names are compiled from open/standardized SAE and ISO references. Explanations, symptoms, causes and fixes are original. Covers generic (P0/C0/B0/U0) codes only — manufacturer-specific codes are planned for a future update.

Frequently asked questions

Can I drive with P0340?

You can usually keep driving with P0340, but don't put it off — the underlying cause can get worse or lead to further damage the longer it goes unaddressed. Get it diagnosed as soon as you reasonably can.

How much does it cost to fix P0340?

Typical repair costs for {code} range from roughly 60 to 1200 EUR, depending on the specific cause and your car — see the fixes listed above for a breakdown.

What causes P0340?

Failed camshaft position sensor — the most common cause Damaged or corroded wiring or connector at the sensor Timing chain/belt wear that's thrown the camshaft slightly out of its expected position
Artyom SemenovYauheni Kapliarchuk
Reviewed by Artyom SemenovAutomotive Editor · Fact-checked by Yauheni Kapliarchuk, Editor-in-Chief
Code names compiled from open SAE/ISO references; explanations and repair guidance are original editorial content
Last verified: 09 Jul 2026 · Our methodology