Trouble code

P0340 code: Camshaft position sensor A circuit (bank 1)

Published

Scan tools that read P0340 and more

All 7 picks compared

This page is for drivers dealing with P0340, often along with a long crank, stalling or a car that will not start. The camshaft position sensor tells the computer where the valves are, so the engine can time fuel and spark. Below we explain what the code means, the symptoms, the causes in checking order, how to test the sensor and circuit, and when the problem might be mechanical timing rather than a sensor.

What P0340 means

P0340 is a generic SAE J2012 code: Camshaft Position Sensor A Circuit (Bank 1 or Single Sensor). Under the SAE convention, sensor A is usually the intake camshaft, front or left. Bank 1 is the side with cylinder 1.

The computer compares the cam signal with the crankshaft signal to know which cylinder is on its compression stroke. If the cam signal is missing, erratic or out of range, it sets P0340. Many engines can still run on the crank signal alone, but starting may take longer because the computer has to guess cylinder position. Decode related codes with the code decoder.

Symptoms of P0340

  • Check engine light on
  • Long cranking before the engine starts
  • No start on some vehicles
  • Stalling or stumbling, especially when warm
  • Rough running or reduced power
  • Lower fuel economy

Common causes of P0340

Start with the sensor and its wiring, which cause most P0340 codes, before looking at mechanical timing.

How to diagnose P0340

  1. 1

    Read all codes and save the freeze frame. Note whether the code set while cranking or while driving.

  2. 2

    Look for related codes. A crank sensor code such as P0335, a correlation code like P0016, or cam timing codes like P0011 and P0014 change the direction of the diagnosis.

  3. 3

    Test the battery. Low cranking voltage can make the sensor signal too weak.

  4. 4

    Inspect the sensor connector and wiring for oil, corrosion and damage.

  5. 5

    With the key on, check the sensor's reference voltage and ground at the connector using the wiring diagram for your vehicle.

  6. 6

    Watch the cam sensor or sync status in live data while cranking or idling if your scan tool supports it. A scope or graphing multimeter shows a missing or erratic signal clearly.

  7. 7

    If the sensor and circuit test good and correlation codes are present, have the mechanical timing checked.

Note.Keep hands, tools and loose clothing away from belts and fans when testing with the engine running. If timing components need work, that job is best left to an experienced mechanic.

How to fix P0340

Most P0340 repairs are a sensor, a connector or a wiring fix. On many engines the cam sensor is held by a single bolt and is easy to reach; on others it sits behind other parts. Use a quality sensor, replace the O-ring, and fix any oil leak that soaked the connector.

If the sensor is replaced and the code returns, do not keep swapping parts. Verify the wiring and the signal, and check mechanical timing. Clear the code after the repair and confirm the engine starts normally. A scanner with live data and sync status helps; compare options in OBD2 scanners for DIY mechanics.

Compare scanners with live sensor data →

Can you drive with P0340?

Carefully, and not for long. The engine may stall without warning, which is dangerous in traffic, and it may refuse to restart. If the car starts and runs well, drive it directly to be repaired.

If the cause turns out to be a jumped timing chain or belt, continued driving can cause serious engine damage on some engines. See can you drive with the check engine light on.

Look at P0335 for the crankshaft sensor, P0016 for cam/crank correlation, and P0011 and P0014 for cam timing on engines with variable valve timing. Misfires from poor timing can also set P0300.

Frequently asked questions

Can P0340 cause a no start? Yes, on some engines. Many will start after a longer crank, but some need the cam signal to start at all.

Is P0340 always the sensor? No. Wiring, connectors and low battery voltage are common, and timing problems are possible. Test before you buy parts.

What is the difference between P0340 and P0335? P0340 is the camshaft position sensor circuit; P0335 is the crankshaft position sensor circuit.

Do I need to relearn anything after replacing the cam sensor? On many vehicles no, but some require a relearn procedure. Check the service information for your vehicle.

What you need for this