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.