P0340 on 2008-2011 Subaru Impreza 2.5L: Camshaft Sensor Causes & Fixes
On a 2008-2011 Impreza, P0340 is most often a failed camshaft position sensor, but it can also be a critical warning of a timing belt problem. A sensor replacement is about $40-$90 for the part and is a simple DIY fix. However, it is crucial to rule out timing belt or alternator issues first, as these are well-documented failure points on this platform.
- P0340 on a 2008-2011 Impreza most often points to a bad camshaft position sensor, but it's not the only cause.
- **Crucially, you must verify the engine's mechanical timing.** A jumped timing belt can trigger this code and destroy your interference engine if it fails completely.
- If a new sensor doesn't fix the problem, test the alternator. A faulty alternator can create electrical noise that mimics a sensor failure.
- Symptoms like stalling, hard starting, and rough idle are common and make the vehicle unreliable until repaired.
What's Unique About the 2008-2011 Subaru Impreza
For the Impreza with the EJ253 engine, this code carries a higher-than-usual risk. This is an interference engine that uses a timing belt. A P0340 code can be the first and only warning of a jumped or failing timing belt, which can lead to catastrophic engine damage (bent valves) if it breaks. Additionally, these Subarus are known to sometimes trigger a false P0340 due to electrical noise (AC ripple) from a failing alternator, a quirk that can lead to misdiagnosis if only the sensor is replaced.
Symptoms You May Notice
- Check Engine Light is on
- Cruise control light may flash (a common Subaru trait with any CEL)
- Engine is hard to start or cranks but won't start
- Engine stalls unexpectedly, sometimes while driving or coming to a stop
- Rough or unstable idle
- Noticeable loss of power and acceleration
- Engine misfires or hesitation
- Replacing the camshaft position sensor without checking the timing belt alignment first. If the timing has jumped, a new sensor will not fix the code.
- Replacing the crankshaft position sensor (related to code P0335) by mistake.
- Replacing the sensor multiple times when the actual root cause is a failing alternator creating electrical noise.
- Assuming the sensor is bad when the connector pins are simply corroded. Cleaning the connector and applying dielectric grease can sometimes resolve the issue.
Most Likely Causes
- Failed Camshaft Position Sensor 🔴 High Probability → Shop Engine Camshaft Position Sensor Sensors can fail over time due to heat cycles and internal electronic degradation. It is the most common point of failure for this code. Many owners on forums recommend using only OEM (Subaru) or the original manufacturer (Denso) for this part, as aftermarket sensors have a reputation for being unreliable.
How to confirm: After confirming wiring is intact, test the sensor's resistance with a multimeter or observe its output signal on an oscilloscope. 🎬 Watch: How to test and replace the camshaft sensor The simplest test is often to replace it, as it's relatively inexpensive and accessible.
Typical fix: Replace the camshaft position sensor. It is held by a single 10mm bolt on the driver's side timing cover.
Est. part cost: $40-$90 - Timing Belt Issue (Jumped Tooth, Stretched, or Broken) 🟡 Medium Probability → Shop Engine Timing Chain The EJ253 uses a timing belt with a 105,000-mile replacement interval. If the belt is old, stretched, or a replacement was improperly tensioned, it can jump a tooth, throwing off the cam/crank correlation and triggering P0340. This is an interference engine, so a jumped or broken belt can be catastrophic.
How to confirm: Visually inspect the timing belt by removing the driver's side timing cover. Check for slack, damage, and verify the timing marks on the cam and crank sprockets align perfectly with the notches on the rear cover/block.
Typical fix: Replace the timing belt, tensioner, and idler pulleys. If the belt has broken while the engine was running, the cylinder heads must be removed to inspect for bent valves.
Est. part cost: $150-$300 for a full timing kit - Wiring or Connector Damage 🟡 Medium Probability The sensor's wiring harness can become brittle from heat or damaged by rodents. A poor connection at the sensor plug due to corrosion can also interrupt the signal. The harness runs over the front of the engine, making it susceptible to damage.
How to confirm: Visually inspect the wiring harness from the sensor to the main loom for any signs of cracking, melting, or chewing. 🎬 See a professional diagnostic procedure for the P0340 code Check the connector for corrosion or loose pins. Use a multimeter to check for continuity, power, and ground at the connector.
Typical fix: Repair the damaged section of wire or replace the connector pigtail.
Est. part cost: $10-$30
Rare But Worth Checking
- Failing Alternator: A failing alternator with a bad voltage regulator or internal diode can create excessive AC ripple (electrical noise) in the car's electrical system. This noise can interfere with the camshaft sensor's signal, causing the ECM to log a P0340 code even when the sensor and timing are perfectly fine. This is a well-documented 'ghost' issue in Subaru forums.
- Faulty Engine Control Module (ECM): → Shop Engine Control Module (ECM) This is a very rare cause. The ECM's internal driver for the camshaft sensor circuit can fail, but all other possibilities should be exhausted before condemning the ECM.
- Weak Battery or Poor Ground Connection: → Shop Vehicle Battery Low system voltage during cranking can sometimes cause erratic signals from various sensors, including the camshaft sensor, leading to a spurious P0340 code. Ensure the battery is healthy and terminals are clean.
Diagnosis Steps
- Read all fault codes with an OBD-II scanner. Note any other codes that are present, especially misfire or correlation codes.
- Inspect the camshaft position sensor connector for corrosion, damage, or a loose fit. Follow the wiring as far as possible, looking for damage (chafing, melting, rodent chew marks).
- With the key on and engine off, use a multimeter to check for reference voltage (usually 5V) and a good ground at the sensor connector.
- If wiring seems okay, the next step is to inspect the mechanical timing. Remove the driver's side plastic timing cover (a few 10mm bolts). Rotate the engine by hand using the main crank pulley bolt and align the timing marks on the crankshaft and camshaft sprockets. Verify they line up exactly with the marks on the engine block/rear timing cover. Any deviation indicates a jumped timing belt.
- If timing is perfect, check the alternator's performance. Start the engine and measure the voltage at the battery terminals. It should be a stable 13.8-14.5 volts. Rev the engine and watch for significant voltage drops or spikes. For a definitive test, use an oscilloscope to check for AC ripple voltage, which is the true sign of electrical interference causing this 'ghost' code.
- If timing and the electrical system are good, the camshaft sensor itself is the most likely culprit. Replace the sensor, preferably with an OEM or Denso part.
- After replacement, clear the codes. If the code returns, perform an advanced circuit test with an oscilloscope to view the sensor's square wave pattern or consider the rare possibility of a faulty ECM.
Parts You'll Likely Need
- Camshaft Position Sensor
(OEM #22056AA140)— This is the most frequent cause of a P0340 code. It's a common failure item due to age and heat cycles. Always verify fitment with your vehicle's VIN.
Trusted brands: Subaru (Genuine), Denso (OEM manufacturer), NTK/NGK, Hitachi
OEM price range: $75-$110
Aftermarket price range: $40-$80 - Timing Belt Kit
(OEM #13028AA240 (Belt Only, Kit part numbers vary))— If diagnosis reveals the timing belt has jumped, is worn, or is past its 105,000-mile service interval, it must be replaced. A full kit includes the belt, tensioner, and idler pulleys.
Trusted brands: Aisin (often contains OEM components), Gates, ContiTech
OEM price range: $250-$400 (for Genuine Subaru parts)
Aftermarket price range: $150-$250
Related Codes That Often Appear With This One
- P030x (e.g., P0301, P0302) — Misfire codes often accompany P0340 because the incorrect cam timing signal leads to improperly timed spark and fuel, causing misfires in one or more cylinders.
- P0016, P0017 — These codes indicate a Crankshaft/Camshaft Correlation error. They are very likely to appear alongside P0340 if the timing belt has jumped a tooth, as the ECM sees a direct conflict between the two sensors' readings.
Technical Service Bulletins (TSBs) & Recalls
- TSB 07-87-14: While not specific to P0340, this TSB discusses how low battery voltage during cranking can cause various DTCs to be stored. This supports the 'Weak Battery' as a potential rare cause.
- Bulletin #11-124-12R: This manufacturer bulletin notes that P0340, along with other cam position or misfire DTCs (P0301-P0304), can be associated with difficulty starting and a rough idle.
- Bulletin #11-130-13R: A manufacturer service bulletin describing inspection and repair procedures for intake-related issues when P0340 and misfire codes are present.
- Bulletin #11-100-11R: This bulletin from the manufacturer links P0340 to symptoms of difficulty starting and rough idle.
- Bulletin #11-122-12: This technical bulletin highlights that cam position DTCs like P0340 often appear alongside misfire codes P0301 through P0304.
Platform-Specific Known Issues
- The EJ253 is an interference engine. A broken timing belt will cause the pistons to hit the valves, resulting in thousands of dollars in engine repairs. P0340 can be an early warning of a timing belt problem and should be investigated immediately.
- A failing alternator causing electrical noise is a known 'ghost' cause for P0340 on this platform. If a sensor replacement doesn't fix the code, the alternator should be tested with an oscilloscope for AC ripple before further diagnosis.
Mechanic-Grade Diagnostic Values
- Camshaft Position Sensor Internal Resistance — expected: 1.0 to 4.0 kΩ (kilo-ohms). Failure: A reading of 0 ohms (short), infinite/OL (open), or outside the specified range indicates a failed sensor.
- Alternator AC Ripple Voltage — expected: Less than 0.5 Volts AC (500mV). Failure: Visible, consistent 'ripples' or spikes on an oscilloscope trace, especially when engine RPM is raised, indicate a failing diode in the alternator. This AC voltage contaminates the DC system and interferes with sensor signals.
- Camshaft Sensor Connector - Continuity to Ground — expected: Greater than 1 MΩ (mega-ohm). Failure: A low resistance reading indicates a short to ground in the wiring harness.
Scan Tool Commands That Help
- Subaru Select Monitor (SSM) or equivalent professional scan tool: Cam/Crank Relearn — While not always required for a simple sensor swap on this model, performing a Cam/Crank Relearn procedure can be beneficial after major timing work (like a timing belt replacement) to ensure the ECM has the most accurate baseline for the new components.
Wiring & Ground Locations
- Engine Ground (Main) — The primary engine ground strap is typically located on the passenger side, connecting the frame rail to the engine block near the starter.. A poor main engine ground can cause floating voltages and introduce electrical noise across all engine sensors, potentially leading to a false P0340 code. Verifying this connection is tight and corrosion-free is a crucial basic step.
- E/G(NA)-01 — This refers to the engine wiring harness section for the naturally aspirated engine, which includes the camshaft position sensor connector (E16). The harness routes over the front timing cover on the driver's side.. This is the direct harness for the sensor. It's exposed to heat and vibration, making it a prime location for wire chafing or insulation cracking, which would directly cause a 'Circuit Malfunction' code.
- Camshaft Sensor Connector (E16) — A 2-pin connector on the driver's side of the engine, plugged into the camshaft position sensor which is mounted on the front timing cover.. This is the most common point for connection failure. The pins can corrode or become loose, and the locking tab can break. Testing for voltage, ground, and signal should be done at this connector's pins.
Real Owner Repair Stories
- LegacyGT.com forum user (2009 Subaru Legacy 2.5i (EJ253), 5MT, 116k miles) — Car completely shut down on the freeway at 75mph. Would not crank or start afterward. Threw only a P0340 code.
❌ Tried (didn't work) The owner tested both the camshaft and crankshaft sensors with a multimeter and found they had a good resistance of 2k ohms. The wiring harness ground also tested good.
✅ What actually fixed it The user's final post indicated the timing belt idler pulley had failed, causing the belt to jump time. This was the root cause of the sudden shutdown and P0340 code, despite the timing belt itself having been replaced only 11,000 miles prior. - YouTube video by 'JT the Car Guy' (Unspecified vehicle, but demonstrating a common cause for P0340.) — Long crank time, drivability issues, and a persistent P0340 code.
❌ Tried (didn't work) Implied that a sensor replacement would not fix this specific issue.
✅ What actually fixed it The reluctor wheel (tone ring) had physically separated from the camshaft gear itself. The gear would spin with the cam, but the reluctor wheel was either stationary or spinning erratically, causing a complete loss of a coherent signal. The fix was to replace the entire camshaft gear assembly. - NHTSA ODI #11363231 — An owner of a similar Subaru model reported that the vehicle showed codes for cam and crank sensors, including P0340, yet all sensors tested as operational and replacement failed to resolve the issue.
When the Usual Fixes Don't Work
- In multiple documented cases, replacing the camshaft position sensor (even with an OEM part) did not resolve the P0340 code. The ultimate fix was replacing the alternator. Technicians confirmed with an oscilloscope that the failing alternator was producing excessive AC ripple (electrical noise), which interfered with the low-voltage signal from the camshaft sensor, tricking the ECU into reporting a sensor circuit fault. Disconnecting the alternator during testing would cause the camshaft sensor's signal pattern to become clean and stable, proving the alternator was the source of the interference.
Model Year Variations Within This Range
- 2008-2011: The EJ253 engine was used consistently throughout this period for the non-turbo Impreza. There are no significant documented variations in the camshaft sensor, its location, or the diagnostic procedure for P0340 within this specific 2008-2011 model year range. The major change occurred in 2012 when the Impreza switched to the new FB-series engine with a timing chain.
Diagnostic Flowchart
Other Known Issues on This Vehicle
Issues unrelated to this code that are worth knowing about as an owner of this generation:
- Head Gasket Failure (External Leaks) 🔴 High — Very common between 80,000-150,000 miles. The SOHC EJ253 engine is known for developing external oil and/or coolant leaks from the head gaskets, unlike the internal failures of older DOHC engines.
- Front/Rear Wheel Bearing Failure 🟠 Medium — Common for bearings to fail before 100,000 miles. The symptom is a loud humming or roaring noise that increases with vehicle speed and may change pitch when turning.
- Catalytic Converter Inefficiency (P0420) 🟠 Medium — Frequently occurs after 80,000 miles, triggering the P0420 code. This indicates the front catalytic converter is no longer operating efficiently. Subaru has issued warranty extensions for this issue on some models. (Ref: Service Campaign WU K-01 (Not a TSB, but a warranty extension program))
- Secondary Air Injection Pump Relay Failure 🟡 Low — Affects turbocharged models primarily, but the recall extends to some 2008-2011 Imprezas. The relay can fail, causing the pump to run continuously and overheat. (Ref: Recall: TKA-17 / NHTSA ID: 16V738000)
Used vs. New Parts: Buying Guide for This Vehicle
When a used part is the smart pick: For this repair, using used parts is generally not recommended for the electronic components. However, obtaining a used wiring harness pigtail from a junkyard can be a cost-effective solution if only the connector is damaged. A used alternator is a viable option if it's from a low-mileage donor and can be tested before purchase.
Donor-vehicle mileage cap: roughly under 80000 miles for the part to have meaningful remaining life.
What to inspect on the donor part:
- For an alternator: Check the date code if visible. Ask the yard if they have a history of the donor vehicle (e.g., collision vs. engine failure). Spin the pulley by hand; it should be smooth with no grinding or roughness.
- For a wiring connector: Inspect for any signs of cracking, brittleness, or corrosion on the pins. Ensure the locking tab is intact and clicks firmly.
OEM-only on this vehicle (don't cheap out):
- Camshaft Position Sensor: Forum consensus strongly advises against aftermarket sensors for this specific part on Subarus. Many owners report aftermarket sensors being dead-on-arrival or failing within a few months, causing the P0340 code to return. Using a Genuine Subaru or OEM Denso part is critical.
Aftermarket brands forum-validated for this vehicle:
- Denso (OEM for the sensor)
- Aisin (for timing belt kits)
- Gates (for timing belt kits)
Brands owners have reported issues with on this vehicle:
- Unbranded, 'white-box' camshaft position sensors from online marketplaces are frequently reported as unreliable for this application.
Real Owner Stories
Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.
2008-2011 Subaru Impreza EJ253
Symptoms: A user details a multi-month battle with P0340, replacing the sensor twice with no fix.
What fixed it: Replacing the alternator, which had a bad diode causing electrical noise.
Source hint: NASIOC Forums - Thread: 'P0340 Camshaft Position Sensor A Circuit Malfunction'
2008-2011 Subaru Impreza EJ253
Symptoms: Owner describes intermittent stalling with P0340; mechanic could not figure it out.
What fixed it: Investigating a failing alternator for AC ripple or a damaged wiring harness.
Source hint: Reddit (r/subaru) - Thread: 'Mechanic can't figure it out, please advise. Engine code P0340'
Related OBD-II Codes
Frequently Asked Questions
I replaced the camshaft sensor on my 2009 Impreza but the P0340 code is still there. What else could it be?
Is there a specific brand of sensor I should use for the EJ253 engine?
Can a weak battery cause P0340 on my 2011 Impreza?
Where is the camshaft position sensor located on the 2.5L engine?
My cruise control light is flashing along with the Check Engine Light. Is this related to P0340?
Is it safe to keep driving my Impreza with a P0340 code?
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 Impreza:
- 🧭 Diagnostic Flowchart
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2008-2011 Subaru Impreza
- 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
- When the Usual Fixes Don't Work
- Model Year Variations Within This Range
- Other Known Issues on This Vehicle
- Used vs. New Parts: Buying Guide for This Vehicle
- Real Owner Stories
- 2008-2011 Subaru Impreza EJ253
- 2008-2011 Subaru Impreza EJ253
- Related OBD-II Codes
- Frequently Asked Questions
- 🎟️ Get 5% Off