here's what i did with my 82 xr500
take out the spark plug, put a voltage meter on the ht lead , kicked the bike over, the voltage should be very high, on my bike the spark plug was firing but,not enough, i put a second hand stator coil in and found a huge difference in the voltage. next i checked the cdi unit with a meter, i was told that these dont break. I can send you what colour wires go where if you like. next i checked the timing. took off the tappet cover, lined up the the 2 marks on the cam gear with the top of the head (as per clymers manual) unscrewd the 2 plugs on the left hand side cover and checked to see that the top dead center marks were lined up. i was surprised that although they did line up the piston was not fully at the top of its reach. adjusted the cam chain with the piston at the top of its reach. the timing marks were only slightly out but it made a huge diference in starting the bike. it now starts every time and with no kick back.
hope this helps. let me know if you need wiring of cdi unit