Modified system clock configuration

-Definitively set run-mode clock config register
-Added while loop to allow main osc to reach expected frequency