Diagnostics

P0340 Code: Camshaft Position Sensor Circuit Malfunction

Anthony CalhounASE Master Tech7 min read
Try the AI Diagnostic Assistant — Join Free

P0340 Code — Camshaft Position Sensor A Circuit (Bank 1)

P0340 means the PCM detected a problem in the camshaft position sensor circuit on Bank 1, Sensor A — specifically, it is not getting the signal it expects. Not a bad signal. Not an out-of-range signal. No signal, or a signal that never transitions the way it should. That distinction matters when you pick up your test lead. A circuit fault is different from a performance fault, and the related codes — P0341, P0342, P0343 — tell you exactly which version of "wrong" you are dealing with.

This code sets because the PCM depends on the camshaft position sensor for three critical jobs: timing sequential fuel injection, controlling variable valve timing (VVT), and cross-referencing camshaft position against crankshaft position to detect misfires accurately. When the CMP signal drops out, all three of those functions are impaired simultaneously. On some platforms, a no-start condition results. On others, the engine starts and runs poorly in a failsafe mode with injection defaulted to a batch-fire strategy and VVT locked out.

P0340 is not the hardest code to diagnose, but it catches techs who skip steps. The sensor itself fails — but so does the wiring, the connector, the reluctor ring, and the timing chain. A scope is the tool that tells you which one you are dealing with. A parts cannon is not.

What the Camshaft Position Sensor Actually Does

The PCM already knows where the crankshaft is at all times — that is the job of the crankshaft position sensor (CKP). What the CMP sensor adds is camshaft position reference. On a four-stroke engine, the cam completes one full rotation for every two crank rotations. Without CMP input, the PCM knows piston position but cannot determine which stroke the engine is on — compression or exhaust. It cannot distinguish firing order or time sequential injection correctly.

Here is what the CMP signal is actually used for:

  • Sequential fuel injection timing: Modern engines inject fuel directly into each cylinder individually, timed to the intake stroke. Without CMP reference, the PCM falls back to batch fire — injecting all cylinders at once, which wastes fuel and increases emissions.
  • Variable valve timing control: Any VVT or variable camshaft timing system uses the CMP signal as the feedback loop. The PCM commands a cam timing advance or retard, and then watches the CMP signal to verify the cam actually moved to the correct position. No valid CMP signal means VVT cannot operate in closed loop.
  • Misfire detection correlation: The PCM detects misfires by monitoring small RPM variations at the crankshaft. To assign a misfire to a specific cylinder, it cross-references crank position against cam position. Without accurate CMP data, cylinder-specific misfire detection becomes unreliable.

Sensor Types: Hall Effect vs. Magnetic Reluctance

Before you touch a test lead, know which type of sensor you are working with. The diagnostic approach is different for each.

Hall Effect Sensors (3-Wire)

Hall effect sensors require an external power supply to operate. They have three wires: a reference voltage (typically 5V or 12V from the PCM), a ground, and a signal wire. Internally, the sensor contains a semiconductor that responds to the magnetic field changes as reluctor ring teeth pass the sensor tip. The output is a clean digital square wave — the signal switches between near-zero volts and reference voltage as each tooth passes.

Because Hall effect sensors need power to produce a signal, power supply and ground integrity are part of your diagnostic. A sensor with good power and ground but no signal output is a dead sensor. A sensor with missing power or a broken ground never had a chance to work — do not condemn the sensor until you verify those first.

Magnetic Reluctance Sensors (2-Wire)

Magnetic reluctance sensors — also called variable reluctance (VR) sensors — generate their own alternating current signal as reluctor ring teeth pass through the magnetic field around the sensor tip. They need no external power supply. The output is an analog sine wave, not a digital square wave, and the amplitude of that wave increases with engine speed. At cranking speeds the signal may be only a few hundred millivolts; at highway speeds the same sensor may produce several volts AC.

