potential causes:
include a vacuum leak, unmetered air leaks Fuel saturated engine oil Leak in turbo air charge hoses (if equipped) Possibly bad O2 sensor (If Mercedes, may require adaptation with M-Benz compatible scan tool.) Oil contamination in MAF connector or O2 sensor connectors. Also check ignition coils, cam and crank sensors, and oil sensor for leakage contributing to oil intrusion in wiring harness. Defective MAF (Mass Air Flow) sensor (especially on Mercedez-Benz and other European autos. There are a lot of problems with aftermarket MAF sensors.) Defective fuel pressure regulator Leaking camshaft adjuster solenoids (Mercedes-Benz).
NOTE:
for some Mercedes-Benz models there is a service recall for a crankcase vent hose located under the intake manifold. It should be checked for leaks/cracking and also operation of check valve in the hose. The check valve should flow only one way.
Possible Solutions:
It should be stated right off the bat that the most common problem associated with this code is the MAF sensor or air mass meter. This is especially the case with Mercedes-Benz and Volkswagen and other European cars. At time of writing, you don't normally see this code with American-made cars, and minimally with Asian, and, to be honest, I have no idea why. It appears to me that the PCM (powertrain control module) logic used by some European car manufacturers to set a P0170 (or P0173) fault code simply isn't used by American vehicle manufacturers. It is more common to see P0171, 0174, 0172, 0175 codes set with regard to fuel trim malfunctions on American cars. There is very little information on the setting conditions for a P0170, or P0173, but what information that is available almost seems to be a redundancy of the P0171,4,2 & 5 setting conditions. I'm sure there's a reason for it, but I can't get anyone to tell me what that is. The similarities between them may be why we don't see this code surface on domestic vehicles very often. It's simply unnecessary. So, simply put, if you have a P0170, your PCM noticed that the fuel trims reached their rich correction limit. Basically it's adding fuel to try to compensate for a lean condition, real or perceived.
If you have this code and access to a scan tool, observe the MAF sensor reading in grams/sec. The reading will be different for different automobiles, so get a good spec. I'm going to stick with what would be normal for a Mercedes (1.8L), since they have the bulk of the trouble. Expect to see at idle 3.5-5 g/s (ideally). At 2500 RPMs with no load it should be between 9 and 12 g/s. On road test, at WOT (wide open throttle) it should be 90 g/s or well above. If it's not in specs, replace it. Be careful of Ebay MAFs. Often they don't work according to OE specifications. If the MAF checks out and there is no oil intrusion at the connector, check fuel pressure and ensure that there are no leaks at the regulator internally or externally. Check all vacuum hoses and confirm none are cracked, disconnected or missing. Make sure there are no vacuum leaks at the intake manifold gaskets or tears in the air supply hose. If the engine is turbo charged, be sure the hoses are in good condition and have no leaks. Leaking turbo pressure hoses could cause a rich condition. Inspect the condition of crankcase vent hose under intake manifold and operation of check valve in the hose. (In the "What are the causes?" section) If there doesn't appear to be any problems with the fuel pressure, MAF or vacuum hoses, then inspect the O2 sensor connectors for oil intrusion. A bad O2 sensor could cause a P0170, or P0173. Repair cause of oil leak and replace oil-fouled O2 sensor.