OBD-II trouble code
P0340: Camshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)
The engine computer detected a circuit fault with the camshaft position sensor. The engine may hard-start, run rough, or refuse to start — the cam sensor tells the ECM which stroke each cylinder is on for fuel injection timing.
Quick facts
- System
- Powertrain
- Category
- Sensors / Timing
- Severity
- High severity
- Drivable
- Usually safe to drive short-term
- Repair cost range
- $150 – $500
- DIY difficulty
- Intermediate DIY
What does P0340 mean?
The camshaft position sensor reports the rotational position of the camshaft to the engine control module (ECM). The ECM uses the cam signal together with the crankshaft position signal to determine which cylinder is on its compression stroke at any moment, so it can fire the correct ignition coil and pulse the correct fuel injector. On modern sequential fuel injection systems, an accurate cam signal is essential for proper engine operation.
P0340 is set when the ECM detects a circuit-level fault with the camshaft position sensor — no signal, an erratic signal, or a signal that doesn't match expected patterns. The code typically applies to the Bank 1 intake camshaft sensor, or the only cam sensor on single-cam engines (the "A" sensor designation is the primary sensor).
The most common cause is a failed camshaft position sensor, especially on vehicles past 100,000 miles. After the sensor itself, the next likely causes are damaged wiring, a corroded connector, a damaged tone ring on the camshaft, or oil contamination. Many vehicles will run with P0340 set because the ECM can fall back to using the crank sensor alone and run all injectors and coils in batch fire mode — but performance suffers and starting becomes unreliable.
Common causes
- Failed camshaft position sensor (most common after 100,000 miles)
- Damaged or chafed sensor wiring
- Corroded or loose sensor connector
- Oil leak contaminating the sensor (common on engines with leaking cam plug or valve cover gasket)
- Damaged tone ring or reluctor on the camshaft
- Blown fuse on the cam sensor circuit
- Timing chain stretch (causes signal pattern to fail correlation testing)
- Faulty ECM input circuit (rare)
Symptoms
- Check engine light is on
- Hard starting or extended cranking before the engine fires
- Engine may not start at all in severe cases
- Stalling and rough running
- Reduced power and poor throttle response
- Possible misfires across cylinders (ECM can't sequence injectors correctly)
- Worse fuel economy
- Possible companion code P0341 (range/performance)
Diagnostic steps
- 1.Inspect the cam sensor connector and visible wiring for damage, corrosion, or oil contamination. Oil at the sensor often points to a leaking cam plug or valve cover gasket.
- 2.Check the cam sensor circuit fuse.
- 3.Use a scan tool to monitor the cam sensor signal during cranking. A flat reading or wildly inconsistent output confirms a sensor or wiring issue.
- 4.Test sensor resistance and reference voltage at the connector with the engine off.
- 5.Inspect the tone ring on the camshaft for damaged or missing teeth.
- 6.If wiring, connector, and power tests pass, replace the camshaft position sensor.
- 7.If P0340 returns after a new sensor and clean wiring, evaluate the timing chain for stretch.
Repair cost
$150 – $500
Camshaft position sensor replacement is $150 to $500 in parts and labor. The sensor itself is $40 to $200; labor varies based on accessibility — some sensors are easy to reach, others require removing intake plenums or other components. If oil is contaminating the sensor, expect to fix the oil leak source (cam plug or valve cover gasket) for an extra $100 to $400.
Estimate your repair
Run the numbers for your vehicle
Open the Repair Cost Estimator with camshaft position sensor replacement preselected. Adjust labor rate and vehicle category to fit your situation.
DIY vs shop
This is an intermediate DIY job. It usually involves diagnostic steps, specialty parts, and some careful work in tight spaces. If you have the tools and a service manual or trustworthy video for your specific vehicle, it is achievable in a weekend. Otherwise, a competent independent shop will be faster.