Check emgine light comes on and engine shuts down and the codes refer to tps 1 and 2

Hi everyone,

I have 2014 xp 1000 and about 4 weeks ago I flipped it because my front diff locked while in 2wd ( that’s another subject). Anyway after I got tha machine back on it’s 4 wheels I checked the levels and then got in the cab to start it up. When I turned the key on the check engine light was on and it wouldn’t start and was flooding really bad and fuel came out the exhaust. I checked the codes and they were 520276-2, 520276-12 which means that there is a problem with the throttle position sensor (1 or 2 Indeterminable). After checking the book the throttle position sensor is actually the PPS or pedal positioning sensor the 12 is Neither Position Sensor Passed Test and the 2 is Position Sensor Correlation Fault. Does anyone know what the 1 and 2 sensors are. All I know is the pedal and pps are a package deal and have to change the pedal if it fails. I did change the pedal and the problem is still occuring. I should mention that it is intermittent as sometimes I turn on the key and it works for 20 mins and the light comes back on and it shuts down. Sometimes the light won’t go out for a week even after disconnecting the battery to try and reset the code. Yesterday it started and I actually went for a small drive and it seemed to be fine. I was out for about 45 mins and when I got back to the house Everything seemed to be back to normal. After lunch I wanted to go for a longer ride and when I turned the key the check engine was back on and it wouldn’t start the codes were the same but this time there was a new one. 652-5 which means the pto injector is open or grounded. Everythingis very weird. This morning I turned on the key and the check engine was off again and the machine started. Has anyone anything like this happen to them before. It all started after it flipped. Checked all ground wires and wiring harness and everything seems to be fine. Is the key switch connected at all to the pedal circuit? I did have a problem with the key acting up until I took it apart and cleaned but besides that never had any other problems with my machine. I know it’s a lot of info to take in but I would appreciate some help on this one. I live in Honduras and the last time I took it to the dealer and it came back worse and I had to go behind them and tighten everything up that they left loose….