Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0340 on 2011-2013 Subaru Forester: Camshaft Sensor Causes and Fixes

For a 2011-2013 Forester with the FB25B engine, P0340 almost always points to a failed Bank 1 (passenger side) intake camshaft position sensor. This is a very common failure and a relatively easy DIY fix with an OEM part costing around $80-$120. However, before replacing, check for simple issues like low engine oil, as the AVCS system is sensitive to oil level and condition.

17 minutes to read 2011-2013 Subaru Forester
Most Likely Cause
Failed Bank 1 Camshaft Position Sensor
Difficulty
2/5
Est. Time
1 hrs
DIY Doable?
✅ Yes
Shop Labor
$80 – $250
Parts Price
$30 – $120
⚠️ Drivable, but... — Continued driving can lead to stalling, no-start conditions, poor fuel economy, and potential damage to the catalytic converter from unburnt fuel. It is recommended to diagnose and repair the issue promptly to avoid being stranded.
Key Takeaways
  • P0340 on a 2011-2013 Forester refers specifically to the intake camshaft position sensor on the passenger side (Bank 1).
  • The most likely cause is a failed sensor, which is an accessible and affordable DIY replacement.
  • Before replacing parts, always check the engine oil level and inspect the sensor's wiring and connector for obvious damage.
  • If a new sensor doesn't fix the issue, the problem could be more complex, involving wiring, the alternator, or the timing chain system.
The trouble code P0340 stands for "Camshaft Position Sensor 'A' Circuit Malfunction". This means the Engine Control Module (ECM) has detected a problem with the signal from the camshaft position sensor for Bank 1. On a Subaru boxer engine, Bank 1 is the passenger side of the engine, where cylinder #1 is located. The ECM uses this sensor's signal to manage ignition timing, fuel injection, and the Active Valve Control System (AVCS). A bad signal can cause significant starting and running issues, and will typically illuminate the Check Engine Light and cause the cruise control light to flash.

What's Unique About the 2011-2013 Subaru Forester

The 2011 model year marked the introduction of the FB25B engine in the Forester, replacing the long-running EJ series. This DOHC (Dual Overhead Cam) engine has four camshaft position sensors in total, one for each intake and exhaust cam. P0340 specifically refers to the intake camshaft sensor on Bank 1 (passenger side). While sensor failure is the most common cause, early FB engines were subject to Technical Service Bulletins (TSBs) regarding incorrect sensor air gap, which can cause identical symptoms. Additionally, issues with the AVCS oil control solenoids or, in rare cases, timing chain stretch, can also trigger this code.

