P0340

P0340 code: Camshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)

The camshaft position (CMP) sensor tells the computer where the camshaft is, so it can time fuel injection and, on many engines, variable valve timing.

Moderate severityEngine sensorsEst. repair $100 - $400
What it meansCamshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)
Can I drive?Often drivable, but stalling is possible.
Most likely fixReplace the camshaft position sensor

What does P0340 mean?

The camshaft position (CMP) sensor tells the computer where the camshaft is, so it can time fuel injection and, on many engines, variable valve timing.

The computer has detected an electrical fault in this sensor circuit.

Codes are a starting point. They tell you which test failed, not which part to replace. Check for other stored codes and fix those in a sensible order.

Symptoms

  • Check engine light
  • Hard or long cranking
  • Stalling
  • Rough running
  • Reduced power

Common causes

  • Open or shorted wiring
  • Corroded connector
  • Failed sensor

How to diagnose P0340

  1. Inspect connector and harness.
  2. Check the signal with a meter or scope.
  3. Replace the sensor after wiring checks out.
  4. Check for P0016-P0019 correlation codes, which point at timing rather than the sensor.
  5. Inspect the connector for oil and corrosion.

How to fix it

  • Replace the camshaft position sensor
  • Repair wiring
  • Inspect timing components if correlation codes are present

Estimated repair cost

Likely repairs for P0340 run from about $100 to $400, depending on the cause.

RepairTypical range (parts + labor)
Diagnostic fee (scan + testing)$100 - $200
Camshaft position sensor$100 - $300
Wiring/connector repair$100 - $400

These are rough US estimates for an independent shop in 2026, based on typical parts prices and standard labor times. Dealers, big trucks, luxury brands and high-cost areas often run higher. They are not quotes. Use the repair cost estimator to adjust for your vehicle.

How serious is P0340?

Moderate severity

Often drivable, but stalling is possible. Fix it soon.

Make-specific notes

Nissan

Some Nissan models have had recalls or service campaigns for cam and crank sensors tied to stalling. Check for open recalls by VIN first.

Ford

On some Ford engines, a P0340 after a timing job means the sensor or reluctor was disturbed.

Always check open recalls and technical service bulletins for your VIN.

P0340 FAQ

What does P0340 mean?

P0340 stands for "Camshaft Position Sensor "A" Circuit (Bank 1 or Single Sensor)". The camshaft position (CMP) sensor tells the computer where the camshaft is, so it can time fuel injection and, on many engines, variable valve timing.

Can I drive with a P0340 code?

Often drivable, but stalling is possible. Fix it soon.

How much does it cost to fix P0340?

It depends on the cause. The likely repairs for P0340 range from about $100 to $400 at an independent shop in the US, plus a diagnostic fee of roughly $100-$200. These are rough estimates; dealer prices and some vehicles run higher.

What is the most common cause of P0340?

The most common causes are: open or shorted wiring; corroded connector; failed sensor.

Related codes