Camshaft position · Engine code
P0340: Camshaft Position Sensor A Circuit (Bank 1 or Single Sensor)
The engine computer isn't receiving a usable signal from the camshaft position sensor, which tells it where the valves are so it can time fuel and spark.
What this code means
The camshaft position (CMP) sensor reads a toothed wheel or notches on the camshaft. Together with the crankshaft sensor, it lets the computer know exactly which cylinder is on its compression stroke, so it can fire the right injector and spark plug at the right time.
P0340 is a circuit code: the signal is missing or electrically wrong, rather than just slightly off. Related codes narrow it down. P0342 means the signal voltage is too low, P0343 too high, and P0345, P0365 and P0390 are the same kind of fault on other cam sensors (bank 2, or the second sensor on a bank).
Many engines can keep running on the crankshaft sensor alone in a backup mode, which is why the car may still drive. Starting is where you'll usually notice it.
Symptoms you may notice
- Long cranking before the engine starts, or no start
- Stalling, especially when warm
- Rough running or hesitation
- Reduced power (limp mode) on some vehicles
- Check engine light
Common causes, most likely first
- Failed camshaft position sensorThe most common cause. Sensors often fail with heat, and may work cold and quit when the engine warms up.
- Damaged wiring or connectorChafed wires, a loose connector, or oil soaked into the connector from a leaking seal.
- Weak battery or poor groundThe sensor needs a steady reference voltage. Low system voltage during cranking can trigger it.
- Timing chain or belt problemA jumped or badly stretched timing chain can make the signal look wrong. Usually comes with crank/cam correlation codes like P0016.
- Damaged reluctor (the toothed target the sensor reads)Rare, but possible after timing work.
What to check first
- Check for other codes. P0016–P0019 alongside P0340 points toward timing, not just the sensor.
- Inspect the sensor connector and wiring for oil, corrosion, broken locks or rubbed-through insulation.
- Check battery health and the main grounds, especially if the car is slow to crank.
- A shop can watch the sensor signal live with a scan tool or scope. If the signal drops out when warm, the sensor is the likely culprit.
- If timing work was done recently, confirm the sensor was reconnected and the timing marks are correct.
Typical repairs and rough cost
| Repair | Typical cost | Notes |
|---|---|---|
| Camshaft position sensor | $100–$300 | Part is often $20–$100; usually easy to reach. |
| Wiring or connector repair | $100–$300 | Depends on where the damage is. |
| Timing chain or belt job | $800–$2,500+ | Only if timing has actually jumped or stretched. |
Rough US shop prices for parts and labor. Your cost depends on the vehicle, the parts brand and local labor rates.
Official code definitions
| Code | Applies to | Definition |
|---|---|---|
| P0340 | Generic | Camshaft Position Sensor A Circuit Bank 1 or Single Sensor |
| P0342 | Generic | Camshaft Position Sensor A Circuit Low Bank 1 or Single Sensor |
| P0343 | Generic | Camshaft Position Sensor A Circuit High Bank 1 or Single Sensor |
| P0345 | Generic | Camshaft Position Sensor A Circuit Bank 2 |
| P0365 | Generic | Camshaft Position Sensor B Circuit Bank 1 |
| P0390 | Generic | Camshaft Position Sensor B Circuit Bank 2 |
“Generic” codes mean the same thing on every make. Manufacturer entries are that brand’s own description. Look up any other code in the code library.
Common questions
Can a bad cam sensor stop the car from starting?
Yes. Some engines refuse to start without a cam signal; others start after extra cranking. It's one of the most common causes of a warm-engine no-start.
Should I buy an OEM sensor?
Cheap aftermarket cam and crank sensors have a reputation for failing early or reading slightly differently. A quality or OEM part is usually worth the small extra cost.
What's the difference between P0340 and P0341?
P0340 means the signal is missing or electrically wrong. P0341 means a signal is there but doesn't make sense compared with the crankshaft — which more often points to timing or a sensor that's starting to fail.
Related codes
This guide explains what the code usually means and how it’s typically diagnosed. Every car is different, and a code points to a system, not always a specific part. For anything affecting brakes, steering or a car that feels unsafe, have a qualified mechanic confirm before you rely on it.