OBD-II · P0340
P0340 Code: Camshaft Position Sensor — A Common No-Start Cause
Camshaft position sensor circuit malfunction

The short version
Not advisable; an intermittent sensor can stall the engine without warning.
- Severity: Serious
- Most common cause: Failed or heat-sensitive camshaft sensor
- 5 diagnosis steps in order
- 4 symptoms tied to this code
Darker bars are the more common causes; bar length is the top expected repair cost. Start with the dark, cheap causes before the expensive ones.
Can I keep driving?
Not advisable; an intermittent sensor can stall the engine without warning. Fix it before any long trip.
Symptoms
- Hard starting or a complete no-start
- Sudden stalling that clears after a pause
- Hesitation and rough running under acceleration
- Sometimes an accompanying crank sensor code, P0335
Causes & repair cost
Failed or heat-sensitive camshaft sensor
Most common$90 – $300
Loose connector or damaged wiring
Most common$60 – $250
Oil or debris on the sensor tip
Possible$20 – $90
Damaged reluctor ring or stretched timing chain
Possible$400 – $2,000
Electrical interference from a failing coil or plug wire
Rare$80 – $320
The sensor itself is $90–$300 installed on most engines. If a stretched timing chain is the cause, the bill exceeds $800 and needs a properly equipped shop.
Estimate the repair for your carDiagnosis steps in order
- Inspect the connector and harness for cracks or oil
- Watch the sensor signal on a scan tool while cranking
- Measure supply voltage and ground at the connector
- Wipe the sensor tip and refit it squarely
- Compare cam and crank signals to reveal chain stretch
FAQ
Will the car start with a failed cam sensor?
Some engines start using a crank-signal fallback strategy, while others refuse to start at all depending on calibration.
Why does the fault appear only when hot?
The semiconductor element loses stability with heat, so heat-related failure is a common pattern worth replacing.
Should I replace the crank sensor too?
Not automatically; replace it only if testing or a code implicates it, or if access will be costly later.
Do aftermarket sensors bring the code back?
Frequently; position sensors are tolerance-sensitive, and OEM or high-quality units are cheaper long term.
Related codes
All explained codes
Search this site
Ready-made searches that surface the guides, calculators, and cost pages tied to this topic.
