Hello,
If the Clock monitor feature is enabled by setting the CMU.CSR.RCDIV and CMU.CSR.CME, the CMU.ISR.OLRI bit should be set if XOSC<IOSC (if RCDIV is 0) right?
Yes, this is correct in case:


is there any additional configuration required?
See above
whether the OLRI bit is set only if clock is not available in the beginning?
What do you mean? Could you elaborate closer?
what if clock is there in the beginning and later there is some issue in the XOSC clock and it is going unstable after the initialization process? Still the OLRI bit is set in this case?
XOSC clock you mean? Then CMU if enabled and set will trigger OLR line. As picture above represents.
I have tried configuring the FCCU for the above fault(fccu fault id 26), but if we configure short or long reset for the above fault, does the controller reset? If yes, then how to detect it as we would have lost XOSC clock and even watchdog timer(WDT) or WDT toggle would need peripheral clock for its operation which in turn comes from XOSC?
The controller will take configured action in FCCU. FCCU and all safety related features are clock from safety clock (IRC).
How to switch to internal clock(IROSC) immediately when the XOSC is lost? can u please brief the steps to switch to IROSC here(pseudocode would be much appreciated)?
If your device is clocked from XOSC, and you loose clock, you need to take reset trough FCCU and after reset you will boot from IRC clock and analyze the fault sources.
-
Even if the clock is switched to IROSC when XOSC is lost, how is it prescaled? because IROSC is 16MHz and XOSC is 40MHz, and how is it matched so that few peripherals would still continue to work?
[Peter] - Safety peripherals are clocked from IRC. So the device will take appropriate action. Which in case of loss of clock is reset.
Best regards,
Peter