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.

MSP430FR2111: How to check if XT1 Oscillator is being used in runtime

Part Number: MSP430FR2111

Hi, my custom MSP430FR2111 board has an external Oscillator XT1 on XIN and XOUT, and I would like to do a runtime check that it's actually being used (properly). In  chapter 3.2.2. it states:

VLOCLK is active in the following conditions:

- VLO is selected as the source of MCLK and SMCLK (SELMS = {3}), and MCLK or SMCLK is active.
- The VLOAUTOOFF bit is cleared and the MCU is in AM through LPM4.
- At least one peripheral requests VLO as clock source.

Does that mean i can just check that the VLOAUTOOFF bit is not cleared in LPM4 mode and that will confirm that the XT1 is being used?

Klas

  • Or do i check the fault interrupt bit as:
    if(SFRIFG1 & OFIFG) // error

    Klas
  • Hi Klas,

    your post is a bit confusing first you're asking about XT1 oscillator and then you refer to VLO. Both are seperate clock sources. While the LFXT1 is driven by an external crystal connected to XIN and XOUT the VLO is an internal oscillator.

    How to setup the LFXT1 is shown in the C Code example msp430fr211x_CS_2.c you can find on the product webpage.

    If it used can be checked via the selection bits in the registers CSCTL3 and CSCTL4. Hope this helps, if not pls let me know.
  • Hi klas,

    VLO is the "Internal Very Low-Power Low-Frequency Oscillator" which different clock source of XT1.

    Please refer to the section 3.2.4 for XT1.

    You can check below fault condition(see part of section 3.2.13):
    • High-frequency or low-frequency oscillator fault (XT1OFFG) for XT1

    The crystal oscillator fault bit XT1OFFG is set if the corresponding crystal oscillator is turned on and not operating properly. Once set, the fault bits remain set until software resets them, even if the fault condition no longer exists. If software clears the fault bits and the fault condition still exists, the fault bits are automatically set again; otherwise, they remain cleared.

**Attention** This is a public forum