Write a program to switch to HSE as system clock and measure it.

Procedure

  1. Enable HSE Clock using HSEON bit in the RCC_CR register; we need to turn the 16th bit to 1.

  2. Wait for HSE Clock from crystal oscillator stabilises; is there a bit indicating this?

  3. Switch system clock to HSE in RCC_CR, we want to put 10

  4. Enable MCO1 signal again.