Thanks for the quick response!
The MK20DX256VLH7 does indeed run at 96 MHz (at least unofficially) in an over-clocked mode and does so reliably according to Paul Stoffregen at PJRC (Teensy 3.2 boards).
Nevertheless, it looks like that bit (EREFS0) is currently set high and using an external 16 MHz crystal. To convert to a 16 MHz external oscillator I just clear that bit.
As for the rest of the MCG registers, they should be in the same state they are now (divide external oscillator by 4 to get 4 MHz and then set PRDIV0 to multiply by 24).
The MCG registers are as follows:
MCG_C1 0x20
MCG_C2 0x24 <== change to 0x20 for external oscillator.
MCG_C3 0x6A
MCG_C4 0x0B
MCG_C5 0x03 <== divide external oscillator by 4
MCG_C6 0x40 <== PLL selected and multiply by 24
MCG_S 0x6E Read Only
MCG_SC 0x6A
MCG_ATCVH 0x00
MCG_ATCVL 0x00
MCG_C7 0x00
MCG_C8 0x80
If I interpret the manual correctly, that should do it, right?
Thanks again!
Hi Marv De Beque,
Unfortunately, we do not support or recommend operating outside the range of frequency established for this part, which has a limit of 72MHz.
The modifications and settings needed to achieve a speed higher than that may cause the MCU to not behave as intended, and we cannot guarantee functionality outside this range.
I'm sorry for the inconvenience this may cause.
Please let me know if you need any more information.