- System
- Powertrain
- Type
- Generic (SAE)
- Subsystem
- Ignition system or misfire
- Urgency
- Fix soon
Trouble code
P0340 code: Camshaft position sensor A circuit (bank 1)
Published
Short answer
P0340 means the engine computer is not seeing a correct signal from camshaft position sensor A on bank 1. The most common causes are a failed sensor, a damaged or oil-soaked connector, or broken wiring. Less often the cause is mechanical, such as a damaged reluctor or a timing chain or belt that has jumped. Expect hard starting or stalling, and fix it soon.
Scan tools that read P0340 and more
All 7 picks compared
TOPDON ArtiDiag600 Pro: all systems, 9 services
See price on AmazonSee it on Amazon
THINKCAR THINKSCAN 662: active tests under $200
See price on AmazonSee it on Amazon
Autel MaxiDiag MD906 PRO: all systems, 11 services
See price on AmazonSee it on Amazon
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.
P powertrain, B body, C chassis, U network
0 generic (same on every car), 1 set by the maker
For P codes: 4 means auxiliary emission controls
The exact fault: here, catalyst efficiency, bank 1
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.
| Cause | How to check | Typical fix |
|---|---|---|
| Loose, corroded or oil-soaked connector | Unplug and inspect; oil in the connector can wick from a leaking sensor O-ring or valve cover | Clean or replace connector, fix the oil leak |
| Damaged wiring | Look for chafing near hot or moving parts; check reference voltage, ground and signal with a multimeter | Repair the wiring |
| Failed camshaft position sensor | Check signal with a scope or graphing meter while cranking, or compare to spec | Replace the sensor |
| Weak battery or starter causing low cranking speed | Test battery and charging system | Charge or replace battery |
| Damaged reluctor or cam target wheel | Inspect through the sensor hole if possible | Replace the damaged part |
| Timing chain or belt stretched or jumped | Look for cam/crank correlation codes; verify timing marks per service information | Timing component repair |
| Engine computer fault (rare) | Only after sensor and circuit test good | Repair or replace per service information |
How to diagnose P0340
- 1
Read all codes and save the freeze frame. Note whether the code set while cranking or while driving.
- 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
Test the battery. Low cranking voltage can make the sensor signal too weak.
- 4
Inspect the sensor connector and wiring for oil, corrosion and damage.
- 5
With the key on, check the sensor's reference voltage and ground at the connector using the wiring diagram for your vehicle.
- 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
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.
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.
Related codes
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
See price on AmazonAmazonTOPDON ArtiDiag600 Pro: all systems, 9 services
From Best OBD2 scanners for DIY mechanics who fix their own cars
See price on AmazonAmazonXTOOL D7S: CAN FD for newer GM, crankshaft relearn
See price on AmazonAmazonXTOOL D7W: WiFi VCI, 4000+ active tests