The two-wire design means your only measurements are signal amplitude and frequency. There is no reference voltage or ground to check separately. A shorted or open wire goes straight to no signal. A weak signal that drops out at certain speeds can indicate a worn reluctor ring or excessive air gap between the sensor tip and the ring.

Where the Sensor Lives and What It Reads

The CMP sensor for Bank 1 Sensor A is typically mounted on the cylinder head, the valve cover, or the front timing cover — positioned to read a reluctor ring on the camshaft itself or on the camshaft sprocket. On overhead cam engines, it is most commonly found at the front or rear of the head near the cam journal area. On pushrod engines with a camshaft in the block, the sensor often reads a single trigger wheel on the cam gear behind the timing cover.

The reluctor ring is a toothed wheel — sometimes a separate pressed-on ring, sometimes machined directly into the cam sprocket. It typically has one or more missing teeth or a unique tooth spacing that creates a distinct pattern in the CMP signal. The PCM reads that pattern to establish cam phase angle. If the reluctor ring is cracked, missing a tooth, or coated in debris, the signal pattern breaks down even when the sensor and wiring are both good.

Common Causes of P0340

These are the causes you will see most often in the shop, in approximate order of frequency:

  • Failed camshaft position sensor: The sensor element itself fails internally. Hall effect sensors often fail by losing their output signal entirely. VR sensors can develop open coils. On most applications this is the most common cause, but it should be confirmed with a scope, not assumed.
  • Damaged wiring or connector: Chafed wires, corroded terminals, and broken connector locks are extremely common on sensors mounted near the valve cover or timing cover where heat and vibration are constant. On some platforms, the CMP sensor connector sits directly in the path of oil runoff from a valve cover leak — the combination of heat and oil destroys the terminal plating over time.
  • Oil contamination at the connector: This is the most commonly missed physical cause. A leaking valve cover gasket can channel engine oil directly into the CMP sensor connector. The oil displaces air, creates a conductive path across the terminals, and degrades the signal. In some cases the connector looks oily externally but the pins look fine — pull the connector and inspect the cavity. You will often find oil pooled inside. Replacing the sensor without sealing the valve cover leak is a guaranteed comeback.
  • Timing chain stretch causing signal correlation errors: A stretched timing chain retards the actual cam timing relative to what the crank position indicates. The PCM may see a CMP signal that is retarded beyond the expected range and store both P0340 and a correlation code like P0016 or P0017. This is not truly a sensor failure — the sensor is reporting accurately, but the chain has allowed the cam to drift out of expected phase. Replacing the sensor does nothing. The chain needs replacement.
  • Damaged reluctor ring: Cracked or missing teeth on the cam tone wheel produce a corrupted signal pattern. The PCM may interpret the missing pulse as a circuit fault. Scope the signal — if you see a consistent pattern with one tooth missing or irregular spacing, the reluctor ring is the issue, not the sensor or wiring.
  • VVT solenoid fault or restriction: On VVT-equipped engines, a stuck VVT solenoid or restricted oil passage can cause the cam to sit in a position outside the range the PCM expects at startup. The PCM may store P0340 because the initial CMP position at startup does not match its startup reference map. In this scenario, a VVT-related code will often accompany P0340 — check for P0010, P0011, P0012, or their Bank 2 equivalents.

Related Codes — Know the Family

P0340 is one member of a related code family. Where P0340 lands tells you what kind of fault the PCM detected:

  • P0340 — CMP Sensor A Circuit (Bank 1): Generic circuit fault — the PCM is not getting a usable signal. Could be no signal at all or a signal that never transitions.
  • P0341 — CMP Sensor A Circuit Range/Performance: The PCM is getting a signal, but it does not match expected timing or pattern. Common with timing chain stretch — the signal is present but phase is wrong.
  • P0342 — CMP Sensor A Circuit Low Input: Signal voltage is lower than the minimum expected threshold. Points toward an open circuit, poor ground, or a dead sensor on a Hall effect application.
  • P0343 — CMP Sensor A Circuit High Input: Signal is stuck high — above expected threshold without transitioning. Often indicates a shorted signal wire or a sensor output that is not switching properly.
  • P0345 — CMP Sensor A Circuit (Bank 2): Same fault family, opposite bank. On V-engines with VVT on both banks, comparing Bank 1 and Bank 2 CMP signals side-by-side on a scope is a fast way to confirm whether one cam has drifted or one sensor has failed.

