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

P0345 on 2007-2013 BMW M3: S65 V8 Camshaft Sensor Causes and Fixes

P0345 on an E9X M3 almost always indicates a failed intake camshaft position sensor on Bank 2 (the driver's side in LHD cars). It's a common failure and a straightforward DIY replacement, with an OEM-quality sensor costing around $150. The diagnostic is simple: swap the sensor with the one on Bank 1 and see if the code changes to P0340.

20 minutes to read 2007-2013 BMW M3
Most Likely Cause
Failed Camshaft Position Sensor
Difficulty
2/5
Est. Time
1 hrs
DIY Doable?
✅ Yes
Shop Labor
$150 – $450
Parts Price
$70 – $220
⚠️ Drivable, but... — Driving is possible, but you will likely experience reduced engine power ('limp mode'), rough idling, difficulty starting, and poor fuel economy. It's best to get it fixed promptly to avoid being stranded or causing secondary issues like damage to catalytic converters from unburnt fuel.
Key Takeaways
  • P0345 on the E9X M3 points directly to the intake camshaft position sensor on the driver's side (Bank 2).
  • The most effective and cheapest diagnostic step is to swap the suspected bad sensor with the identical one on the passenger's side (Bank 1) and see if the code follows to P0340.
  • The fix is almost always replacing the sensor itself, which is a simple DIY job that takes less than an hour, requiring only basic tools and an E8 Torx socket.
  • Always use a quality OEM or OEM-supplier (like VDO/Continental) sensor for reliability, and replace the small O-ring (PN 12141748398) to prevent future oil leaks.
The trouble code P0345 stands for "Camshaft Position Sensor 'A' Circuit Malfunction (Bank 2)". On the S65 V8 engine, this means the engine's computer (DME) has detected an incorrect, intermittent, or missing signal from the intake camshaft position sensor. 'Bank 2' on the S65 V8 refers to the cylinder bank containing cylinders 5-8, which is the driver's side on US-spec (LHD) vehicles. 'Sensor A' specifies the intake camshaft sensor. This sensor is critical for the DME to correctly time fuel injection and ignition spark.

What's Unique About the 2007-2013 BMW M3

The high-revving S65 V8 engine, derived from the S85 V10, uses four identical camshaft position sensors—one for each intake and exhaust camshaft. Code P0345 specifically flags the intake sensor on Bank 2. While many BMW engines can suffer from this fault, on the S65 it is a very common and well-documented failure point that is often just the sensor itself wearing out due to heat and age. Unlike some other BMW engines where VANOS solenoid issues are the primary trigger for cam sensor codes, on the S65, a direct sensor electrical failure is more probable.

Symptoms You May Notice

  • Check Engine Light is on
  • Reduced engine power or 'limp mode'
  • Engine is difficult to start or has a long crank time.
  • Rough idle or stalling, especially after fill-ups if the issue is compounded by a failing tank breather valve.
  • Engine misfires
  • Noticeably worse fuel economy.
  • Hesitation or stumbling on acceleration.
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the VANOS solenoids. While VANOS issues can cause performance problems, P0345 is an electrical circuit code for the sensor itself, not a mechanical timing adjustment code.
  • Replacing the crankshaft position sensor. A failing crank sensor will typically set its own specific codes, such as P0335.
  • Assuming a major timing chain failure without performing basic sensor and wiring diagnostics first.

Most Likely Causes

  1. Failed Camshaft Position Sensor 🔴 High Probability → Shop Engine Camshaft Position Sensor The sensors are a known common failure item on the S65 engine due to age, extreme heat cycles from the high-performance V8, and potential oil contamination from leaking valve cover gaskets. The sensor's internal electronics or plastic housing can degrade over time.
    How to confirm: The easiest diagnostic step is to swap the suspected faulty sensor (Bank 2 intake) with the sensor from another position, such as the Bank 1 intake sensor. Clear the codes and run the engine. If the fault code changes to P0340 (Camshaft Position Sensor 'A' Circuit Bank 1), the sensor you moved is confirmed to be bad. The sensor is held by a single E8 external Torx bolt.
    Typical fix: Replace the faulty camshaft position sensor and its O-ring. All four sensors on the S65 engine are the same part number. It is highly recommended to use a Genuine BMW or OEM supplier (VDO/Continental) part, as some aftermarket sensors are known to be unreliable or fail prematurely.
    Est. part cost: $70-$220
  2. Wiring Harness or Connector Issue 🟡 Medium Probability Engine bay heat can make wiring and connectors brittle over time, leading to cracks or breaks in the insulation. Oil leaks from the valve cover gaskets are a common S65 issue and can saturate the connector, causing a poor connection or short circuit.
    How to confirm: After confirming the sensor is good (by swapping), visually inspect the wiring harness and connector for any signs of cracking, fraying, or oil contamination. The plastic locking tab on the connector can become brittle and break. Use a multimeter to check for continuity and proper voltage at the connector pins according to the vehicle's wiring diagram.
    Typical fix: Clean the oil from the connector with electrical contact cleaner. If the wiring is damaged, repair the specific section of the harness. If the connector itself is broken, a new pigtail connector will need to be spliced in.
    Est. part cost: $15-$75

Rare But Worth Checking

  • Failing Engine Control Module (DME): This is very rare. Before condemning the expensive DME, all other possibilities (sensor, wiring) must be exhaustively ruled out by a qualified technician. Water ingress into the DME box is a known, though uncommon, issue on the E9x platform that can cause a variety of electrical faults.
  • Timing Chain or VANOS Mechanical Issue: → Shop Engine Timing Chain While possible, a mechanical timing issue or a problem with the VANOS system would typically present with other, more specific fault codes related to timing correlation (like BMW codes 2A82, 2A87, or 275D/275E) in addition to the sensor circuit code. A stretched timing chain is a possible but less common cause.
  • Poor Oil Quality or Level: In some reported cases, particularly after long-term storage, owners have seen camshaft sensor codes appear that were resolved with a simple oil change. While not a direct cause of a 'circuit malfunction', very old or contaminated oil could potentially affect the VANOS system's ability to respond, which might be misinterpreted by the DME in conjunction with a borderline sensor.

Diagnosis Steps

  1. Read the fault codes with an OBD-II scanner to confirm P0345 is present.
  2. Identify the Bank 2 intake camshaft position sensor. It is the upper of the two sensors on the front of the driver's-side valve cover (for LHD cars).
  3. Inspect the sensor's electrical connector and nearby wiring for any visible damage, corrosion, or oil saturation. Ensure the connector clicks securely into place.
  4. To definitively test the sensor, swap it with the Bank 1 intake sensor (upper sensor on the passenger-side valve cover). They are identical parts. You will need an E8 external Torx socket to remove the single retaining bolt.
  5. Before swapping, it's good practice to clean the sensor tip and the mounting hole of any oil residue or grime.
  6. Clear all fault codes using the scanner.
  7. Start the engine and let it run for a minute, then re-scan for codes.
  8. If code P0340 (Bank 1) now appears, the sensor you moved is faulty and must be replaced.
  9. If code P0345 returns, the sensor is likely good. The problem is in the wiring to the Bank 2 sensor or, rarely, the DME. Proceed with testing the wiring harness for continuity and shorts.
  10. If the wiring is confirmed to be good, the issue may require professional diagnosis of the DME.

Parts You'll Likely Need

  • Camshaft Position Sensor (OEM #13627837904) — This is the most common cause of code P0345 on the S65 engine. All four sensors on the engine are the same part.
    Trusted brands: Genuine BMW, VDO (OEM supplier), Continental (OEM supplier)
    OEM price range: $150-$220
    Aftermarket price range: $70-$120
  • Camshaft Position Sensor O-Ring (OEM #12141748398) — This O-ring seals the sensor against the valve cover to prevent oil leaks. It should always be replaced with the sensor. It is a 17x3mm O-ring. Some new sensors include it, but it's wise to verify and purchase separately if needed.
    Trusted brands: Genuine BMW
    OEM price range: $3-$8
    Aftermarket price range: $1-$5

Related Codes That Often Appear With This One

  • P0340 — This is the equivalent code for Bank 1. It will appear if you swap a faulty Bank 2 sensor to Bank 1 for diagnosis.
  • P0349 — This indicates an intermittent fault with the same Bank 2 intake sensor, suggesting the signal is dropping out due to a loose connection or a sensor in the final stages of failure.
  • P0393 — This is the code for the exhaust camshaft sensor on the same bank (Bank 2). If an oil leak from the valve cover is the root cause, it could damage both sensors on that side, causing both codes to appear.
  • 275D / 275E — These are BMW-specific codes for oxygen sensor limit positions. They can sometimes appear if the incorrect cam timing from the faulty sensor is causing a rich or lean running condition that the O2 sensors are struggling to compensate for.

Platform-Specific Known Issues

  • Owner Experience: Sensor Swap Confirms Failure: A user on m3post.com with a 2011 M3 experienced P0345 along with limp mode. Following forum advice, they swapped the Bank 2 intake sensor with the Bank 1 intake sensor. The code immediately changed to P0340, confirming the sensor was the culprit. Replacing the faulty sensor with a new VDO unit resolved the issue completely. This is the standard, community-accepted diagnostic path.
  • Real-World Repair Story: Oil Contamination: A DIY video for an N52 engine (which uses a similar sensor design) showed a failed sensor completely coated in thick, solidified oil. The O-ring had failed, allowing oil to seep past the sensor body. This highlights the importance of replacing the O-ring and cleaning the sensor bore during replacement to ensure a good seal and prevent future contamination.

Mechanic-Grade Diagnostic Values

  • Camshaft Position Sensor Connector Voltage (Key On, Engine Off) — expected: Pin 1 (Supply): ~12V (Battery Voltage). Pin 2 (Signal): Should fluctuate between ~0V and ~5V when the engine is cranked. Pin 3 (Ground): Should show good continuity to chassis ground.. Failure: No voltage on Pin 1 indicates a power supply issue. Signal on Pin 2 not fluctuating during cranking indicates a bad sensor. High resistance on Pin 3 indicates a bad ground.
  • Camshaft Position Sensor Resistance — expected: While specific OEM resistance values for the S65 Hall effect sensor are not published for a simple multimeter test, a functional test is more reliable. However, some general guides for similar sensors suggest a resistance between 200 and 900 ohms.. Failure: A reading of 0 ohms (short circuit) or infinite/OL (open circuit) would indicate a failed sensor. However, Hall effect sensors are best tested with a voltage test.

Hidden / Shadow Codes Worth Checking

  • 2718: This is the BMW-specific DME fault code corresponding to P0348 (Camshaft Position Sensor 'A' Circuit High Bank 2), which is closely related to P0345. It may be stored in the DME even if only the generic P-code is displayed on a standard OBD-II reader. (see via BMW-specific diagnostic software like ISTA or a high-end scanner capable of reading manufacturer codes.)
  • P0346 / P0349: These codes indicate a 'Range/Performance' or 'Intermittent' fault with the same sensor, respectively. Their presence alongside P0345 can point towards a failing sensor that hasn't completely died, or a wiring issue causing signal dropouts. (see via Standard OBD-II scanner.)

Scan Tool Commands That Help

  • ISTA (Rheingold): Calculate Test Plan — After reading the P0345 fault, ISTA can generate a specific, guided diagnostic procedure. It will prompt the technician through a logical sequence of checks (wiring, sensor signals, etc.) to isolate the root cause efficiently.
  • ISTA (Rheingold): VANOS Test — If there's a suspicion that the issue might be mechanical (timing-related) rather than purely electrical, this function can be used. It actuates the VANOS system and checks its response time and function, helping to rule out deeper engine mechanical problems.
  • ISTA (Rheingold): Throttle Valve Actuator Test (ABL) — While not directly related to the camshaft sensor, failing throttle actuators are a very common S65 issue that can cause similar symptoms like limp mode. If sensor diagnostics are inconclusive, running this test can help rule out a concurrent or misdiagnosed throttle actuator problem.

Wiring & Ground Locations

  • Main Engine Ground Strap — Located on the driver's side (LHD) of the vehicle, connecting the engine block to the chassis. It is typically found near the connection between the exhaust header and the X-pipe, underneath the car.. A corroded or loose main engine ground can cause a host of bizarre electrical issues and fault codes, including sensor circuit malfunctions. While not a primary cause, it's a critical check for any electrical fault, as a poor ground can create voltage drops and signal noise that the DME may interpret as a sensor failure.
  • Camshaft Sensor Connector (Bank 2 Intake) — On the front of the driver's side (LHD) valve cover, it is the upper of the two sensor connectors.. This is the direct connection point for the faulty sensor. The 3-pin connector provides power, ground, and signal return. Pin 1 is supply voltage, Pin 2 is the signal, and Pin 3 is ground. Damage, oil contamination, or a broken locking tab at this specific connector is a common cause of the fault.
  • DME (MSS60) — Located in the electronics box (E-box) on the passenger side of the engine bay, near the firewall, under a removable plastic cover.. This is the engine computer where the wiring from the camshaft sensor terminates. In rare cases of wiring damage or DME failure, technicians may need to test for continuity and voltage directly at the DME's connector pins to isolate the fault between the sensor and the computer.

Real Owner Repair Stories

  • m3post.com forum user (2011 E92 M3) — Car went into limp mode, displaying P0345.
    ❌ Tried (didn't work) Initial code reading.
    ✅ What actually fixed it The owner swapped the Bank 2 intake sensor with the Bank 1 intake sensor. The fault code immediately changed to P0340, confirming the sensor itself was bad. A new VDO-branded sensor was installed, which completely resolved the issue.
  • m3post.com forum user (E9x M3 (details not specified)) — Car would not start, or had a very long crank. Issues were intermittent.
    ❌ Tried (didn't work) Replacing the battery, which was 8 years old but did not solve the problem.
    ✅ What actually fixed it The owner replaced the main engine ground strap, which was suspected to be corroded. This resolved the intermittent starting problems, which can sometimes be accompanied by various electrical fault codes.

OEM Part Supersession History

  • 13627837904No supersession found. This part number appears to be the consistent number for the E9x M3's production run. — N/A

Diagnostic Flowchart

Start by identifying the Bank 2 intake camshaft sensor on the driver's side valve cover. This diagnostic focuses on isolating the sensor from the wiring harness and DME using the S65-specific swap method.
Unplug the Bank 2 intake sensor (upper sensor, driver's side). Is there oil inside the connector or brittle wiring insulation?
→ Clean the connector with electrical contact cleaner and replace the sensor O-ring. If the wiring is brittle or the locking tab is broken due to S65 heat cycles, repair the harness or splice in a new pigtail connector.
Using an E8 Torx, swap the Bank 2 intake sensor with the Bank 1 intake sensor (passenger side). Clear codes and restart. Which code returns?
→ The sensor is confirmed faulty. Replace it with a Genuine BMW or OEM VDO/Continental sensor. Avoid cheap aftermarket sensors which are known to fail prematurely on the S65 platform.
With the sensor unplugged and ignition ON, use a multimeter to check for 5V reference and ground at the Bank 2 harness connector. Are values correct?
→ Trace the wiring harness back toward the DME. Look for breaks caused by heat degradation or oil saturation from leaking valve cover gaskets, a common S65 issue.
Is the engine experiencing a 'long crank' or metallic noise from the front of the engine?
→ Inspect the VANOS adjustment units and timing chain tensioners. While P0345 is usually electronic, mechanical timing deviation on high-mileage S65 engines can trigger circuit range codes.
→ If the sensor swap and wiring tests both pass, the fault likely lies in the DME (Engine Control Module) internal processing circuit. Seek professional BMW specialist diagnosis for DME testing.
→ Address Throttle Body Actuators or the Tank Breather Valve first. These are high-frequency S65 failures that can cause limp mode and erratic idling, potentially triggering secondary sensor circuit faults.

Other Known Issues on This Vehicle

Issues unrelated to this code that are worth knowing about as an owner of this generation:

  • Rod Bearing Premature Wear 🔴 High — A highly discussed issue. Proactive replacement is commonly recommended by specialists between 60,000-80,000 miles. Failure can be catastrophic to the engine. The cause is debated but often attributed to tight bearing clearances specified by BMW combined with the use of thick 10W-60 oil, especially on cars that aren't consistently brought up to full operating temperature. (Ref: No official recall, but the subject of a class-action lawsuit filed in 2018.)
  • Throttle Body Actuator Failure 🔴 High — Very common failure, often occurring between 50,000-80,000 miles. The engine has two actuators, one for each bank, and failure of one will trigger limp mode. Causes include wear of internal plastic gears and failure of the electronic circuit board. Common codes include 2B15, 2B16, 2B21, and CDC0.
  • Idle Control Valve (ICV) Failure 🟠 Medium — A common issue that causes erratic or hunting idle, and can lead to stalling. The valve can become sticky with carbon buildup over time. Cleaning can sometimes resolve the issue, but replacement is often necessary.
  • Valve Cover Gasket Oil Leaks 🟡 Low → Shop Engine Valve Cover — Common on many BMW engines of this era, including the S65. The gaskets become hard and brittle with age and heat, allowing oil to seep out. This can lead to oil dripping onto exhaust manifolds (causing a burning smell) and can contaminate sensors like the camshaft position sensors.

Used vs. New Parts: Buying Guide for This Vehicle

When a used part is the smart pick: For this specific repair, buying a used camshaft position sensor is generally not recommended. The part is a known failure item due to heat and age, and a used sensor has an unknown amount of life left. The labor to replace it is minimal, making the cost savings of a used part not worth the risk of premature failure.

Donor-vehicle mileage cap: roughly under 20000 miles for the part to have meaningful remaining life.

What to inspect on the donor part:

  • If considering used, source from a very low-mileage, documented wreck.
  • Inspect the plastic body for any signs of cracking or brittleness.
  • Ensure the O-ring is pliable and not flattened or hardened (though it should always be replaced anyway).
  • Check the electrical connector pins for any corrosion or damage.

OEM-only on this vehicle (don't cheap out):

  • Camshaft Position Sensor

Aftermarket brands forum-validated for this vehicle:

  • VDO (OEM supplier)
  • Continental (often the same as VDO)

Brands owners have reported issues with on this vehicle:

  • Unbranded, no-name sensors from online marketplaces are frequently reported by forum members to be dead-on-arrival or fail within a very short period.

Real Owner Stories

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

2011 BMW M3 (S65)

Symptoms: P0345 code along with limp mode.

What fixed it: Swapped the Bank 2 intake sensor with the Bank 1 intake sensor; the code changed to P0340. Replacing the faulty sensor with a new VDO unit resolved the issue.

Source hint: m3post.com user experience cited in 'Owner Experience: Sensor Swap Confirms Failure'

2008-2013 BMW M3 (S65)

Symptoms: Check Engine Light with multiple cam sensor codes (P0393, P0343) after the car was taken out of winter storage.

What fixed it: The owner performed an oil change, which cleared the codes without replacing any parts.

Source hint: m3post.com - Thread 'Camshaft Position Codes'

Frequently Asked Questions

Where is the Bank 2 intake camshaft position sensor located on my S65 engine?
The Bank 2 intake sensor is the upper of the two sensors located on the front of the driver's-side valve cover (for LHD cars).
Can I test the sensor myself before buying a new one?
Yes. You can swap the Bank 2 intake sensor with the Bank 1 intake sensor (the upper sensor on the passenger-side). If the fault code changes from P0345 to P0340, the sensor is confirmed faulty.
Which brand of replacement sensor should I use for my M3?
It is highly recommended to use a Genuine BMW or OEM supplier part, such as VDO or Continental. Aftermarket sensors are known to be unreliable or fail prematurely on this platform.
Could my valve cover gaskets be causing this P0345 code?
Yes. Leaking valve cover gaskets are common on the S65 and can saturate the sensor connector with oil, leading to a poor connection or a short circuit.
Is there a specific tool I need to remove the sensor?
The sensor is held in place by a single E8 external Torx bolt.
Could a simple oil change fix my camshaft position sensor codes?
According to owner reports on m3post.com, some users have seen cam sensor codes (like P0343 or P0393) cleared simply by performing an oil change, suggesting the sensors are sensitive to oil condition.
How to fix P0345? | Camshaft Position Sensor “A” Circuit Malfunction (Bank 2)
How to fix P0345? | Camshaft Position Sensor “A” Circuit Malfunction (Bank 2)
Causes and Fixes P0345 Code: Camshaft Position Sensor “A” Circuit (Bank 2)
Causes and Fixes P0345 Code: Camshaft Position Sensor “A” Circuit (Bank 2)
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 Jun 8, 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 P0345 (Deep Dive) for:
  • BMW M3: 2007200820092010201120122013
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