P0171 means the 335i DME added excessive fuel correction on Bank 1; it does not prove an oxygen sensor. Confirm N54 or N55, compare Bank 1 with Bank 2 and idle with part load, smoke-test intake/charge and crankcase ventilation, test purge sealing, validate MAP/TMAP/airflow and measure low/high fuel pressure. A one-bank N54 pattern, both-bank idle leak and load-related charge/fuel fault need different repairs.
Match the symptom
Select the closest observation. The result changes the first test; it does not name a part to replace.
Prioritize intake, PCV and purge leakage.
How to clear P0171 and confirm the repair
Clearing is the final step, not the first. Save the original freeze frame and trim pattern, correct the proven fault, and then use the scan tool to erase codes if the service procedure calls for it. Disconnecting the battery is a poor substitute: it can erase learned values and unrelated settings without proving anything.
Warm the engine to closed loop and repeat the same idle and higher-airflow comparison used during diagnosis. Bank 1 should no longer require abnormal positive correction, Bank 2 should remain a useful reference, and the repaired hose or seal should pass a second smoke inspection. Then reproduce the load and temperature recorded in freeze frame without forcing unsafe operation.
Recheck pending codes after the drive and confirm readiness progresses normally. A lamp that remains off for five minutes at idle is not proof. If trims drift positive again, stop and preserve the new data rather than clearing repeatedly; an intermittent purge, wiring or fuel-delivery fault may need a longer graph and a different operating condition.
What can set P0171—and how to separate it
The order below is evidence-driven, not a universal probability ranking. Vehicle year, repair history, companion codes and the operating condition in freeze frame change where diagnosis should begin.
| Possible cause | Evidence that supports it | First useful test |
|---|---|---|
| Unmetered intake, PCV or vacuum leak | Positive correction strongest at idle and smoke localizes | Smoke test |
| MAF/MAP bias or intake-duct fault | Airflow/load data implausible | Airflow plausibility test |
| Low fuel pressure or injector delivery | Lean worsens under load | Low/high pressure test |
| Purge valve leaking or incorrect flow | Correction changes when purge isolated | Purge sealing test |
| Upstream lambda sensor or exhaust leak | Response/circuit or pre-sensor leak evidence | Sensor and exhaust test |
Compare banks and operating points
Record hot-idle and raised-rpm adaptations for both banks. Idle-heavy both-bank correction favors shared vacuum/CCV/purge leakage.
A Bank 1-only difference raises local injector, sensor, exhaust or runner influence; load worsening raises boost/fuel supply.
Smoke-test without disturbing evidence
Test intake, charge pipe, intercooler and crankcase system at BMW-approved pressure before removing hoses.
Test purge closed-state sealing and inspect booster/vacuum branches.
Measure fuel and sensor plausibility
Graph low/high pressure and MAP/TMAP/airflow under demand rather than replacing sensors from trim alone.
Verify normalized adaptations and no pending P0171.
Save these scan-data clues
Freeze frame is a snapshot of conditions when the PCM matured the fault. It can distinguish an idle-only problem from a load, cold-start or monitor-completion problem. Clearing first throws that context away.
- Exact VIN, platform, model year and engine sales code
- All confirmed, pending and permanent companion codes
- RPM, load, coolant temperature and vehicle speed
- Relevant commanded and actual scan data
- Recent service, repairs and symptom conditions
- Manufacturer bulletin and current software/VIN status
A practical diagnostic workflow
- 01Save lambda correction at idle and load
Pattern directs the first branch.
- 02Inspect and smoke intake/PCV
Avoid flammable spray methods.
- 03Test purge closed-state sealing
A click does not prove closure.
- 04Validate MAF/MAP and boost path
Use engine-specific known-good data.
- 05Test low and high fuel pressure safely
Direct injection and TDI require special equipment.
- 06Check exhaust and lambda feedback
Do not replace the sensor from code wording.
- 07Verify correction under original conditions
Confirm no pending P0171.
Do not replace the most commonly named component from P0171 alone. Confirm the exact engine, preserve evidence and complete the manufacturer test sequence before ordering parts.
Why the model year changes the test
BMW 335i diagnostics divide primarily between twin-turbo N54 E9x cars, single-turbo N55 late-E9x/F30 cars and market-specific variants. The engines share a badge but not boost actuators, injectors, Valvetronic hardware or fault-code families. Confirm VIN, chassis, production date, engine, DME software and modifications before applying an N54 30FF or N55 2C57 procedure.
- N54 and N55 crankcase, charge and sensor layouts differ.
- Bank comparison is valuable on both inline-six DMEs where adaptations are available.
- 2D2E adds throttle-to-manifold-pressure evidence.
- Tunes and atmospheric blow-off modifications can distort air modeling.
P0171 FAQ
Does P0171 mean the oxygen sensor is bad?+
No. It reports excessive lean correction; leaks, measured air and fuel delivery are common causes.
Can I drive?+
Briefly with mild symptoms and steady lamp; stop for flashing misfire or stalling.
Why compare idle and load?+
Vacuum leaks usually dominate at idle while weak fuel supply worsens with demand.
Can PCV failure cause it?+
Yes, especially on engines with a diaphragm integrated into the cover.
Can purge cause it?+
Yes if the valve passes flow when it should seal.
Can an exhaust leak cause it?+
Yes before the upstream lambda sensor.
Should learning be reset first?+
No. Save adaptation evidence first.
What confirms repair?+
Correction remains near target under idle and load with no pending P0171.
Ford diagnostic references
These documents explain Ford monitor operation. Exact pinpoint tests, connector views and specifications must be selected for the truck's VIN and model year in current service information.
01BMW SIB 12 16 11 — 2C57 low-boost diagnosisFactory charge-path, vacuum, modification and primary-fault checks for low-boost plausibility↗02BMW Technical Information SystemOfficial VIN-, engine- and ISTA test-plan information↗03BMW owner's manualsOfficial VIN/model operating, warning and maintenance information↗