If you have P0340 alongside P0016 or P0017 (CKP-CMP correlation codes), the chain is where you need to look, not the sensor. If you have P0340 alongside P0010 or P0011 (VVT control circuit or over-advanced timing), start at the VVT system before touching the CMP sensor.

The CKP-CMP Correlation — What the PCM Is Actually Watching

Understanding this relationship is what separates a tech who diagnoses P0340 correctly from one who guesses.

The PCM holds a calibrated table of the expected phase relationship between the crankshaft position and camshaft position at any given operating condition. At idle, the cam should be at a certain angle relative to TDC on the crank. Under load, the VVT system advances or retards that angle based on the commanded target. The PCM continuously compares the actual CMP signal phase to its expected value.

When a timing chain stretches, it introduces mechanical slop between the crank and the cam sprocket. That slop allows the cam to physically rotate ahead of or behind where the crank says it should be. The CMP sensor reports the cam's actual position accurately — the problem is that position no longer matches the PCM's expected phase map. The PCM may store P0341 (performance/range fault) or P0016/P0017 (correlation fault), and on some platforms will escalate to P0340 if the deviation is severe enough.

On a scope, you can see this directly. Set up dual channels — Channel 1 on the CKP signal, Channel 2 on the CMP signal. Trigger on the CKP. On a healthy engine, the CMP pulse always appears at a consistent position relative to the CKP reference tooth, within the VVT operating range. On an engine with chain stretch, the CMP pulse shifts consistently late relative to the CKP. That late shift is the chain. It will not go away when you replace the CMP sensor.

VVT System Interaction — When the Camshaft Control System Is the Real Problem

On any engine with variable valve timing, the VVT system and the CMP sensor are tightly linked. The PCM commands cam advance or retard through the VVT oil control solenoid (also called the cam phaser solenoid or oil control valve). Engine oil pressure drives the cam phaser actuator on the sprocket. The CMP sensor provides feedback to close the loop.

Here is where P0340 can come from the VVT system rather than the sensor itself:

  • Stuck VVT solenoid in the retarded or advanced position: If the solenoid sticks or fails in a position that holds the cam phaser at maximum retard or advance, the cam may sit outside the range the PCM expects at key-on. The initial CMP signal position at startup is outside the expected window and P0340 or P0341 sets. The sensor is fine. The solenoid needs attention.
  • Restricted oil passage to the cam phaser: Sludge buildup or a partially blocked oil passage starves the cam phaser of hydraulic pressure. The phaser cannot respond to PCM commands and may default to a position that creates a correlation or circuit fault. This is common on high-mileage engines with infrequent oil change history. Confirm oil pressure at the phaser feed port before condemning the solenoid.
  • Failed cam phaser actuator: The cam phaser itself — the sprocket-mounted actuator that physically rotates the cam relative to the sprocket — can wear internally or lock up. A locked phaser creates a fixed, incorrect cam position that produces a range/performance code and may accompany P0340 on some calibrations. On some platforms, a worn phaser makes a characteristic rattle at cold start that disappears as oil pressure builds.

The diagnostic tell for VVT involvement is a VVT command test. On most professional scan tools, you can command the VVT solenoid to a target advance angle and watch the CMP signal response on a scope. A healthy cam phaser actuated by a good solenoid will advance the cam smoothly, and you will see the CMP pulse shift relative to the CKP in real time. No response to the command means the VVT system is not functioning — the CMP sensor itself is likely fine.

Diagnostic Approach — Scope Before You Swap

