EN

Severity: Moderate Code type: Generic (all makes)

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: 3/5 – Moderate3/5

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

How to read P0340P10233404
  1. P Powertrain
  2. 0 Generic (SAE)
  3. 3 Ignition / misfire
  4. 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).

  1. Failed camshaft position sensor 37%
  2. Damaged wiring or a connector filled with oil that has wicked past a leaking sensor O-ring 22%
  3. Stretched timing chain or a belt that has jumped a tooth, so the cam signal no longer lines up 12%
  4. Shorted sensor reference voltage shared with another sensor 8%
  5. Low battery or cranking voltage 8%
  6. Damaged or loose target wheel on the camshaft or cam phaser 8%
  7. Engine computer fault 5%

Diagnosis step by step

Diagnostic flow: P03401Check which other codes are stored2Check battery and cranking voltage3Inspect the sensor and pull theconnector4Check power, ground and signal5Verify cam timing if the sensor andwiring are good6Replace the sensor and verify sync
  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

Ignition: coils and spark plugs per cylinder – P03401234567
Ignition: coils and spark plugs per cylinder
  1. 1Ignition coil
  2. 2Spark plug
  3. 3Fuel injector
  4. 4Camshaft sensor
  5. 5Crankshaft sensor
  6. 6Engine computer (ECM)
  7. 7Intake manifold

Repair options & costs

RepairDIY?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.

Sources