I was getting a bad injector code the only time I had problems with my m11. Swapped injectors hole to hole and the problem stayed at #5. So I knew it wasn't injector itself.
I sent my ecm off to a guy who checked it all out (found him on the internet), and he repotted any bad connections. It was around 600-800 if I remember right. Cummins wanted over $3000 for a new ecm, plus another $350 or so to "flash" it to my truck.
After looking at my ecm, he repotted it, and told me that while I had a couple connections that were getting bad, he didn't think any were my real issue.
My issue ended up being a bad connection in the wiring harness between the inside the valve cover harness, and the harness from there to the ecm. I didn't try to fix the connection, I just replaced both harnesses.
Cummins wanted me to replace ECM, flash it, replace both wiring harnesses, and "while you are there", just do all the injectors too. It was over $6,000 worth of parts if I did all of that, which is approaching truck value. I ended up with paying the guy to "fix" my ecm, and the two harnesses.