Sensors and circuits
P0340Camshaft position sensor A circuit
Camshaft Position Sensor A Circuit Bank 1 or Single Sensor
Get it diagnosed soon
Generic OBD-II code
Camshaft Position (CMP) Sensor
What this part does
Reports camshaft position/rotation so the control module can time fuel injection, ignition, and variable valve timing correctly.
What the computer is measuring
The crankshaft turns twice for every one turn of the camshaft. That means the crankshaft sensor alone cannot tell the computer which stroke a given cylinder is on, because the same crankshaft position occurs once on compression and once on exhaust. The camshaft sensor resolves the ambiguity. It reports where the camshaft is, and combining the two signals gives the computer a complete picture of the engine cycle.
That is what makes the camshaft signal necessary for sequential injection, for coil on plug ignition and for any form of variable valve timing. The computer needs to know not just where the crankshaft is, but which cylinder is about to need fuel and spark.
P0340 means the signal from the camshaft sensor was missing, intermittent or outside what the circuit should produce. Many engines will still start without it, by trying one interpretation and switching if it turns out to be wrong, which is why extended cranking is such a common symptom. Others will not start at all.
Separating a sensor fault from a timing fault
This is the distinction that saves the most money on this code, and it comes down to which codes are stored.
If P0340 is on its own, the computer is not receiving a usable signal, and the fault is in the sensor, its connector or its wiring. That is a cheap repair.
If a camshaft to crankshaft correlation code is stored alongside it, both signals are arriving perfectly well and they do not agree with each other. The camshaft is not in the position the crankshaft says it should be, which means a stretched chain, a worn tensioner, a slipped belt or a failed phaser. That is mechanical, it is expensive, and no amount of sensor replacement touches it.
Check the connector before you buy anything
The single most common wasted repair on this code is a new sensor fitted into an oil filled connector. Oil bridges the pins, corrupts the signal, and does exactly the same thing to the new sensor within days. Unplug it and look before ordering parts. If there is oil in there, the seal and the connector both need dealing with, not just the sensor.
What you will notice
- Extended cranking before the engine starts, because the computer has to work out cylinder identification the slow way.
- A no start, on vehicles that will not run without this signal at all.
- Stalling or a stumble while driving, sometimes clearing on a restart.
- Rough running, poor economy and reduced power where variable valve timing has been disabled as a precaution.
Likely causes, most common first
Ordered by how often each one actually turns out to be the problem, not alphabetically and not by part price.
A failed camshaft position sensor
The most common cause. Like its crankshaft counterpart it often fails with heat, so the fault appears once the engine bay is warm and clears overnight.
Engine oil in the sensor connector
Very common and very easy to miss. A perished sensor seal lets oil wick up inside the harness, and the oil bridges the pins. Replacing the sensor without cleaning or replacing the connector puts the fault straight back.
Damaged wiring or a corroded connector
The usual harness faults. Worth checking whether other sensors sharing the same reference voltage have also set codes, because that points at the harness rather than the sensor.
A stretched timing chain or slipped timing belt
The sensor is working and reporting honestly, but the camshaft is no longer where the crankshaft says it should be. Usually accompanied by a correlation code, and often by a rattle on start up.
A damaged reluctor or a failed variable valve timing phaser
The target the sensor reads. A phaser that has come apart or a damaged trigger wheel gives an unreadable signal from a good sensor.
A failed module driver or reference voltage supply
Rare, and only worth considering once the sensor, the connector and the wiring have all been proven.
What to check, in order
Check whether other sensors sharing the same reference voltage have also set codes.
Several unrelated sensors failing together points at a shorted reference circuit rather than at this sensor. This code alone keeps the investigation local.
Unplug the connector and look inside it.
Oil in the connector is the fault and it will destroy a replacement sensor too. A dry, clean connector moves the fault to the sensor or the signal.
Watch the camshaft signal in live data while the engine is cranked.
A signal that appears and then drops out confirms an intermittent electrical fault. No signal at all with correct supply and ground at the connector confirms the sensor.
Check whether a camshaft to crankshaft correlation code is stored alongside this one.
A correlation code means the two signals are both present but disagree, which is timing rather than wiring, and no sensor will fix it. This code on its own keeps the fault electrical.
If the fault is heat related, repeat the live data check with the engine fully warm.
A signal that disappears only when hot is the sensor. A signal that stays solid when hot means the fault is being triggered by something else, most often the connector or a chafed wire moving with engine load.
Where this one turns up most
- Engines that leak oil at the cam sensor seal, where the connector fills over time and the fault returns after a sensor replacement.
- Vehicles past a hundred thousand miles with variable valve timing, where chain stretch starts to show up as timing codes.
Codes that often show up alongside it
What a DriveDecode adapter can read
A DriveDecode adapter reads engine and emissions systems: the powertrain and emissions codes the OBD-II standard requires on every US vehicle it covers. It does not read ABS, airbag (SRS), TPMS or transmission-specific manufacturer codes. Those need make-specific decoding that generic OBD-II hardware cannot do.
Reading P0340 on your own car
DriveDecode pulls P0340 straight off the vehicle along with the freeze frame the computer stored when it set: the coolant temperature, engine load and speed at that exact moment. That context is what separates a fault that happens on a cold start from one that happens under load, and it is the first thing the list above asks you to narrow down.
Last reviewed 2026-09-08. Definition sourced from the published standard.