Symptoms You May Notice

  • Check Engine Light is on
  • Flashing cruise control light (a standard Subaru feature when a CEL is present)
  • Engine is hard to start or will not start at all (extended cranking)
  • Engine stalls, especially at low RPM or when coming to a stop
  • Rough idling and unstable engine performance
  • Loss of engine power and poor acceleration
  • Vehicle may enter "limp mode"
  • Noticeable decrease in fuel economy
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the crankshaft position sensor when only P0340 is present.
  • Replacing the ECM without thorough circuit testing.
  • Replacing the wrong camshaft position sensor (e.g., the driver's side sensor for Bank 2, or the exhaust sensor instead of the intake).
  • Assuming the sensor is bad without first checking engine oil level and condition.

Most Likely Causes

  1. Failed Bank 1 Camshaft Position Sensor 🔴 High Probability → Shop Engine Camshaft Position Sensor Sensors are electronic components that can fail over time due to heat cycles, vibration, and potential internal oil leakage. This is the most frequent failure point for this code on the FB25 engine.
    How to confirm: The sensor is located on the top front of the passenger-side cylinder head, held by a single 10mm bolt. 🎬 Watch: How to replace the sensor on a Subaru Forester. 🎬 See this walkthrough on locating and testing Subaru cam sensors. A diagnostic swap with the identical sensor from Bank 2 (driver's side) is a common tactic; if the code changes to P0345 (Cam Sensor 'A' Circuit Bank 2), the sensor is confirmed bad. A multimeter can also be used to check the sensor's resistance; a reading of around 1-4 kilo-ohms is expected when good.
    Typical fix: Replace the Bank 1 (passenger side) intake camshaft position sensor. It is highly recommended to use an OEM Subaru part, as some aftermarket sensors have been reported to fail quickly or not work at all.
    Est. part cost: $30-$120
  2. Wiring Harness or Connector Issue 🟡 Medium Probability The engine bay is a harsh environment. Wires can become brittle and crack, and connectors can become contaminated with oil or damaged. Rodent damage to wiring is also a known cause.
    How to confirm: Visually inspect the wiring and connector leading to the Bank 1 camshaft position sensor for any signs of damage, corrosion, loose pins, or rodent chew marks. Check for good pin fitment in the connector. If visual inspection is clear, a continuity test from the sensor connector to the ECM may be necessary.
    Typical fix: Repair the damaged section of wiring or clean/replace the electrical connector.
    Est. part cost: $5-$50
  3. Low or Dirty Engine Oil ⚪ Low Probability The AVCS (variable valve timing) system uses oil pressure to adjust cam timing. The FB25 engine can be sensitive to oil levels. Low or dirty oil can cause the oil control valve (OCV) to function improperly, leading the ECM to believe there is a cam sensor fault.
    How to confirm: Check the engine oil level and condition. A Forester owner on a forum reported their P0340 issue was resolved after topping off the oil which was found to be 3/4 of a quart low. If the oil is low or appears sludgy, this could be the cause.
    Typical fix: Top off or change the engine oil and filter using the manufacturer-specified grade (typically 0W-20 synthetic). Clear the code and see if it returns.
    Est. part cost: $40-$80

Rare But Worth Checking

  • Failing Alternator: A failing alternator with a bad diode or voltage regulator can produce electrical 'noise' (AC ripple) or unstable voltage. This can interfere with the sensitive signal from the camshaft position sensor, causing a false P0340 code without the sensor itself being faulty. This was confirmed by users on NASIOC and Reddit as the root cause in their cases. Diagnosis involves checking for fluctuating voltage at the battery while revving the engine; a dip into the 11s or instability is a bad sign. A more precise method is to use a multimeter or oscilloscope to measure AC ripple voltage, which should be below 50-100 mV at idle.
  • Stretched Timing Chain: → Shop Engine Timing Chain On higher mileage FB25B engines, the timing chain can stretch. This causes a slight mismatch between the camshaft and crankshaft positions that the ECM detects as a fault, potentially triggering P0340. This is a major repair and is often accompanied by other timing correlation codes like P0016 or P0341.
  • Faulty Oil Control Valve (OCV): A clogged or failing OCV (also called an AVCS solenoid) can prevent proper camshaft timing adjustment. This can be misinterpreted by the ECM as a sensor circuit fault. This issue is sometimes associated with codes like P0011.
  • Incorrect Camshaft Position Sensor Air Gap: → Shop Engine Camshaft Position Sensor Subaru TSB 11-130-13R specifically addresses this issue on FB engines. The clearance between the sensor and the reluctor teeth on the camshaft may be out of spec, causing a weak or inconsistent signal. The fix involves measuring the gap and installing a specific thickness shim to correct it.

Diagnosis Steps

  1. Verify the code with an OBD-II scanner. Note if the cruise control light is also flashing.
  2. Check the engine oil level and condition. Correct as necessary using 0W-20 synthetic oil. Clear codes and test drive.
  3. Locate the Bank 1 (passenger side) intake camshaft position sensor on the top front of the engine.
  4. Inspect the sensor's electrical connector and wiring harness for any damage, corrosion, oil contamination, or loose connections.
  5. If wiring is intact, consider swapping the Bank 1 and Bank 2 intake cam sensors (they are identical). Clear codes and drive. If the code changes to P0345, the original Bank 1 sensor is faulty.
  6. If a swap isn't feasible, replace the sensor with a new OEM part. It is held by a single 10mm bolt.
  7. Clear the trouble code and perform a test drive to see if the code returns.
  8. If the code persists, test the alternator for proper voltage (stable 13.8V-14.2V) and AC ripple.
  9. If the alternator is good, advanced diagnosis is needed. This includes checking the sensor air gap per TSB 11-130-13R, testing the OCV, and inspecting the timing chain system.

Parts You'll Likely Need

  • Camshaft Position Sensor (Bank 1, Intake) (OEM #22056AA231) — This is the most common component to fail and trigger the P0340 code on this specific vehicle.
    Trusted brands: Subaru (OEM), Denso (OEM supplier), Hitachi, NGK/NTK
    OEM price range: $80-$120
    Aftermarket price range: $30-$70

Related Codes That Often Appear With This One

  • P0341 — P0341 indicates a 'performance' or 'range' issue with the same sensor circuit, often pointing to timing correlation problems (like a stretched chain or AVCS issue) rather than a complete electrical circuit failure.
  • P0011 / P0021 — These codes relate to 'A' Camshaft Position Timing Over-Advanced. They often appear if the underlying issue is with the oil control valve (OCV) or a timing chain problem, affecting the actual position of the camshaft.
  • P0345 — This is the equivalent code for the Bank 2 (driver's side) intake camshaft sensor. Seeing both P0340 and P0345 simultaneously could point towards a systemic issue like a failing alternator or a problem with the timing chain.

Technical Service Bulletins (TSBs) & Recalls

  • TSB 11-130-13R: Addresses rough idle, extended cranking, and various cam position DTCs (including P0340) on FA and FB engines. It details the procedure for measuring the sensor air gap and selecting the correct shim to fix the issue. This TSB replaces bulletins 11-100-11R, 11-122-12, 11-124-12R, and 11-125-12.
  • TSB 11-122-12: An older, superseded bulletin that also addressed P0340 and misfire codes on 2013 Legacy/Outback models with the FB25, pointing to the sensor air gap issue and the shim kit (p/n 10130AA060) as the solution.
  • TSB Bulletin #11-100-11R: Notes that difficulty starting and rough idle may be accompanied by DTCs P0340, P0341, P0345, and P0346, as well as misfire codes P0301 through P0304.

Platform-Specific Known Issues

  • Some early production FB25B engines were subject to Technical Service Bulletin (TSB) 11-130-13R, which supersedes older TSBs like 11-100-11R. This TSB addresses an incorrect air gap between the sensor and the camshaft reluctor wheel. If a new sensor does not fix the problem, a technician may need to measure this gap and install a specific shim from kit p/n 10130AA060 to correct the signal.

Mechanic-Grade Diagnostic Values

  • Camshaft Position Sensor Internal Resistance — expected: 1-4 kΩ (kilo-ohms). Failure: A reading outside this range, or an open/infinite reading, indicates a failed sensor.
  • Camshaft Position Sensor Supply Voltage (at connector, key on, engine off) — expected: 5V DC. Failure: No voltage or significantly lower voltage suggests a wiring issue from the ECM or a faulty ECM.
  • Alternator AC Ripple Voltage (at battery terminals, engine running) — expected: Below 50-100 mV (millivolts) AC. Failure: Excessive AC ripple (e.g., over 140 mV) indicates failing alternator diodes creating electrical noise.
  • Camshaft Position Sensor Air Gap (FB Engines) — expected: 1.3 +/- 0.05mm (1.25mm to 1.35mm). Failure: A clearance outside this specific range can cause a weak or inconsistent signal, as addressed by TSB 11-130-13R.

Wiring & Ground Locations

  • E15 (Connector ID) — The 3-pin connector at the Bank 1 (passenger side) intake camshaft position sensor.. This is the primary connection point for testing. Pin 1 is power (5V), Pin 2 is signal, and Pin 3 is ground. Testing for voltage and continuity at this connector is a key diagnostic step.
  • GV (Ground Point) — Right side of the engine compartment.. This is a main grounding point for various engine components. A loose or corroded connection here can introduce electrical noise or resistance into sensor circuits, potentially causing a P0340 code.
  • J/C B483 (Junction Connector) — Located at the right front of the engine compartment.. The camshaft position sensor wiring passes through this junction connector. A poor connection or corrosion within this connector can interrupt the signal to the ECM.

Real Owner Repair Stories

  • Reddit user in r/subaru (2012 Subaru Outback 6MT (Uses same FB25 engine and has similar issues)) — Car stalls and engine dies when coming to a slow down, with extended crank when restarting. Drives fine at cruising speed. Intermittent issue.
    ❌ Tried (didn't work) Replaced the Cam Position Sensor with a new OEM part., Tested resistance and checked timing belt.
    ✅ What actually fixed it The user was advised by their mechanic to see an automotive electrical specialist, as the issue was likely a complex wiring problem, not a component failure. The thread highlights that replacing the sensor doesn't always fix the code, pointing towards deeper circuit issues.

Model Year Variations Within This Range

  • 2011-2013 vs 2014+: The 2011-2013 Foresters with the FB25 engine use hydraulic power steering. In 2014, Subaru switched to electric power steering. This is a critical difference for anyone attempting an engine swap, as a later model FB25 engine will lack the mounting brackets on the front timing cover for the power steering pump and the second idler pulley found on the 2011-2013 models. The front cover, wiring harness, and intake may need to be swapped from the original engine.

Diagnostic Flowchart

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2012 Subaru Forester X Premium (2.5L NA)

Symptoms: Car doesn't struggle to start but it does idle a bit rough. Threw codes P0340 & P0345.

What fixed it: Unresolved in the thread; owner suspected a possible ECU problem after extensive diagnostics including testing all wire segments and checking sensor waveforms with an oscilloscope.

Source hint: Reddit r/MechanicAdvice

2012 Subaru Outback 2.5L

Symptoms: Stalling when coming to a stop with P0340.

What fixed it: Resolved by topping off the engine oil, which was found to be 3/4 of a quart low.

Source hint: Reddit r/subaru: Mechanic can't figure it out, please advise. Engine code P0340 cam shaft position sensor.

Subaru (General)

Symptoms: Triggered a P0340 code.

What fixed it: Confirmed a bad alternator was the root cause of the code, highlighting it as a rare but possible electrical issue.

Source hint: NASIOC Forums: P0340 seems to indicate a wiring issue...

Subaru Forester

Symptoms: Check engine light with P0340 code.

What fixed it: DIY success simply involving the replacement of the passenger side intake cam sensor.

Source hint: SubaruForester.org: General discussions on P0340

Frequently Asked Questions

Does TSB 11-130-13R apply to my 2011-2013 Forester for code P0340?
Yes, TSB 11-130-13R applies to early production FB25B engines. It addresses an incorrect air gap between the camshaft position sensor and the reluctor wheel. If replacing the sensor doesn't fix the code, a technician may need to measure this gap and install a specific shim from kit p/n 10130AA060.
Why is my cruise control light flashing along with the Check Engine Light?
A flashing cruise control light is a standard Subaru safety feature. Whenever the engine control module detects a fault severe enough to trigger the Check Engine Light (such as a P0340), it automatically disables the cruise control system and flashes the light to alert the driver.
Which side of the engine is the Bank 1 camshaft position sensor located on the FB25B?
On the Subaru FB25B engine, Bank 1 (which contains cylinder #1) is located on the passenger side. The intake camshaft position sensor is mounted on the top front of the passenger-side cylinder head and is held in place by a single 10mm bolt.
Can low engine oil really cause a P0340 code on my Forester?
Yes. The FB25 engine utilizes an AVCS (variable valve timing) system that relies heavily on oil pressure. Low or dirty oil can cause the oil control valve (OCV) to malfunction, which can trick the ECM into detecting a camshaft position sensor fault.
How can I test if the Bank 1 sensor is bad without buying a new one?
A common diagnostic tactic is to swap the Bank 1 (passenger side) sensor with the identical Bank 2 (driver's side) sensor. Clear the codes and drive the vehicle; if the code changes from P0340 to P0345, the original Bank 1 sensor is confirmed to be faulty.
Could a failing alternator cause a P0340 code on my Subaru?
Yes, forum reports from Subaru owners indicate that a failing alternator producing incorrect voltage or excessive AC ripple can trigger a P0340 code, even if the camshaft sensor itself is perfectly fine. Alternator voltage should be a stable 13.8V-14.2V.
Subaru Camshaft Position Sensor - P0340, P0365, P0345, P0390
Subaru Camshaft Position Sensor - P0340, P0365, P0345, P0390
Causes and Fixes P0340 Code: Camshaft Position Sensor "A" Circuit Bank 1 or Single Sensor
Causes and Fixes P0340 Code: Camshaft Position Sensor "A" Circuit Bank 1 or Single Sensor
How to FIX P0340 Camshaft Position Sensor Code!
How to FIX P0340 Camshaft Position Sensor Code!
How to Fix P0340 Trouble Code Top 5 Camshaft Sensor Problems Explained
How to Fix P0340 Trouble Code Top 5 Camshaft Sensor Problems Explained
My Outback Didn't Want To Start! Intermittent Issues Can Be A Huge Headache To Diagnose! P0340
My Outback Didn't Want To Start! Intermittent Issues Can Be A Huge Headache To Diagnose! P0340
How to replace a Subaru Forester Camshaft Position Sensor (4 in total) Error Code P0016
How to replace a Subaru Forester Camshaft Position Sensor (4 in total) Error Code P0016
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 30, 2026

The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.

Year Coverage
This article covers the OBD-II Code P0340 (Deep Dive) for:
  • Subaru Forester: 201120122013
In this article
🧭 Diagnostic Flowchart
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part