I recently began getting Code 45 faults (Speed Sense Loss) and Code 13 faults (Undervoltage). The symptoms were just like yours; generator would start and immediately shut down, then run in Engine Only mode. The service manual suggested these faults could only be resolved by bringing into a certified Cummins Onan dealer, and that they would need to remove the entire generator out of the RV to inspect and service. I didn't have the means to do this myself, and dreaded bringing it in for service that would take weeks longer than it should and keep me from using the RV.
After several hours of research, I found a number of owners saying they learned (either through self troubleshooting or by way of a dealer) that the cause of their problems wasn't actually what the fault code represented, but rather a blown controller board, so I decided I would check that myself. Sure enough, like so many others my controller was toast. In searching for a replacement I found a
company that makes aftermarket replacement controllers that claim to be of higher quality and also ignore the minor faults that cause the generator to shut down. The only faults it monitors that will cause the engine to shut down are low oil pressure and stator voltage - things that could either harm the engine or sensitive electronics powered in your RV.
After installing the new controller board earlier this week, my generator is working again as it should and powering everything in the camper. I have monitored the output voltage and frequency (Hz) using a digital
Kill A Watt meter, and they're both where they need to be. If you are a do-it-yourself-er, it's quite easy to access the controller, just to see for yourself if this could be causing your issue. The way I figure, the $440 I spent on this new controller was definitely worth it compared to what I would have spent had I brought the RV back to the dealer for service (not to mention the time and hassle of getting it there).
Just so the admins know, I do not work for this company or represent them. I am just trying to help a fellow RVer.