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.

MSP430FR2311: Migration from MSP430g2332 to MSP430FR2311

Part Number: MSP430FR2311
Other Parts Discussed in Thread: MSP430G2332,

I'm using MSP430g2332. But i want to change to MSP430FR2311. So I need to migrate my code from g2332 to fr2311. I have 4 questions now,

1. Can I set the DCO frequency to a non-default value? Such as 380KHz or 2MHz.

2. Is there any difference between their Timers?

3. Is there any difference between their ADCs?

4. Is there any difference between their I/O interrupts?

  • Hi Destin,

    You will find the following migration guide (SLAA649) to be useful: www.ti.com/.../slaa649d.pdf

    MSP430G2332: One 16-bit Timer_A, 8-channel ADC10 vs MSP430FR2311: Two 16-bit Timer_B, 8-channel ADC10 but with a completely different ADC core and register properties/settings. And yes, the DCO can be set to a different value from its default but this is done through the clock system (CS) registers instead of using calibrated settings of DCOCTL/BCSCTL1. Port interrupts basically remain the same. I suggest you refer to the FR2311 examples of the involved peripherals.

    Regards,
    Ryan
  • Ryan,

    Thank you very much. About the first question, is the self-setting frequency of FR2311 as accurate as calibrated setting DCO?
  • Hi Destin,

    To ensure the FLL can be locked, DCO software trim is recommended for the target clock frequencies other than the maximum valid values(It's 16MHz for FR2311). You can find the section 3.2.11 of the MSP430FR4xx and MSP430FR2xx Family User's Guide for the trim guide.

    We also provide a code example msp430fr231x_CS_07.c to show how to configure MCLK for 1MHz and use DCO software trim to lock FLL. You can modify the parameter of macro definition  MCLK_FREQ_MHZ and reuse the function Software_Trim() for your target clock frequency.

    An example for 8MHz target clock frequency:

    Step 1: modify the macro in line72

    #define MCLK_FREQ_MHZ    1 ==> #define MCLK_FREQ_MHZ   8

    Step 2: Configure the DCO to your target frequency, such as line77~82 of the code example.

    Step 3: Call the Software_Trim() after enable the FLL(line82). Taking an example below:

        CSCTL3 |= SELREF__REFOCLK;              // Set REFO as FLL reference source
        CSCTL1 = DCOFTRIMEN_1 | DCOFTRIM0 | DCOFTRIM1 | DCORSEL_3;// DCOFTRIM=3, DCO Range = 8MHz
        CSCTL2 = FLLD_0 + 243;                  // DCODIV = 8MHz
        __delay_cycles(3);
        __bic_SR_register(SCG0);                // enable FLL
        Software_Trim();                        // Software Trim to get the best DCOFTRIM value

    Wei,

    MSP Customer Applications

  • Wei,

    Thank you very much for your support!
  • Hi Destin,

    Sounds good.

    But please pay attention for the clock setting below 1MHz, such as 380KHz. Then you should configure the DCO above 1MHz and then divide to 380KHz by DIVM bit, for example 1.52MHz/4 = 380KHz.

**Attention** This is a public forum