P0340: Camshaft position sensor circuit fault (bank 1 or single sensor)

Camshaft position sensor circuit

P0340 in short

P0340 means the engine computer is not getting a usable signal from the camshaft position sensor. Check the battery and the sensor wiring first, then any bulletins and the sensor itself. It often still runs, but it can cause hard starting or stalling, so get it inspected soon.

The camshaft position sensor tells the engine computer where the camshaft is, so it can tell which cylinder is on its power stroke and time fuel injection and variable valve timing. Most engines combine it with the crankshaft sensor signal. P0340 is the circuit fault for camshaft sensor A on bank 1, or the only cam sensor on engines with one.

On the ASE reference design, losing one cam signal sets a code and the computer parks valve timing fully retarded; if no cam signal is seen while cranking, it stores a code and shuts off the injectors, so the engine will not start. Real engines differ, but hard starting, stalling and rough running are common complaints with these codes.

Most likely causes

  1. Cause 1: Failed camshaft position sensor

    Common general cause
    Why it ranks here
    A sensor that has stopped switching is the most direct explanation. Chrysler and Nissan bulletins for these codes replace or point to the cam sensor on specific models.
    What would change this
    Rises if supply, ground and wiring test good but the signal is missing on a scope; falls if the signal is clean while the code sets.
    How to test the camshaft position sensor
  2. Cause 2: Damaged or corroded cam sensor wiring or connector

    Common general cause
    Why it ranks here
    On a typical design the cam sensor needs a supply, a ground and a signal wire, and a break in any of them kills the signal. Ford told technicians to inspect the cam sensor connector wiring when a new sensor did not cure P0340.
    What would change this
    Rises with frayed, chafed or corroded wiring, or if the signal drops out when the harness is wiggled.
    How to test the camshaft position sensor
  3. Cause 3: Low battery voltage during cranking

    Supported by vehicle data
    Why it ranks here
    Toyota notes that a weak battery makes cranking speed uneven, which can set P0340 or P0335 with nothing wrong with the sensors. It is cheap to rule out.
    What would change this
    Rises if the battery fails a load test or the code set during a slow crank; falls if the battery and charging system test good.
  4. Cause 4: Engine computer software (some models)

    Supported by vehicle data
    Why it ranks here
    Chrysler issued an engine computer update for cam sensor circuit codes, including P0340 and P0345, on the 2021 Pacifica. Software is only a cause where a bulletin says so.
    What would change this
    Rises if a bulletin for your vehicle lists the code and the software is not current; a dealer can check.
  5. Cause 5: Sensor air gap or cam target out of specification (some engines)

    Supported by vehicle data
    Why it ranks here
    Subaru found an irregular sensor plate stamping that put the cam sensor air gap out of specification on some Foresters, causing hard starts, and issued inspection procedures for cam position codes on FA and FB engines.
    What would change this
    Rises on the listed Subaru models or if a new sensor does not fix it; a shop measures the air gap and inspects the target.

What to test first

Start at step 1. Each result tells you what it means and where to go next.

  1. Step 1: Have the battery load-tested and confirm it is charged, especially if the code set during slow or long cranking.

    Low riskTool: battery tester (free at many parts stores)

  2. Step 2: With the engine off, find the camshaft position sensor for the bank named in the code and inspect its connector and wiring for corrosion, loose pins, oil, chafing or broken wires.

    Use cautionTool: flashlight, service information for the sensor location

    Warning:Let the engine cool first; parts near the sensor stay hot enough to burn after shutdown.

  3. Step 3: Ask a dealer or check the vehicle's service bulletins for this code; some makers have software updates or specific inspections.

    Low riskTool: VIN, dealer or service information

  4. Step 4: Have a shop check the sensor's supply, ground and signal and view the cam signal against the crank signal on an oscilloscope.

    Best left to a shopTool: lab scope, multimeter, service information

    Warning:Done with the engine cranking or running near moving parts. Leave it to a shop.

