Hi all,
I have a PCB with k64fx512 MCU onboard (self-made), additionally there is 24MHz crystal connected to the MCU as external clock source.
The problem I faced with when I tried to enter PEE state is that it seems to be impossible.
In order to transfer to PEE, it is necessary to perform a transition to FBE mode. For this, it is required to setup correct divider into FRDIV register, so the frequency is between 31.25 kHz to 39.0625 kHz. But this is impossible with the dividers options available: 32, 64, 128, 256, 512, 1024, 1280, 1536.
When I set divider to 512 or any other, I never can pass the check of IREFS to be cleared. The code waits for IREFS to be 0, and it hangs there.
Is there any ways to overcome this issue?
Additionally, I cannot use IRC48M as a source for MCG - same situation, wait forever for IREFS to be cleared. But KDS suggests that according to AN4905 IRC48M cannot be used as MCG source due to chip limitations.
Will be grateful for the help.
Hi, Sywksms,
As you said that the input clock frequency of FLL must range from 31.25KHz to 39.0626KHz, because of discrete divider, the divider can be only 32, 64, 128, 256, 512, 1024, 1280, 1536, for 24MHz, 24MHz/512=46.875KHz, 24MHz/1024=23.4375Khz, obviously, none of the clock frequency locates at the range from 31.25~39.0625KHz.
I do not think there is any alternative, you have to change another crystal for example 8MHz or 10MHz. 8MHz/256=31.25KHz, 10MHz/256=39.0625KHz.
Hope it can help you.
BR
Xiangjun Rong