the service manual has detailed troubleshooting for the electronics. i have seen a lot of people report the voltage regulators going bad on these bikes, but according to the manual, the vrreg is also adjustable if the output is too low. you'll have to do some testing to see what kind of voltage is being produced at certain RPMs to determine if the output is correct, and you'll want to do the testing with a fully charged battery (of course).
other reasons (of you haven't already checked) are corroded contacts/oxide buildup, which can cause impedance. cleaning all the contacts and recoating with dielectric or other non-insulatory corrosion resistant products is always a good thing to do if you haven't.