Write a program to switch to HSE as system clock and measure it.
Procedure
-
Enable HSE Clock using
HSEONbit in theRCC_CRregister; we need to turn the 16th bit to 1.
-
Wait for HSE Clock from crystal oscillator stabilises; is there a bit indicating this?
-
Switch system clock to HSE in
RCC_CR, we want to put10 -
Enable
MCO1signal again.