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.

MSP430FR6045: how to set external clock oscillate constantly

Part Number: MSP430FR6045


Tool/software:

Hello experts

Hope this finds you well.

We want to know how to set the external clock (ceramic resonator) connected to USSXTIN and USSXTOUT to oscillate constantly?


For example, if there is a method (code) that can be inserted into the main routine to set the oscillation state at all times, please let me know.

When the following code is inserted into the main routine, does it become constant oscillation?
// Turn on USSXTAL
HSPLUSSXTLCTL |= USSXTEN;

Background: Currently, intermittent oscillation appears to be intermittent oscillation with an oscillation time of 0.8ms.
Reason: I want to match ceramic resonators, but the oscillation time is short, 0.8ms, and the matching evaluation is not possible

Regards,

Jieyu

  • Hi Jieyu,

    I'm not sure I understand your reasons for this, but I see that you want to do a test of the oscillator to match with another one?

    Is there a reason you are doing this in the USS example code, rather than by using another simpler example code that uses the USSXT?

    My recommendation would be to take one of our clock system example codes from TI Resource Explorer, and edit it to activate and use the USSXT instead of the HFXT or LFXT.  You can find the equivalent registers and settings in the Device Family User's Guide. In particular, section 20 + 20.3 should be helpful.

  • Thank you Dylan.

    Is it possible to output an external clock connected to the USSXTI from the USSXT_out pin?
    How do I use MCU pin_No95 (P8.7/UCB1STE/USSXT_bout/A13) as USSXT_bout?

    Is it possible to output by executing the following code and setting XTOUTOFF=0 in the HSPLLUSSXTLCTL register?
    HSPLUSSXTLCTL &= ~XTOUTOFF;

    //HSPLUSSXTLCTL.XTOUTOFF = 0 and output USSXT_BOUT

    Regards,

    Jieyu

  • Yes it is possible to output the USSCLK on USSXT_BOUT - this is the buffered clock output of the USSXT.

    Once you've enabled the USSXT oscillator using the register and bitfield you mention above, you can enable the USSXT output by clearing the XTOUTOFF bit in the same register. Please see the family user's guide section 20.2 for more details on this.

    You must also set pin 95 / P3.4 into USSXT_BOUT mode using the following code snippet:

    P3SEL0 |= BIT4;
    P3SEL1 &= BIT4;
    P3DIR |= BIT4;

**Attention** This is a public forum