Symptoms

  • Hard starting or long cranking
  • Rough running, hesitation or misfire
  • Engine stalls or will not start Gets more serious: stop and have it checked.
  • Check engine light flashing Gets more serious: stop and have it checked.

How to fix

  1. Step 1: Write down every stored code and the freeze-frame data before clearing anything, so you can tell whether the code comes back.

  2. Step 2: Have the battery and charging system tested (many parts stores do this free) and charge or replace a weak battery.

    Warning:Wear eye protection near the battery and keep sparks and flames away.

On your vehicle

Chevrolet

  • 2006 · Impala

    Supported by vehicle data

    GM has a bulletin for stalling or rough running with P0340 and other crank or cam sensor codes on this model. Ask a dealer to check bulletin 4137.

  • 2006 · Monte Carlo

    Supported by vehicle data

    GM has a bulletin for stalling or rough running with P0340 and other crank or cam sensor codes on this model. Ask a dealer to check bulletin 4137.

  • 4137Status unverified

    GM 4137: stall, engine runs rough, P0335, P0336, P0340 or P0341

    2006impala, monte-carlo · NHTSA 10020234

    Covers stalling or rough running with crank or cam sensor codes on the 2006 Impala and Monte Carlo. NHTSA's summary does not give the cause or repair.

    We couldn't confirm whether this bulletin is still current, so it doesn't count as confirmation.

Jeep

  • 0800108Status unverified

    Chrysler 0800108: long crank time and/or MIL from P0340/P0344

    2008wrangler · issued · NHTSA 10024059

    Long cranking and/or a check engine light from P0340 or P0344 on the 2008 Wrangler; the repair replaces the camshaft sensor.

    We couldn't confirm whether this bulletin is still current, so it doesn't count as confirmation.

Nissan

  • 2003–2005 · Altima

    Supported by vehicle data

    Nissan has a bulletin for P0340 with or without a hard start when warm on this model. Ask a dealer to check bulletin 04063.

    NHTSA owner complaints mentioning P0340: 6. That shows what owners reported, not how often a cause sets the code.

  • 2004 · Maxima

    Supported by vehicle data

    Nissan has a bulletin for P0340 with or without a hard start when warm on this model. Ask a dealer to check bulletin 04063.

    NHTSA owner complaints mentioning P0340: 6. That shows what owners reported, not how often a cause sets the code.

  • 2004 · Quest

    Supported by vehicle data

    Nissan has a bulletin for P0340 with or without a hard start when warm on this model. Ask a dealer to check bulletin 04063.

  • 04063Status unverified

    Nissan 04063: MIL with P0340/P0345 and/or hard starting when warm

    2003–2005altima, maxima, quest · issued · NHTSA 10007903

    Covers the cam sensor codes P0340/P0345 and/or a hard start when the engine is warm on 2003-2005 Altima, 2004 Maxima and 2004 Quest. NHTSA's summary does not give the repair.

    We couldn't confirm whether this bulletin is still current, so it doesn't count as confirmation.

Subaru

  • 2011–2013 · Forester · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 2012–2013 · Impreza · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 2013 · BRZ · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 2013 · Legacy · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 2013 · Outback · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 2013 · XV CrossTrek · FA, FB

    Supported by vehicle data

    Subaru has inspection and repair procedures for P0340 and related cam position codes on FA and FB engines, including hard starting. Ask a dealer to check bulletin 11-130-13R.

  • 11-130-13RStatus unverified

    Subaru 11-130-13R: difficulty starting, rough idle, cam position or misfire codes (FA and FB engines)

    2011–2013brz, forester, impreza, legacy, outback, xv-crosstrek · FA, FB · issued · NHTSA 10089963

    Inspection and repair procedures for intake and exhaust cam position codes (including P0340, P0341, P0345 and P0346) and P0301-P0304 on FA and FB engines: 2013 BRZ, 2011-2013 Forester, 2012-2013 Impreza, 2013 Legacy, Outback and XV Crosstrek.

    We couldn't confirm whether this bulletin is still current, so it doesn't count as confirmation.

