This works...the cruise is directly tied to the brake lights...when I replaced the brake and side light bulbs on my 2004 Santa Fe,,,the cruise started working with no other adjustments. It must complete a circuit or something.
I also having this problem with my Hyundai elite I20. My head light is also blew up 4 time in a year & finally gave my car to my nearest Hyundai dealer. They check out the problem and put my headlight for free as I was having warranty. Now my headlights are working good and hadn't replace the bulb since a year.
This was my experience, as you have Hyundai Sonata , either you should check out your nearest Hyundai dealer or here I am attaching you a video if you want to alone solve out this problem/issue of head light.
Filling up the gas tank can stir up the fuel fumes. You may need to check your evap system? I can't rule out bad gas?
When the problem is ongoing, have a helper crank it while you check for spark at the plugs. If spark everywhere, use a gage and check proper fuel pressure and fuel injector pulse. With intermittent issues, need to test when problem is ongoing. How long since a tune-up? Any applicable trouble codes?
Problems at higher rpms, the basics, you check for a blockage of some kind, fuel--air--exhaust.
code p 0320 refers to crankshaft position sensor (CKP)/ engine speed (RPM) sensor --circuit malfunction===causes wiring---CKP/RPM sensor--ECM
from your statement of moving coil wires and it temporarily fixed the fault , I suspect wiring failure to the tacho( RPM sensor) as the RPM sensor works of coil impulses
by moving wires you may be altering the circuit fault for the CKP sensor
take it to an accredited service center for a proper diagnosis
Certain conditions must be met for the monitors to set on obd systems. If you can't get a test to run and set, find out via scanner which monitors are not set. The manufacturer may have a list of conditions required. For example a certain test may require two drive cycles, or driving the engine to normal operating temp twice. Now imagine if a temp sensor isn't functioning correctly. That test may never run.