This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48L952 internal to external oscillator switching

Other Parts Discussed in Thread: RM48L952

I am working on RM48L952 controller on the oscillator switching functionality. I have a clock (square wave) of 16MHz coming from an external oscillator and connected to the OSCIN pin of the controller. Normally, after power on my controller works on the external clock and when I manually disconnect the external clock it switches to the internal clock (confirmed by toggling an output pin and observed on DSO). This happens automatically. But now I want to ensure that when my external clock gets healthy again (not manually disconnected), I want to switch back to the external clock. In process of doing this, as per the Technical Reference Manual, I am supposed to clear the OSC_FAIL bit of the GLBSTAT register. But I have observed that it shows random behaviour, i.e at times I am able to clear it but the other times I get stuck in the while loop when I am waiting for that bit to get cleared.

  • I have verified the procedure with a crystal. Are you sure you are not getting reflections or ringing on your clock source on OSCIN?
  • I checked for ripples but there are none.
    The bit gets cleared properly when on disabling the clocks that are using external oscillator as a source.
    systemREG1->GHVSRC = 0x05050005U;
    systemREG1->CDDISSET |= 0xD3C;
    systemREG1->GHVSRC = 0x05
    systemREG1->RCLKSRC |= 0x5;
    systemREG1->VCLKASRC |= 0x505;
    But now the problem is that when I clear that bit, and the oscillator input is still disconnected. The bit at times does not get set again. Is there any procedure to be followed in order to ensure that the bit gets set after it is cleared. And also even if the bit is set, at power on the bit remains set inspite of having external oscillator in working condition.