My apologies. It's a 2008 Pontiac G6 2.4L. My code reader and Dr. mechanic google told me that it was due to the ECM not remembering my throttle position at idle.
It was idling rough and would randomly die. Then it wouldn't start at all, but would crank and crank. So, I tested it and replaced the fuel pump. Once installed I think the ECM got used to the rough idle and continued to act close to before, except the car would idle by fluctuating between 500-1200 rpm.
I tried to reset the ECM by turning (not starting) the key position to ON for 60 seconds, then starting the car and letting it idle for 3 min. I did this a couple times and NOTHING. Finally, I think I got it reset by slowly depressing the pedal to the floor with the key to ON. I did this about 3 times and it started right up. It idled at like 1500 or a little more. I figured the ECM was finally learning the position, and drove it for about 20-30 miles between 55-85 mph to give it a good drive cycle.
When I got home she idled at 800-900 without any issue, but had new check engine codes. One was throttle position voltage low on circuit A, and the other code was throttle position voltage high on circuit B. However, she runs great but I don't know if it's temporary or of I gotta worry about the new codes lol.
Sorry about not giving vehicle info first.