2013 cadillac srx throws a check engine light and car dies

hello. i have a 2013 cadillac srx. at seemingly random times the car will through a check engine light and the car will die at the same time. still has power. it wont crank back up. just turn over. the check engine light code is p057c. brake pedal position sensor. i have replaced it and it still does it at random times so something else is causing it. i have a scan tool and i can plug it up and clear the code and the car will crank. but once i take it out of park and into any other gear it dies immediately. if i repeat the process enough it will finally let me drive it away. iv done a lot of research and nobody seems to have this same problem. any ideas would be better than what i have now. any help would be appreciated. thanks.

Do you have a multimeter? You will need one to find and fix this problem. The brake pedal sensor is a 3 wire device… B+, Signal and Ground. B+ is battery voltage, the signal should be 0.25 to about 4.75 volts as you press the pedal. It should be a good ground with essentially no resistance.

The P057C code is telling you the signal is low voltage output so suspect the wiring OR suspect a faulty Starter Generator Control Module.

thanks for the reply. would that cause it to die? also i pressed down on the horn this morning and it killed the car while driving. dont know what thats all about lol.