Conditions for Setting DTC P0507
WARNING: This page is about a different car, the 2004 Buick Rendezvous. However, it is still accessible from the selected car via links, so may be relevant.
The actual engine speed is more than the desired idle speed by at least 200 RPM for 10 seconds.
Or
The ECM detects 3 fuel cut-offs due to an engine over speed condition while the engine is idling.