This answer is applicable for many BMWs in addition to the one listed below.
Q
Recently this began occurring on my 2001 330cic every time I start the engine. After about 10 seconds the yellow oil pressure light comes on and stays on for about 10 seconds. It then extinguishes and will not come on again until I stop and re-start the engine. The oil level is correct and I have replaced the oil pressure switch with no improvement. The car has about 90,000 miles. Any idea of what could be wrong? Do you think the oil pressure is marginal or is it just a warm-up phenomenon?
A
The yellow oil-can light is for oil level. Red is for oil pressure. The light should normally come on in red when you first turn the key to the ignition position and then go off after starting the engine (as a test to verify that the system and the light are functional). The yellow light that you see coming on,after starting, is an indication that the oil level is low. Faulty oil level sensors are quite common. Since you have noted that the oil level is proper (per the dip-stick), I would suggest that you replace the oil level sending unit.
Also see this similar BLOG post:


with the yellow light coming on because of sensor would it make the engine light stay on ?
The oil level sensor will not cause the CHECK ENGINE or SERVICE ENGINE SOON light to come on. If this warning light is on, there is an engine management fault code stored. You can read (and reset) the code using the fault code reader & reset tool.
Click HERE for fault code reader & reset tool.