An Onan will shut down under a variety of conditions. The most common ones are low oil pressure, no 120vac output, and lack of fuel pressure or 12v power. The start button overrides the auto-shutdown, which is why it continues to run as long as you hold it down. Too bad you did't check the code right after the first shutdown - that would have told you why it stopped. The code youa re seeing now is telling why its not starting, but that could be a separate issue from the original.
Now that you have charged the battery, does the fault code change? Or go away? Also check the 12v wiring at the generator end - the battery may be charged buy voltage to the generator could still be low.
The fuel pump is electric, so low 12v power could cause a lack of fuel or fuel pressure. Another possibility is that there is a pinhole leak or crack in the fuel line, so that the fuel pump sucks air bubbles into the gas.
If you can't resolve the problem yourself, go direct to a Onan shop rather than an RV dealer.