Hello,
I've a strange problem. On my development board (Freedom K22FN), now I run the exactly same code on my custom board, debugging it over JTAG and the code gets stucked here:
#ifdef SYSTEM_SMC_PMPROT_VALUE
SMC->PMPROT = SYSTEM_SMC_PMPROT_VALUE;
#endif
/* High speed run mode enable */
#if (((SYSTEM_SMC_PMCTRL_VALUE) & SMC_PMCTRL_RUNM_MASK) == (0x03U << SMC_PMCTRL_RUNM_SHIFT))
SMC->PMCTRL = (uint8_t)((SYSTEM_SMC_PMCTRL_VALUE) & (SMC_PMCTRL_RUNM_MASK)); /* Enable HSRUN mode */
while(SMC->PMSTAT != 0x80U) { /* Wait until the system is in HSRUN mode */
}
#endif
The code gets locked in line 8.
What stops a kinetis MCU to enter high speed run mode?
And what could be the possible problem?
-Michael