I am looking to clock a K20(DX32VFM5) from an external 32.768kHz crystal connected to the EXTAL32/XTAL32 pins.
As I've not done this before it's been some trial and error and trying others code - but I've hit a wall.
My problems at this point boils down to crashing/stopping when attempting to access the RTC_CR register.
After enabling the RTC clock gate (SIM_SCGC6 |= (uint32_t)0x20000000UL;) I try to set RTC_CR OSCE but the processor seems never to move beyond this line.
Even reading the RTC_CR register (temp = RTC_CR;) results in the same behaviour.
I have these processors running off internal and external crystals in various configurations without any problems - but this has me stumped.
Does anyone have any suggestions or a working example on how to clock the cpu from the RTC crystal (via FLL, 48MHz)?