This check engine light comes on in my Sonata 2.4 - 2006 - when I accelerate just after started the engine early in the morning and the car goes also into a limp power mode and the engine won't rev above 2500 rpm . I turn the car off and back on again, no change, check engine light on. Battery was disconnected for resetting the system. Nothing change. The mechanic found with the scanner two failures codes corresponding to Accel. pedal and Accel. electric motor. I decided to try with pedal first and see the response. At the same time the main throttle of air admission was found can't open fully due to their sensor was receiving a wrong signal from pedal or electric motor. The aperture of the throttle was proportional tho the limited acceleration/rpm of the engine. Previous to all these symptoms, the car could develope a top speed of 113 mph only, at sea level under temp. of 93 F, high humidity. No matter the driving conditions, city or highway, the fuel consumption was always abnormally high, very far from standards.
The mechanic found in the pedal six very thin electric cables, very soft like a human hair, with one end properly welded but the other end, that touch/contact an electronic plate without any clamp or welding that can assure the permanent contact.
Every thin cable was able to loss its supposed osition/contact under rough driving conditions. After welding each loosen end (gold of 24k was used) the check engine is off, fuel consumption is outstanding low, acceleration response is better than ever, and I cancelled my previous decision to sell the car.
Hoping you can find this useful having in mind a new pedal replacement can lead to same situation at any time.