The right tool for P0340 is an oscilloscope. A test light and a multimeter will get you partway there, but a scope tells you the complete story in seconds.

Step 1 — Pull All Codes and Document Freeze Frame

Before anything else, pull every code stored across all modules, not just the PCM. Note any VVT codes (P0010–P0014, P0025), correlation codes (P0016–P0019), and U-codes. Check the freeze frame data on P0340 — engine speed, coolant temp, and operating condition at the time of the fault tell you whether it set at startup, at idle, or under load.

Step 2 — Physical Inspection of the Sensor and Connector

Locate the Bank 1 CMP sensor. Before unplugging anything, look at the connector. Is there evidence of oil contamination? Is the connector fully seated? Are any wires chafed against exhaust or sharp edges? Pull the connector and inspect the terminal cavities. On Hall effect sensors, look for greenish corrosion on the reference voltage and ground pins. Clean contaminated connectors with electrical contact cleaner before condemning the sensor — oil contamination inside a connector can cause intermittent circuit faults that mimic a failed sensor.

Step 3 — Verify Power and Ground on Hall Effect Sensors

With the connector unplugged, back-probe the connector at the harness side. Verify the reference voltage pin has the correct supply voltage (5V or 12V depending on the application — check the service information). Verify the ground pin has less than 0.1V drop to battery negative with the key on. Missing reference voltage points to a PCM output driver issue or an open wire. High voltage drop on the ground side points to a poor ground path — check the sensor ground routing back to the PCM ground.

Step 4 — Scope the CMP Signal

Reconnect the sensor. Back-probe the signal wire at the connector and connect your scope. Crank the engine or run it at idle. On a Hall effect sensor, you should see a clean square wave transitioning between near-zero and near-reference voltage. Look for:

  • A signal that never transitions — stuck high or stuck low — pointing to a failed sensor or wiring short
  • A signal with irregular or missing pulses — pointing to a damaged reluctor ring
  • A signal with excessive noise or rounded edges — pointing to a ground quality problem or a failing sensor
  • A signal that is present and clean but phase-shifted relative to the CKP — pointing to timing chain stretch or a stuck cam phaser

Compare what you see against a known-good waveform for that specific engine. Most professional scan tool software and OEM service platforms have reference waveform libraries. A waveform that looks "close" may still be outside the PCM's acceptance window.

Step 5 — Check CKP-CMP Correlation on Scope

Add the CKP signal on a second channel. Compare the phase relationship between the CKP reference tooth pattern and the CMP pulse. On a healthy engine the relationship is consistent and repeatable. Phase shift that is consistently late on the CMP side indicates timing chain stretch. If you see this, order a timing chain kit before ordering a CMP sensor.

Step 6 — Command VVT and Observe CMP Response

If the engine has VVT and the CMP signal is present but the code persists or a performance code is stored alongside P0340, use your scan tool to command VVT advance while watching the CMP signal on the scope. Verify the cam phase angle changes in response to the command. No response confirms a VVT system problem — solenoid, oil passage restriction, or phaser actuator.

Real Shop Scenarios

Scenario 1 — The Sensor That Was Not the Problem

A 2014 Ford F-150 with the 3.5L EcoBoost comes in with P0340 and a complaint of rough idle and low power. The previous shop replaced the Bank 1 CMP sensor — code came back. Scope the signal: the waveform is present, clean, and strong. Set up the CKP on Channel 1. The CMP pulse is consistently 15 degrees late relative to where it should be at idle. P0016 is also stored in the freeze frame data the previous shop apparently ignored. Timing chain stretch. New CMP sensor did nothing because the sensor was doing its job correctly — the chain had allowed the cam to drift. Timing chain kit, both sides, oil control solenoid screens cleaned. Problem solved.

Scenario 2 — Oil Contamination Comeback