Chrysler

  • 2021 · Pacifica

    Supported by vehicle data

    Chrysler has an engine computer update for P0340 and other cam sensor circuit codes on this model. Ask a dealer whether it has been done before replacing sensors.

  • 18-052-22Status unverified

    FCA 18-052-22: engine computer update for cam sensor circuit codes

    2021pacifica · issued · NHTSA 10212398

    Software update for the 2021 Pacifica when P0340, P0345, P0365 or P0390 (camshaft position sensor circuit codes) are set.

    We couldn't confirm whether this bulletin is still current, so it doesn't count as confirmation.

All Ignition and engine position sensors codes

P0340 questions

Is it safe to drive with P0340?

If the engine starts and runs normally, short careful trips to a shop are usually possible, but a failing camshaft position sensor can stop the engine without warning. If it has stalled, cuts out or will not restart, stop driving it and have it towed.

What is the difference between P0340 and P0341?

P0340 means the computer sees no usable signal from the cam sensor circuit. P0341 means a signal is there but its timing or pattern is wrong. P0340 leans toward a dead sensor or wiring; P0341 more often toward an intermittent signal, the sensor gap or the cam timing.

Can a weak battery cause P0340?

Yes. Toyota notes low battery voltage makes cranking uneven and can set P0340 or P0335. Have the battery load-tested before replacing a sensor.

Sources and review

  1. Safety Recall H0H Remedy Notice: Certain 2016-2017 Model Year Tacoma Crankshaft Position Sensor, Frequently Asked Questions — Toyota Motor North America ,
  2. Toyota Recalls Tacoma Pickups for Stalling — Automotive Fleet ,
  3. ASE L1 Advanced Engine Performance Specialist Test: Composite Vehicle Type 4 Reference Booklet — National Institute for Automotive Service Excellence (ASE)
  4. Cal. Code Regs. tit. 13, § 1968.2 - Malfunction and Diagnostic System Requirements (OBD II) — California Air Resources Board (via Cornell LII)
  5. 2001 Lincoln Continental Owner's Guide - Warning lights (Check engine) — Ford Motor Company
  6. Do you drive a 1996 or newer car or light truck? (On-Board Diagnostics, EPA420-F-02-016) — U.S. Environmental Protection Agency
  7. GM 4137: Stall, engine runs rough, P0335, P0336, P0340 or P0341 — General Motors (via NHTSA)
  8. Chrysler 0800108: long crank time and/or MIL from P0340/P0344, 2008 Wrangler — Chrysler LLC (via NHTSA) ,
  9. Nissan 04063: MIL with P0340/P0345 and/or hard starting when warm — Nissan North America (via NHTSA) ,
  10. Ford 982731: MIL with P0340 - inspect wiring at the camshaft position sensor — Ford Motor Company (via NHTSA) ,
  11. Toyota Tech Tip T-TT-0010-10: low battery voltage can set P0335 and/or P0340 — Toyota Motor Sales (via NHTSA) ,
  12. FCA 18-052-22: PCM update for camshaft position sensor circuit codes, 2021 Pacifica — FCA US LLC (via NHTSA) ,
  13. Subaru 11-100-11R: hard starting from an out-of-spec camshaft position sensor air gap — Subaru of America (via NHTSA) ,
  14. Subaru 11-130-13R: difficulty starting, rough idle, cam position or misfire codes (FA and FB engines) — Subaru of America (via NHTSA) ,
  15. ASE A1 study guide: VVT phaser diagnostics — OpenExamPrep (independent study site, not affiliated with ASE)
  16. Diagnostic Trouble Code (DTC) list — Delaware Division of Motor Vehicles
  17. NHTSA ODI consumer complaints flat files — National Highway Traffic Safety Administration (NHTSA), Office of Defects Investigation
Last reviewed
Written by
Saurabh K.
Editorial review
Pending
Technician review
Technician review pending

This page explains what a code usually means; it is not a substitute for a professional inspection. How we source and review · Report an error

My Car

Pick your car and code pages will point out notes and bulletins for it. Saved only in this browser.

Fill this in from your VIN

Used once to identify your engine; not stored.