Code 12 -Idle Air Bypass motor not controlling idle properly (generally idle too low) - IAB dirty or not working. Take it off and clean it thoroughly with throttle body cleaner. Clean the electrical contacts with non flammable brake parts cleaner at the same time.
See the "Surging Idle Checklist for help with all your idle/stall problems. Everything you need to find and fix idle problems is in there.
The first two posts contain all the updates to the fixes. At last count there were 24 possible causes and fixes for surging idle/stall problems. I continue to update it as more people post fixes or ask questions.