P0340 — Camshaft Position Sensor A Circuit Bank 1 or Single Sensor
P0340 means the engine computer is not getting a usable signal from the camshaft position sensor — the sensor that tells it which stroke each cylinder is on — so starting and running suffer.
Severity: Medium · Can you keep driving? Only to a shop, if it runs at all. An engine that stalls or refuses to restart will leave you stranded; prompt repair is the sensible call.
What the P0340 code means
The crankshaft sensor tells the computer how fast the engine is turning and where the pistons are; the camshaft position sensor completes the picture by identifying which of the two crankshaft revolutions each cylinder is on — compression or exhaust. Sequential fuel injection and precise ignition timing both depend on that distinction, and variable valve timing control is built on top of it.
P0340 sets when the camshaft sensor's signal is absent, erratic, or implausible for a sustained period. Some engines tolerate it surprisingly well, substituting a guess strategy and merely cranking longer before starting; others stall, run roughly, or refuse to start at all, because they will not schedule injection without the cam signal.
The sensor is the headline suspect, but the circuit code deliberately covers the whole chain: sensor, its connector — often oil-soaked, since the sensor seals against the cam cover — the wiring, and the reluctor wheel the sensor reads. A stretched timing chain can also produce implausible correlation that presents like a sensor fault, so a new sensor that does not fix the code points at the timing drive, not at a second new sensor.
Symptoms of P0340
- Long cranking before the engine starts, or intermittent no-start
- Stalling, sometimes without warning, and not always restarting immediately
- Rough running, hesitation, and reduced power (limp strategy on many models)
- Tachometer dropping out or behaving erratically on some models
- Check engine light, sometimes with crankshaft sensor or timing correlation codes
What causes P0340?
- Failed camshaft position sensor — heat and age kill the Hall-effect or magnetic element. The most common cause, and fortunately usually one of the cheaper sensors on the engine.
- Oil-contaminated or corroded connector — the sensor seals into the cam cover with an O-ring that eventually weeps; oil wicks into the connector and corrupts the signal. Always inspect before replacing.
- Damaged wiring — the harness runs across the hot top of the engine; chafing, rodent damage, and heat-brittled insulation interrupt the signal intermittently — often why the fault comes and goes with temperature.
- Damaged reluctor (tone wheel) — a bent, cracked, or debris-covered target wheel on the camshaft produces a signal the computer cannot interpret, mimicking a dead sensor.
- Stretched timing chain or jumped timing — if the chain has elongated or skipped, the cam signal arrives at the wrong crank angle. The sensor is reporting honestly; the timing drive is the fault.
- Low cranking voltage — a weak battery or tired starter drags system voltage down during cranking, and marginal sensors drop out — worth ruling out when the code only appears at start-up.
How serious is P0340?
Unlike most codes here, P0340 can strand you. An engine that loses its cam signal may stall in traffic and decline to restart until it feels like it — and intermittency tends to get worse, not better. That unpredictability is the real severity, more than any mechanical damage.
If the root cause turns out to be the timing chain, the stakes rise: a chain that jumps further can put valves into pistons on interference engines. Rough running plus this code deserves a prompt appointment, and a car that has already stalled once should not be trusted for a long trip.
How much does it cost to fix P0340?
The sensor itself is usually accessible and modestly priced; the deeper causes are where costs climb. Typical US figures, parts and labor:
| Repair | Typical US cost (parts & labor) |
|---|---|
| Camshaft position sensor replacement | $150–$350 |
| Connector or harness repair | $150–$350 |
| Battery or starter correction (if voltage is the cause) | $150–$450 |
| Timing chain replacement (if the chain is the cause) | $1,200–$2,500 |
Prices are typical US ranges and vary by vehicle, location, and shop. Diagnosis usually costs $100–$150 and is often applied to the repair bill if you proceed at the same shop.
How P0340 is diagnosed and fixed
- Read all codes and freeze-frame data. Correlation codes (such as P0016) or VVT codes alongside point toward the timing drive; a lone P0340 points at the sensor circuit.
- Inspect the sensor connector for oil soak, corrosion, and terminal fit, and trace the harness for chafing or rodent damage.
- Check the sensor's power, ground, and reference voltage at the connector with the key on; a missing feed is a wiring fault, not a sensor fault.
- Scope the camshaft signal while cranking and running, ideally against the crankshaft signal: missing or ragged waveforms identify a failing sensor or damaged reluctor; a clean but shifted waveform identifies chain stretch.
- Verify battery and cranking voltage if the fault only occurs at start-up.
- Replace the failed component — sensor, connector pigtail, or timing drive — clear codes, and test through several hot restarts and a road test, since intermittents hide from cold checks.
Frequently asked questions
What causes a P0340 code?
Most often the camshaft position sensor itself, followed by its oil-soaked or corroded connector and damaged wiring. Less often, the reluctor wheel it reads is damaged, battery voltage during cranking is too low, or a stretched timing chain has shifted the signal out of its expected window.
How much does it cost to fix P0340?
A replacement sensor typically costs $150–$350 fitted, and connector or harness repairs are similar. If diagnosis leads to the timing chain, expect $1,200–$2,500. Testing the signal first is what keeps this a cheap code. Prices vary by vehicle, location, and shop.
Can I drive with P0340?
If the engine starts and runs, a gentle drive to a shop is reasonable. But this fault can stall the engine or prevent a restart without warning, so do not rely on the car for anything important until it is repaired — and tow it if it has already stranded you once.
Will the car start with a bad camshaft sensor?
Depends on the model. Many engines fall back to a batch strategy and start after longer cranking; others will not run at all without the cam signal. Either way, intermittent no-starts are a hallmark of this code and a good reason to fix it promptly.
Can a timing chain cause P0340?
Yes. A stretched chain or worn guides shift the camshaft's signal relative to the crankshaft until the computer finds it implausible. The giveaway is a new sensor that does not cure the code, or correlation codes stored alongside — at that point the chain, not the sensor, needs attention.
Related codes
More in this system: Powertrain codes · Full codes list