P0340 on 2011-2013 Subaru Forester: Camshaft Sensor Circuit Causes & Fixes
P0340 on a 2011-2013 Forester most often means the Bank 1 (passenger side) camshaft position sensor has failed. However, Subaru TSBs indicate the cause can be more complex, involving incorrect sensor clearance requiring a shim kit, or issues with the AVCS system. A sensor replacement is the first step, costing $30-$100 for the part. Wiring issues and even a faulty alternator are also known causes.
- P0340 on your Forester points to the camshaft position sensor circuit on the passenger side (Bank 1).
- Symptoms often include a car that won't start, stalls, or runs poorly.
- The most likely fix is replacing the Bank 1 camshaft position sensor, which is a manageable DIY job for many.
- Be aware of Subaru TSBs that indicate the problem could be a sensor air gap issue requiring a shim, especially if a new sensor doesn't fix the code.
- Always check your engine oil level, as low or dirty oil can affect the cam timing system and trigger this code.
What's Unique About the 2011-2013 Subaru FORESTER

For the 2011-2013 Forester, particularly those with the newer FB25 engine, a P0340 code isn't always a simple sensor failure. Subaru issued Technical Service Bulletins (TSBs) #11-130-13R and #11-100-11R which point to potential issues with the camshaft position sensor's air gap or problems within the Active Valve Control System (AVCS). This means that while the sensor is a likely culprit, a full diagnosis might lead to a more involved repair like re-shimming the sensor or addressing the AVCS intake sprockets. These TSBs supersede several older bulletins and cover a wide range of codes (P0340, P0341, P0345, etc.), indicating a systemic potential issue.
Diagnostic Flowchart
Tap your situation to follow the diagnostic path that matches what you're seeing on this vehicle.
Symptoms You May Notice
- Check Engine Light is on
- Flashing cruise control light (Subaru disables cruise control when a CEL is present).
- Difficulty starting the engine or extended cranking time.
- Engine stalls, especially at low RPMs or when coming to a stop.
- Rough idle.
- Noticeable loss of power and poor acceleration.
- Engine misfires, sometimes triggering codes like P0301 or P0303.
- Replacing the Crankshaft Position Sensor instead of the Camshaft Position Sensor. 🎬 See this tutorial on replacing both cam and crank sensors.
- Replacing the wrong side (Bank 2/driver's side) camshaft position sensor when the code is for Bank 1 (passenger side).
Most Likely Causes

- Failed Camshaft Position Sensor (Bank 1) 🔴 High Probability Sensors are electronic components that fail over time from heat cycles and potential oil contamination. It's the most common and logical first part to replace.
How to confirm: Test the sensor with a multimeter for resistance; a typical reading for a good sensor is between 1-4 kilo-ohms. Alternatively, 🎬 Watch: How to test and replace the camshaft sensor. swap it with the sensor from Bank 2 (driver's side, if applicable and identical) to see if the code changes to P0345.
Typical fix: Replace the Bank 1 (passenger side) camshaft position sensor. It is held in by a single 10mm bolt.
Est. part cost: $30-$120 - Damaged Wiring or Loose Connector 🟡 Medium Probability Engine vibrations and heat can cause wires to fray or connectors to become loose or corroded. Rodents chewing on the soy-based wire insulation is also a known issue.
How to confirm: Visually inspect the wiring harness and connector leading to the Bank 1 camshaft position sensor for any signs of damage, corrosion, or looseness. Perform a continuity test on the wiring from the sensor connector to the ECM if visual inspection is inconclusive.
Typical fix: Repair the damaged section of the wiring harness or clean/replace the connector.
Est. part cost: $5-$50 - Incorrect Camshaft Position Sensor Air Gap ⚪ Low Probability Subaru TSB #11-130-13R specifically addresses this issue on FB engines, where the clearance between the sensor and the reluctor teeth on the camshaft is out of spec, causing a poor signal.
How to confirm: This requires specialized tools like a depth micrometer or oscilloscope to measure the sensor's air gap and waveform, as detailed in the TSB. The procedure involves removing the sensor and measuring the gap.
Typical fix: Install the correct thickness shim from Subaru's shim kit (Part No. 10130AA060) behind the sensor to achieve the proper air gap.
Est. part cost: $20-$40 for a shim kit - Low or Dirty Engine Oil ⚪ Low Probability The AVCS system uses oil pressure to adjust cam timing. Low or sludgy oil can cause the AVCS solenoids or sprockets to respond slowly or get stuck, which may trigger cam sensor-related codes. The FB25 engine in particular is known for potential oil consumption issues.
How to confirm: Check the engine oil level and condition. If it's low or very dirty, this could be a contributing factor. 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.
Typical fix: Perform an oil and filter change using the correct viscosity oil (typically 0W-20) and ensure the level is correct.
Est. part cost: $40-$80
Rare But Worth Checking
- Faulty AVCS Solenoid or Cam Sprocket: As mentioned in TSB #11-130-13R, the issue can sometimes be with the AVCS components themselves. A clogged screen in the banjo bolt feeding the solenoid or a failing solenoid can cause timing to be over-advanced or retarded, triggering codes like P0021 alongside P0340.
- Stretched Timing Chain / Skipped Timing Belt: On higher mileage engines, a stretched timing chain (FB25) or a timing belt that has skipped a tooth (EJ255 Turbo) can throw off the cam/crank correlation and trigger this code. This is a major repair and is usually accompanied by other timing-related codes and significant running issues.
- Failing Alternator: A failing alternator with a bad diode or voltage regulator can introduce electrical noise (AC ripple) into the vehicle's electrical system. This noise can interfere with the sensitive camshaft position sensor signal, causing a false P0340 code. A forum user on NASIOC confirmed this was their issue; unplugging the alternator made the code disappear, and replacing it was the final fix. 🎬 Watch: How a bad alternator can trigger cam sensor codes.
- Faulty Engine Control Module (ECM): This is very rare, but the ECM itself can fail. This should only be considered after all other possibilities, including wiring and all related components, have been exhaustively ruled out.
Diagnosis Steps

- Read all stored fault codes with an OBD-II scanner. Note any other codes present, especially misfire or other bank cam codes.
- Check the engine oil level and condition. Top off or change if necessary, using the manufacturer-specified oil type.
- Locate the Bank 1 (passenger side) camshaft position sensor. On the FB25, it is on the top front of the engine.
- Carefully inspect the sensor's electrical connector and wiring for any signs of damage, corrosion, or loose connections. Check for signs of rodent damage.
- If wiring looks good, the most common fix is to replace the sensor. It is held by a single 10mm bolt.
- After replacement, clear the codes and test drive the vehicle to see if the code returns.
- If the code returns, more advanced diagnostics are needed. Test the alternator for excessive AC ripple voltage with a multimeter or oscilloscope, as a failing alternator can cause false codes.
- If the alternator is good, investigate the possibility of an incorrect sensor air gap as described in Subaru TSB #11-130-13R. This may require measurement and shimming.
- If all else fails, the issue may lie with the timing chain, AVCS system (solenoids, sprockets), or the ECM.
Parts You'll Likely Need
- Camshaft Position Sensor (Bank 1)
(OEM #22056AA270)— This sensor is the most frequent cause of a P0340 code due to electronic failure over time. This part number fits the 2011-2017 Forester, as well as other models like the Impreza, Legacy, and Outback.
Trusted brands: Subaru (Genuine), Denso, NTK/NGK, Hitachi
OEM price range: $90-$145
Aftermarket price range: $30-$80 - Camshaft Position Sensor Shim Kit
(OEM #10130AA060)— Required if diagnosis per TSB #11-130-13R determines the air gap between the sensor and the camshaft reluctor is incorrect. The kit contains 8 shims of varying thickness.
Trusted brands: Subaru (Genuine)
OEM price range: $20-$40
Related Codes That Often Appear With This One
- P0341 — This code indicates a 'Range/Performance' problem with the same sensor circuit, often appearing with P0340 and covered by the same TSBs.
- P0301, P0302, P0303, P0304 — These are misfire codes. Incorrect camshaft timing information can easily lead to misfires on the affected bank (P0301/P0302 for Bank 1) or multiple cylinders.
- P0011, P0021 — These codes indicate 'A' Camshaft Position Timing Over-Advanced for Bank 1 (P0011) or Bank 2 (P0021). They often point towards a problem with the AVCS system (oil control solenoid, clogged banjo bolt filter) rather than the sensor itself.
- P0345, P0365 — These are codes for the Bank 2 (driver's side) camshaft sensors. Seeing multiple cam sensor codes together may point to a larger systemic issue like a timing problem, widespread wiring issue, or a failing alternator causing electrical noise.
Technical Service Bulletins (TSBs) & Recalls

- 11-130-13R: Difficulty Starting, Rough Idle, Cam Position or Misfire DTCs. This is the primary TSB for this issue on FB/FA engines, detailing the diagnostic procedure for checking sensor air gap and potential AVCS faults.
- 11-100-11R: Difficulty Starting, Rough Idle, and various DTCs including P0340. This TSB was superseded by 11-130-13R.
Platform-Specific Known Issues
- TSB #11-130-13R and #11-100-11R address difficulty starting, rough idle, and various cam position codes including P0340. The cause may be an incorrect air gap for the sensor, requiring a shim for proper spacing, or a fault in the AVCS system. This TSB consolidates and replaces several previous bulletins.
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) — expected: 5V with ignition on, engine off.. Failure: No voltage suggests a wiring issue between the ECM and the sensor or a faulty ECM.
- Alternator AC Ripple Voltage — expected: Below 50-100 mV (millivolts) at idle.. Failure: Excessive AC ripple (e.g., over 140 mV) indicates failing diodes in the alternator, which can create electrical noise and trigger a false P0340 code.
- 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 poor signal and trigger DTCs.
Scan Tool Commands That Help
- Subaru Select Monitor (SSMIII/SSM4): Current Data Display / Data Display — This function allows a technician to view live data from the engine control system, including the 'Camshaft Position Sig.' parameter, which should toggle ON/OFF as the engine runs. This can help confirm if the ECM is receiving any signal at all from the sensor. The tool also has an oscilloscope module for advanced waveform analysis of the cam and crank sensors.
Wiring & Ground Locations
- Engine Harness to Bulkhead Harness Connector — In the engine bay, near the engine. The engine harness is what is physically on the intake manifold, and it plugs into the bulkhead harness which runs through the firewall to the ECU.. This is a critical connection point. Corrosion or damage at these main connectors can interrupt the camshaft sensor signal to the ECU. A documented fix involved cleaning these main harness plugs with alcohol to resolve a persistent P0340.
- Body Integrated Unit (BIU) — Under the driver's side dash, to the right of the steering column.. The BIU is a central point for many vehicle electronics and ground distributions. While not directly in the sensor circuit, issues with the BIU or its grounds can cause widespread electrical problems that could potentially affect sensor readings.
- Data Link Connector — Lower portion of the instrument panel on the driver's side.. This is the port used to connect diagnostic tools like the Subaru Select Monitor. A diagnostic procedure for communication failure involves checking for 10V+ at pin 16 of this connector to ensure the diagnostic system itself is powered.
Real Owner Repair Stories
- Ultimate Subaru Message Board user (Subaru with a rebuilt engine) — P0340 code present, engine idled smoothly but would stumble and cut power above 3500 RPM.
❌ Tried (didn't work) Checked timing belt alignment., Swapped sensor with a known good one., Inspected wiring harness for damage., Replaced timing belt tensioner.
✅ What actually fixed it The user cleaned the main engine harness plugs with denatured alcohol. After cleaning, the car accelerated smoothly to 5k RPM without issue, resolving the stumbling problem. - Oz Mechanics on YouTube (Vehicle with P0340 (specific model not a Forester, but demonstrates a common Subaru issue)) — P0340 code that other mechanics could not fix.
❌ Tried (didn't work) Not specified, but implied sensor replacement did not work.
✅ What actually fixed it The technician diagnosed excessive AC ripple voltage from the alternator using an oscilloscope. Disconnecting the alternator's electrical connector cleaned up the camshaft sensor signal immediately. Replacing the alternator was the final fix.
OEM Part Supersession History
Unknown→22056AA270— Standard part evolution for reliability and manufacturing improvements.
Heads up: Part number 22056AA270 is specified for FA/FB engines, including the 2.5L FB25B in the 2011-2013 Forester. While it may physically fit other models, using it on an older EJ series engine may not be appropriate. Always verify by VIN.
Model Year Variations Within This Range
- 2011-2013: The primary variation is the engine. The non-turbo Forester switched from the EJ25 series to the new FB25B engine in 2011. The turbo XT model retained the EJ255. This is critical because TSBs regarding sensor air gaps and shims are specific to the FB engine family. The timing system also differs: the FB25 has a timing chain, while the EJ255 has a timing belt.
Helpful Videos
We Have This Part in Stock
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.
- Subaru FORESTER:
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2011-2013 Subaru FORESTER
- Diagnostic Flowchart
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Technical Service Bulletins (TSBs) & Recalls
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- OEM Part Supersession History
- Model Year Variations Within This Range
- 🎟️ Get 5% Off