2001 rubicon 500 code 10

Just picked this quad up for cheap I was under the assumption that it needed a transmission but after pulling the shift motor i noticed it was locked up and was able to free it. I am currently getting a code 10 but at completely random times just as I fire it up then it might be good for a while or after doing a bunch of donuts. What happens is the d1 d2 and esp all start flashing and it will only run in first and shudders in reverse. Usually I can turn the machine on and off a couple times and it goes out of limp mode. so far I have done the following
cleaned and dielectric grease all connectors
bench test shift motor
checked resistance of angle sensor-checked ok
checked power and grounds to ecm-good
cleaned all grounds
battery is good
took shift motor apart and cleaned, it looked good before cleaning
machine has 4000km
i went to the dealer were the previous owner had it and they said they had diagnosed it as needing a new ecm which is what I’m leaning towards but the previous owner declined to have the repairs done.
Any input or suggestions would be appreciated I just wanted some more input before I put out the money for an ecm. I’ve searched around and read most of the posts about these problems online and the repair results seem to be across the board or people never posts when they have actually figured it out. I’ve also tried clearing the codes and initializing the ecm multiple times and it will still randomly go into the limp mode after. After clearing the codes and initializing it will go into limp mode the next time I turn the machine on or just cuizing around. I drove it across the yard after clearing and initializing went through all the ESP gears d1 and d2 and it wouldn’t go into limp mode. I’m leaning towards the ecm but I though something could also be given not on with the shift motor and throwing the ecm off.

Okay so I just went took out the ecm so I could have a look at it checked the voltage at the angle sensor this was good. Initialized the computer. Then started it and shut it off a couple times and I get a code 5 twice I also seem to still be getting the code 10 at random. I initialized a couple times and the shift motor is still going through it’s cycle but it sounds bad. It sounded good with 12v hooked up on the bench but on the machine it
sounds slow and whiny. I wondered if there was a issue with the shift motor and it was sending a signal back to the ecm. The previous owner said he was flying along a logging road and then it just started slowing down untill it hit the basement. I know there is no "1st" gear but that’s what he said all the way down to first but he never said anything about the dash blinking just sent it strait to the dealer.

2001 rubicon 500 code 10

Just picked this quad up for cheap I was under the assumption that it needed a transmission but after pulling the shift motor i noticed it was locked up and was able to free it. I am currently getting a code 10 but at completely random times just as I fire it up then it might be good for a while or after doing a bunch of donuts. What happens is the d1 d2 and esp all start flashing and it will only run in first and shudders in reverse. Usually I can turn the machine on and off a couple times and it goes out of limp mode. so far I have done the following
cleaned and dielectric grease all connectors
bench test shift motor
checked resistance of angle sensor-checked ok
checked power and grounds to ecm-good
cleaned all grounds
battery is good
took shift motor apart and cleaned, it looked good before cleaning
machine has 4000km
i went to the dealer were the previous owner had it and they said they had diagnosed it as needing a new ecm which is what I’m leaning towards but the previous owner declined to have the repairs done.
Any input or suggestions would be appreciated I just wanted some more input before I put out the money for an ecm. I’ve searched around and read most of the posts about these problems online and the repair results seem to be across the board or people never posts when they have actually figured it out. I’ve also tried clearing the codes and initializing the ecm multiple times and it will still randomly go into the limp mode after. After clearing the codes and initializing it will go into limp mode the next time I turn the machine on or just cuizing around. I drove it across the yard after clearing and initializing went through all the ESP gears d1 and d2 and it wouldn’t go into limp mode. I’m leaning towards the ecm but I though something could also be given not on with the shift motor and throwing the ecm off.

Okay so I just went took out the ecm so I could have a look at it checked the voltage at the angle sensor this was good. Initialized the computer. Then started it and shut it off a couple times and I get a code 5 twice I also seem to still be getting the code 10 at random. I initialized a couple times and the shift motor is still going through it’s cycle but it sounds bad. It sounded good with 12v hooked up on the bench but on the machine it
sounds slow and whiny. I wondered if there was a issue with the shift motor and it was sending a signal back to the ecm. The previous owner said he was flying along a logging road and then it just started slowing down untill it hit the basement. I know there is no "1st" gear but that’s what he said all the way down to first but he never said anything about the dash blinking just sent it strait to the dealer.