P0340: Camshaft position sensor circuit fault (bank 1 or single sensor)
Camshaft position sensor circuit
Severity: Inspect soon
P0340 means the engine computer has no usable camshaft sensor signal. The engine often keeps running, sometimes with hard starting or reduced performance, but cam and crank sensor faults are linked to stalling and no-starts. Get it inspected soon and stop driving if it stalls.
It gets more serious if:
- Stop: The check engine light is flashing. That means misfire bad enough to damage the catalytic converter is happening right now; Ford warns the extra exhaust heat can damage the converter and nearby parts and could cause a fire. Pull over when safe and avoid further driving, or at most drive gently and slowly to the nearest shop (EPA's own advice is to minimise driving and avoid speed and heavy loads).
- Stop: The engine stalls, cuts out while driving, or cranks but will not start. A crank or cam sensor signal that drops out can shut the engine off without warning, and Toyota recalled a crank sensor fault that could stall the engine because a stall at higher speeds may increase the risk of a crash. Do not keep driving; have it towed or checked where it sits.
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
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.
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.
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.
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.
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.
Step 1: Have the battery load-tested and confirm it is charged, especially if the code set during slow or long cranking.
IfBattery is weak
It meansFix the battery, clear the code and recheck.
IfBattery tests good
It meansInspect the sensor wiring.
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.
Warning:Let the engine cool first; parts near the sensor stay hot enough to burn after shutdown.
IfDamaged or corroded wiring or connector
It meansRepair the wiring before replacing the sensor.
Points to: Damaged or corroded cam sensor wiring or connector
IfWiring looks good
It meansCheck for bulletins, then test the signal.
Step 3: Ask a dealer or check the vehicle's service bulletins for this code; some makers have software updates or specific inspections.
IfA bulletin lists the code for your vehicle
It meansFollow the bulletin (software update, air gap check, and so on).
IfNo bulletin applies
It meansTest the sensor signal.
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.
Warning:Done with the engine cranking or running near moving parts. Leave it to a shop.
IfSupply and ground good but no signal
It meansThe sensor has failed.
IfSignal present but irregular or weak
It meansA weak or irregular signal points to the air gap or the target on the camshaft; on listed Subaru engines follow the bulletin.
Points to: Sensor air gap or cam target out of specification (some engines)
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.
Compare with: Rough idle with the check engine light on, Check engine light with loss of power
How to fix
Step 1: Write down every stored code and the freeze-frame data before clearing anything, so you can tell whether the code comes back.
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
ChevroletYour car
2006 · Impala
Supported by vehicle dataGM 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 dataGM 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.
JeepYour car
2008 · Wrangler
Supported by vehicle dataChrysler's bulletin for long cranking and P0340 on this model replaces the camshaft sensor.
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.
NissanYour car
2003–2005 · Altima
Supported by vehicle dataNissan 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 dataNissan 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 dataNissan 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.
SubaruYour car
2011–2013 · Forester · FA, FB
Supported by vehicle dataSubaru 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 dataSubaru 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 dataSubaru 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 dataSubaru 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 dataSubaru 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 dataSubaru 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.
ChryslerYour car
2021 · Pacifica
Supported by vehicle dataChrysler 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.
Related 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
- Safety Recall H0H Remedy Notice: Certain 2016-2017 Model Year Tacoma Crankshaft Position Sensor, Frequently Asked Questions
- Toyota Recalls Tacoma Pickups for Stalling
- ASE L1 Advanced Engine Performance Specialist Test: Composite Vehicle Type 4 Reference Booklet
- Cal. Code Regs. tit. 13, § 1968.2 - Malfunction and Diagnostic System Requirements (OBD II)
- 2001 Lincoln Continental Owner's Guide - Warning lights (Check engine)
- Do you drive a 1996 or newer car or light truck? (On-Board Diagnostics, EPA420-F-02-016)
- GM 4137: Stall, engine runs rough, P0335, P0336, P0340 or P0341
- Chrysler 0800108: long crank time and/or MIL from P0340/P0344, 2008 Wrangler
- Nissan 04063: MIL with P0340/P0345 and/or hard starting when warm
- Ford 982731: MIL with P0340 - inspect wiring at the camshaft position sensor
- Toyota Tech Tip T-TT-0010-10: low battery voltage can set P0335 and/or P0340
- FCA 18-052-22: PCM update for camshaft position sensor circuit codes, 2021 Pacifica
- Subaru 11-100-11R: hard starting from an out-of-spec camshaft position sensor air gap
- Subaru 11-130-13R: difficulty starting, rough idle, cam position or misfire codes (FA and FB engines)
- ASE A1 study guide: VVT phaser diagnostics
- Diagnostic Trouble Code (DTC) list
- NHTSA ODI consumer complaints flat files
- 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