Car starts, then dies quickly after oil pan change. Codes P0021&p0011,+oil light on 2009 Pontiac G6

cleaned ocv solenoid valves, next step is camshaft position sensor, and thinking oil pressure switch. Any other ideas would be greatly appreciated. Replaced oil pan, huge pain, and codes popped right after. Car runs smooth for anywhere from 5 to 10 seconds at idle, then comes to an abrupt halt. Thanks in advance for any advice.

Asked by for the 2009 Pontiac G6
1 answer 2 comments
Got oil in it? Might want to check oil pressure with a gauge. Why did you "change" the oil pan?
Oil level is good, changes do to hole in pan, caught a rock.
Good luck!