Hi, Mar it should be noted that the reasons your check engine light or CEL stays on constantly or flashes and your bike will or will not start and may turnover or not, these conditions will vary from bike to bike depending on the year, make, and model and you should always refer to your owners/service manual for proper diagnostic procedures. It should also be noted that any type of prior work done to the bike or an abnormal event occurrence IE: adding accessories, electrical curiosity or adventures, laying the bike down or crashes, rainstorms or bike washings just before CEL light issues started can be significant hints or aids into tracking down the gremlin, also for 2003 and older models carry the appropriate jumper wire to access fault codes and reduce the risk of being stranded or towed also keep in mind that your CEL comes to life if anything, and I do mean anything isn't 100% with the ECM like parameter spikes. This means that you could be staring at a major repair, or your speedometer sensor is contaminated and needs to be cleaned.
And the usual suspects are:
1. Severely discharged or a damaged battery check the terminals for damage or corrosion, check the battery cables at "BOTH" ends for loose, corroded, or broken connectors, "INSIDE" and outside the cable harness, perform connector wiggle test and check cables with an ohmmeter if necessary, you should have 12.5 volts or more and be able to pass a proper "LOAD" test if necessary, you may have a preliminary reading of 12.5 volts or more but little or zero amperage the battery is faulty and must be replaced, AGM batteries fail in this scenario more so than lead-acid batteries.
2. Faulty charging system.
3. Faulty system sensor some models have up to 40 sensors
4. Faulty safety switches: run/off, ignition, clutch lever, neutral, side stand, tip over, fuel, and or their connections.
5. The engine got wet where it didn't like to get wet.
6. Faulty ignition circuit spark plugs, coils, cables etc.
7. Broken wire or worn insulation exposing wire to a ground situation especially inside wire harness at tight bends around fairing brackets, under dash panels, under fuel tanks over cylinder heads etc. Many harnesses are open on the ends that will allow water to enter and accumulate at v-bends.
Dielectric grease and contact cleaner are your best friends for wire/cable/harness connectors, look for corroded, broken, or loose pins/sockets. Run speedometer diagnostics and check for generated fault codes.
For more information about your issue and valuable "FREE" downloads that you will need for viewing or printing please click on the blue links below. Good luck and have a wonderful day.