If having disconnected the battery and/or cleared DTCs,
to get the on-board PCM I/M Smog tests back to a complete state (as long as there is no problems with smog devices) try doing this GM drive cycle
A complete driving cycle should perform diagnostics on all systems.
A complete driving cycle can be done in under fifteen minutes.
To perform an OBDII Driving cycle do the following:
Cold Start. In order to be classified as a cold start the engine coolant temperature must be below 50°C (122°F) and within 6°C (11°F) of the ambient air temperature at startup.
Do not leave the key on prior to the cold start or the heated oxygen sensor diagnostic may not run.
Idle. The engine must be run for two and a half minutes with the air conditioner on and rear defroster on.
The more electrical load you can apply the better.
This will test the O2 heater, Passive Air, Purge "No Flow", Misfire and if closed loop is achieved, Fuel Trim.
Accelerate. Turn off the air conditioner and all the other loads and apply half throttle until 88km/hr (55mph) is reached.
During this time the Misfire, Fuel Trim, and Purge Flow diagnostics will be performed.
Hold Steady Speed. Hold a steady speed of 88km/hr (55mph) for 3 minutes.
During this time the O2 response, air Intrusive, EGR, Purge, Misfire, and Fuel Trim diagnostics will be performed.
Decelerate. Let off the accelerator pedal. Do not shift, touch the brake or clutch.
It is important to let the vehicle coast along gradually slowing down to 32km/hr (20 mph).
During this time the EGR, Purge and Fuel Trim diagnostics will be performed.
Accelerate. Accelerate at 3/4 throttle until 88-96 km/hr (55-60mph). This will perform the same diagnostics as in step 3.
Hold Steady Speed. Hold a steady speed of 88km/hr (55mph) for five minutes.
During this time, in addition to the diagnostics performed in step 4, the catalyst monitor diagnostics will be performed.
If the catalyst is marginal or the battery has been disconnected, it may take 5 complete driving cycles to determine the state of the catalyst.
Decelerate. This will perform the same diagnostics as in step 5. Again, don't press the clutch or brakes or shift gears.