Code 37 is Invalid Set Configuration.
The controller senses the engine speed through a signal from the magnetos, as well as the frequency of the AC output.
It compares these 2 inputs as a ratio, and if the ratio falls out of spec, it shuts the set down and gives this signal.
1. The engine is running at the proper RPM, but the AC frequency is too high or too low, this code is set.
2. The AC frequency is correct, but the engine is running too slow or too fast, this code is set.
What needs to be done is to measure the frequency - a frequency meter is absolutely required for this - and then completely test the ignition system (spark plugs, spark plug wires, magnetos, controller connections).
If a problem is found, it needs to be corrected.
If no problem is found with either system, the controller is bad and must be replaced.
The controller is very expensive, about $500 as best I recall, so a thorough test is called for.