A 2010 Honda Accord 2.4L comes in with P0340 set intermittently. Tech replaces the CMP sensor. Two weeks later it comes back with the same code. Pull the connector on the new sensor — oil pooled in the connector cavity. Valve cover gasket is seeping and the oil is channeling directly down into the sensor connector. The new sensor is already contaminated. Replace the valve cover gasket, clean the connector, seal the sensor mounting area. The code does not return.

Scenario 3 — VVT Solenoid, Not the Sensor

A 2012 Toyota Camry 2.5L sets P0340 and P0011 (camshaft position over-advanced, Bank 1). The VVT solenoid is commanded to a target angle at idle — the CMP signal on the scope does not move. The cam stays in a fixed advanced position. The solenoid is not responding to the command. Solenoid resistance check: within spec. Check the oil control solenoid screen — completely blocked with sludge. The solenoid cannot flow oil to retard the phaser. Solenoid screen cleaning and oil change resolve the issue. The CMP sensor was never the problem.

Frequently Asked Questions

Can P0340 cause a no-start?

Yes, on many platforms it can. The PCM requires a CMP signal during cranking to establish cam phase reference for sequential injection. If the CMP signal is completely absent — dead sensor, open circuit, or a connector that fell apart — some PCMs will not allow injection or will allow the engine to crank without starting. Others will default to a batch-fire startup strategy and the engine may start and run poorly. Whether you get a no-start or just a rough-running condition depends on the specific PCM calibration and how severely the signal is degraded.

Can I drive with P0340 set?

It depends on how severe the fault is. If the engine starts and runs, VVT is typically locked out in a fixed position, sequential injection may be defaulted to batch fire, and fuel economy and emissions will be worse than normal. Long-term, running without valid CMP feedback puts additional stress on the VVT system and may affect catalytic converter efficiency due to injection timing errors. Diagnose and repair it as soon as practical — it is not an emergency the way a brake fault would be, but it is not something to ignore for months either.

Is P0340 the same as P0341?

No. P0340 is a circuit fault — the PCM is not getting a signal it can use at all. P0341 is a range or performance fault — the PCM is getting a signal, but it does not match expected timing or pattern. P0341 is more commonly associated with timing chain stretch or VVT system issues where the sensor is working but the cam has moved to an unexpected position. P0340 points more directly at wiring, connector, or sensor failure. Both codes can result from serious mechanical causes, so do not skip the scope step on either one.

Will replacing the CMP sensor fix timing chain stretch?

No. A stretched timing chain causes a correlation problem — the cam is physically in the wrong position relative to the crank. The CMP sensor is accurately reporting that wrong position. Replacing the sensor does not change the cam's physical position. The chain needs replacement. If you see P0340 or P0341 alongside P0016 or P0017 on the scope, stop chasing the sensor and start building a timing chain estimate.

How do I tell a Hall effect sensor from a magnetic reluctance sensor without looking it up?

Count the wires at the connector. Two wires means magnetic reluctance — signal and ground, no power supply needed. Three wires means Hall effect — power, ground, and signal. When in doubt, confirm in the vehicle service information before probing. Applying voltage to a two-wire VR sensor will damage it.

Related Articles

Test Your Knowledge

Free ASE Practice Test

10 real exam-format questions — Standard, Technician A/B, and EXCEPT formats. Master tech explanations for every answer.

Study for ASE Certification

ASE AI Study Tutor — $9.99/mo

Your personal AI study partner for ASE certification. Covers A1 through A8 — asks you questions, explains what you got wrong, and drills you until you pass. Built by a 25-year ASE Master Tech.

Start Studying

Disclaimer: This article is for educational and informational purposes only. Technical specifications, diagnostic procedures, and repair strategies vary by manufacturer, model year, and application — always verify against OEM service information before performing repairs. Financial, health, and career information is general guidance and not a substitute for professional advice from a licensed financial advisor, medical professional, or attorney. APEX Tech Nation and A.W.C. Consulting LLC are not liable for errors or for any outcomes resulting from the use of this content.