DC Motor crashes cpu when it nears full speed.

If you can't figure this out, you could try separating the motor from the Arduino.
You could use an optocoupler, as the control signal is digital.
In this case, to have 100 % isolation, you should also use a different power suply to the motor.

So it can be solved anyway, but it's always good to know what causes this so you (as well as us) can avoid this in the future.