Hi Jonathan,
I think I'm getting closer. I modified the mcg.c module to work with my custom board using a 32MHz external crystal and a MK24FN1M0VLL12 MCU. I've attached mcg.c because I'm unable to cut and paste for some reason with Window 10. In my main I'm able to successfully proceed through each transition (see below). However, after the final transition MCG_PBE_to_PEE(), the next function call results in the Reset_Handler getting called.
int main(void)
{
BOARD_InitPins();
CLOCK_SetXtal0Freq(32000000U);
MCG_FEI_to_FBE(); // transitioned successfully
MCG_FBE_to_PBE(); // transitioned successfully
MCG_PBE_to_PEE(); // appears to transition successfully
delay(DELAY_VALE); // Reset occurs here
for (;;)
{
___asm("NOP");
}
}
Looking at the Reset Control Module (RCM), I see that the LOCKUP bit in the RCM_SRS1 register gets set. Indicating an ARM core LOCKUP event. Any idea what might be causing this?
Thanks,
Peter