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.

External resonator for MSP430G2553 launchpad detection and software awareness

HI everyone,

My question is about the MSP430 board with M430G2553 chip installed.

The external resonator provided with the kit isn't installed but installation is pretty simple. My question is explicit to the hardware and software interaction with the external resonator part which is supplied with the launchpad kit:

1. once installed is the silicon automatically detecting its presence and just starts using it instead of the internal oscillator which would be used in the absence of the external part? What's the detection mechanism of identifying whether external resonator is present or not?

2. is any programmatic interaction possible at all; both in the sense of detecting the presence of the resonator? if yes what are the mechanics of detection? registers? values? 

3. in the absence of programmatic detection what would be a good quick and dirty way to detect it: for example run a loop and observe a waveform with infinite persistence enabled and expect to see a clean trace WITH the resonator while the internal oscillator would slowly blob the screen?

Thanks everyone!

~B

  • Boyan Biandov said:
    once installed is the silicon automatically detecting its presence and just starts using it instead of the internal oscillator which would be used in the absence of the external part?

    No. You have to enable the external crystal in the BCS registers (BCSCTL3 to be exact).

    Boyan Biandov said:
    What's the detection mechanism of identifying whether external resonator is present or not?

    Generally you could enable it and then wait to see if there is a valid output (by testing OFIFG in IFG1). Search for some examples.

    Boyan Biandov said:
    2. is any programmatic interaction possible at all; both in the sense of detecting the presence of the resonator? if yes what are the mechanics of detection? registers? values? 

    Yes. Read the User's Guide (SLAU144). Particularly Chapter 5.

    No need to go answer question 3.

  • The G2x family has no fallback for the LFXT1. The LFXT1 oscillator for the crystal (not resonator, as this usually means a ceramic HF resonator) is always active after power-on and the crystal (if present) should start. It might, however, require a different capacitance setting than the default of 6pF (depends on the crystal, see crystal datasheet or use try&error). Once the crystal is running, the LFXT1OF bit (BCSCTL3) will clear. However, the OFIFG bit needs to be cleared if MCLK should be sourced by LFXT1 (as long as OFIFG is set, MCLK runs from DCO, no matter what you configure, and OFIFG is always set at power-on).
    There is no need to install the crystal. You can use the (very imprecise) VLO by setting LFXT1S_2 for ACLK. Or you set LFXT1S_3 and feed-in an external clock signal (datasheet says 50kHz max, but experiments have shown that even 16MHz are accepted)
    So there is no detection mechanism for the bare presence of the external crystal, but a detection for whether there is an oscillation on XT1 pin, whether it comes from a working crystal or an external clock source.

**Attention** This is a public forum