DTC P0507 is Idle Control System RPM Higher than Expected.
First, check for any loose vacuum lines around the area of the intake manifold and throttle body. Next make sure the electrical connector to the IAC valve is tight and properly connected. You can remove the IAC valve and clean with throttle body or carb spray cleaner. Clean the spring loaded pintle. Do not move pintle. Also, clean the IAC orifice/seat at the throttle body. If that doesn't work then the IAC is bad and will need replacement.
__________________
'08 Pontiac Grand Prix GXP (Dark Slate Metallic) - LS4 5.3L V8
'08 Pontiac Grand Prix GXP (Liquid Silver Metallic) - LS4 5.3L V8
'02 Oldsmobile Alero GL2 - LA1 3400 V6
'99 Buick Regal LS - L36 Series II 3800 V6
'03 Honda CR250R MX - 2 Stroke 250cc '97 Pontiac Grand Prix GTP - L67 Series II 3800 V6 Supercharged Timeslip 08/12/06