Problem with my 2005 Pontiac Grand Prix
3.8 V6 3800 Series 2
Check engine Light
Done to repair this problem = Battery was replaced, throttle body
and mass  airflow sensor were cleaned.
Question = About a month ago the engine shut off while I was driving down the   
road. It started right up after I pulled over to the side and stopped. A few days  
later, it wouldn't start at all. The mechanics said it was a bad battery. They  
replaced it, but a few days later the car wouldn't start again. This time they  
cleaned the throttle body and mass airflow sensor. It worked fine for a month or  
so, but now the check engine light is on and the engine shut off on me again  
while driving down the road. It started right back up again though. Any advice  
you could give would be very helpful.

JK:
The first time it died and would not start, did it crank? If not, that would explain  
the battery replaced. Now the check engine light is on. First you would need to  
get the
computer scanned for the stored trouble code in the computer that set  
the light. This is always the first step, since there are many things that can cause
 a stall. Many of the large parts store chains will do this for free. With that codes  
number, i would be able to offer some help. Again, too many things can cause a  
stall from a bad sensor, wiring problem, to a faulty fuel pump.
/
Other Repair
Questions
Grand Prix Stalls and Now Won't Start
1990 Pontiac Grand Prix. Engine size = 3.1L.
Warning lights = Check engine. Check Engine light flashes 12.
Repairs: Replaced MAP sensor, Coil Bank, Computer
Question = 1990 Grand Prix run for about a mile than stop running, replaced the parts list about
above, spark plugs don't getting any spark to the plugs. Don't have a code reader but got a 12
when the check engine flashes. Whats wrong?
Answer: A flashing code 12 of the check engine light is not a code and all.
That is just the ECM telling you it is awake and can communicate. If the
check engine light is on there must be a code stored aside from flashing 12.
That code is probably the key to what's wrong with your car. I would suggest
going to one of the large national part store chains and have them plug in a
code reader for free. But by what you describe this sounds like a problem
with either the crankshaft position sensor or the ignition module underneath
the coils. The crank position sensor sends a signal to the ignition module
telling it that the engine is turning. This is what is used for spark control as
well as injector control. If you do not have spark and you do not have
injector pulse, then most likely the crank sensor is bad. But if you do have
injector pulse then that usually means the ignition module is bad