Hi. I would like to config the system clock source in case of XOSC failure. But I don't know how to select system clock source. Can anybody help me?
I my opinion, If I want to switch XOSC to IRCOSC, I only need to config AUX Clock Selector 4 and system clock selector,is that right?
For this it is needed to use Mode Entry module. For instance you have configured RUN0 mode to have system clock driven by IRCOSC and RUN1 mode to have system clock driven by XOSC. Changing is being done by transition between user modes.
However as you specifically mentioned XOSC failure, it is recommended to be followed by reset:
Also pay attention to following appnote, specifically to description NCF-NCF:
And here using of FCCU and it is related to this topic as well:
For mode entry module I could recommend to see for instance my example wrriten for MPC5643L but ME module principle is the same. Pay attention to ModesAndClks_init function in main.c file where you can several transitions between user modes:
Hope it helps