P0340 Code: Camshaft Position Sensor A Circuit
The computer lost the camshaft signal on bank 1. Expect long cranking, less power, or a no-restart.
At a glance
Severity: Moderate
- Meaning
- Camshaft Position Sensor A Circuit (Bank 1 or Single Sensor)
- System
- Ignition & Misfire · Powertrain
- Safe to drive?
- With caution
- Typical repair cost
- $100–$2,500
- DIY difficulty
- Easy
The camshaft position sensor reads a notched target wheel on the camshaft. The crank sensor tells the computer where the pistons are, and the cam sensor adds which stroke cylinder 1 is on, compression or exhaust. The computer needs that to fire each coil and injector at the right moment and to control variable valve timing. P0340 means the signal from sensor A on bank 1 (or the only cam sensor) is missing or out of range. On engines with a sensor on each cam, A is normally the intake cam. Many engines keep running because the computer can fall back to crank-only operation, but starting takes noticeably longer and variable valve timing is usually disabled.
Can I keep driving? Usually drivable if the engine starts and runs smoothly, but expect long cranking and reduced power. Some engines stall or refuse to restart, so skip long trips and avoid parking where a tow would be difficult. If P0335 is stored too, treat it as a likely no-start.
How to read P0340
- P Powertrain
- 0 Generic (SAE)
- 3 Ignition / misfire
- 40 Specific fault
Symptoms
- Engine cranks several seconds longer than normal before starting
- Check-engine light on
- Reduced power and flat acceleration (variable valve timing disabled)
- Occasional stalling or a hot no-restart
- Slightly rough idle or lower gas mileage
Possible causes
Ranked by how often each cause is behind this code (editorial estimate).
- Failed camshaft position sensor
- Damaged wiring or a connector filled with oil that has wicked past a leaking sensor O-ring
- Stretched timing chain or a belt that has jumped a tooth, so the cam signal no longer lines up
- Shorted sensor reference voltage shared with another sensor
- Low battery or cranking voltage
- Damaged or loose target wheel on the camshaft or cam phaser
- Engine computer fault
Diagnosis step by step
Check which other codes are stored
P0340 on its own usually points to the sensor or its wiring. If cam/crank correlation codes such as P0016 through P0019 are stored too, or P0340 set right after timing belt work, suspect mechanical timing first. P0335 together with P0340 points to a shared power supply or ground.
Tools: OBD-II scanner
Check battery and cranking voltage
A battery that drops below about 9.6 volts while cranking can make the cam signal drop out and set P0340 with nothing else wrong. Test and charge the battery before replacing sensors.
Tools: Multimeter
Inspect the sensor and pull the connector
The sensor usually sits at the timing end of the cylinder head or on the timing cover. Unplug it and look for engine oil inside the connector. If there is oil, the sensor's O-ring is leaking, and the oil can wick along the wires toward the computer.
Tools: Flashlight, Screwdriver
Check power, ground and signal
With the key on, measure the reference voltage (usually 5 volts, on some engines 12) and the ground at the harness side. While someone cranks the engine, the signal wire should switch between low and high. A lab scope is best, but a multimeter on DC volts shows a fluctuating reading.
Tools: Multimeter
Verify cam timing if the sensor and wiring are good
If a new sensor and good wiring don't cure it, check the timing marks or compare cam and crank position data on a scan tool. A chain that has stretched or a belt that has jumped a tooth throws the cam signal out of its expected window.
Tools: OBD-II scanner, Flashlight
Replace the sensor and verify sync
Fit a new O-ring, torque the bolt to spec and clear the codes. Many scan tools show a cam/crank sync status. Confirm it reads synchronized and that the engine now starts quickly, hot and cold.
Tools: Torque wrench, OBD-II scanner
Where the parts are
- 1Ignition coil
- 2Spark plug
- 3Fuel injector
- 4Camshaft sensor
- 5Crankshaft sensor
- 6Engine computer (ECM)
- 7Intake manifold
Repair options & costs
| Repair | DIY? | Estimated cost |
|---|---|---|
| Replace camshaft position sensor | Yes | $100–$300 |
| Repair wiring or clean oil from the connector and harness | No | $100–$350 |
| Replace timing chain or belt kit | No | $800–$2,500 |
| Replace cam target wheel or cam phaser | No | $500–$1,500 |
Rough US estimates for parts and labor; shop rates vary by region. Not a quote.
Notes by brand
Nissan
Nissan's 2.5L QR25DE and 3.5L VQ35DE engines from the early 2000s are known for camshaft position sensor failures that show up as long cranking, stalling, or a no-restart when hot. Replacement sensors are inexpensive and easy to reach on most of these engines.
Field data
| Ford | 5 | Ecosport, Focus Bev, Focus Rs | |
|---|---|---|---|
| Nissan | 5 | Altima, Murano, Pathfinder | |
| Jeep | 4 | Cherokee, Grand Cherokee, Liberty | |
| Chevrolet | 3 | Cobalt, Impala, Silverado 2500 | |
| Dodge | 3 | Avenger, Durango, Journey | |
| Mercedes-Benz | 3 | C-Class | |
| Chrysler | 2 | 300 | |
| Kia | 2 | Sorento |
Source: NHTSA Complaints API (US government open data), analyzed by DTC mention.
Emissions / smog test impact
Will fail
With P0340 stored and the check-engine light on, the vehicle fails an OBD smog check. After replacing the sensor, drive through several warm-up cycles so the monitors finish before retesting.
Frequently asked questions
Why does my engine crank so long before it starts?
Without the cam signal, the computer has to work out cylinder 1's stroke by trial and error, or fire in a less precise backup mode. That takes a few extra crank revolutions. Once the sensor works again, quick starts return.
Is sensor A the intake or exhaust cam sensor?
On engines with a sensor on each camshaft, A is normally the intake cam and B the exhaust cam. Bank 1 is the side with cylinder 1. On single-cam engines, there is only one sensor.
Can a timing chain cause P0340?
Yes. If the chain has stretched or jumped, the cam signal arrives outside the window the computer expects, and it may flag the circuit or a correlation code. A rattle at startup plus P0016 alongside P0340 strongly suggests timing trouble.
I replaced the sensor and the code came back. Why?
Common reasons are oil still in the connector or harness, a damaged target wheel, a wrong or poor-quality sensor, or a reference voltage pulled down by another shorted sensor. Retest the wiring with the new sensor installed.