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.

MSP430FR6989: Wake from LPM3.5 via RTC at Arbitrary 1ms Intervals

Part Number: MSP430FR6989
Other Parts Discussed in Thread: MSP-EXP430FR6989, MSP430FR2433

Hi Support, 

I'm evaluating a couple of MSP430 devices and am currently using the MSP4306989.

Is there a way to wake from LPM3.5 via the RTC at arbitrary 1-millisecond intervals? It looks like there are a couple of RTC division options via RT0PS and RT1PS (/2, /4, /8, etc.) and options for 8-, 16-, 24-, 32- bit overflow of the RTCNT. But is there a way to set the interrupt to, say, 5ms?

And the maximum interrupt frequency of the RTC in calendar mode is 1-minute, correct?

I was able to achieve the correct interrupt interval through the Timer_A module but the device does not appear to enter LPM3.5 correctly. I'm thinking this is because ACLK is not available in LPM3.5. Is it possible to wake up from LPM3.5 via the Timer module?

void Sleep_LPM35_MS(uint16_t millisec)
{
    /* Timer */
    TA1CTL &= ~MC_3;                    // Stop timer
    TA1CTL |= TACLR;                    // Clear timer
    TA1CCTL0 = CCIE;                    // TACCR0 interrupt enabled
    TA1CCR0 = millisec;                 // @ 1kHz (32kHz XTL / 32)
    TA1CTL = TASSEL__ACLK | MC__UP;     // ACLK, up mode (start counter)


    /* Enter LPMx.5 */
    PMMCTL0_H = PMMPW_H;                      // Open PMM Registers for write
    PMMCTL0_L |= PMMREGOFF;                   // and set PMMREGOFF

    // Enter LPM3.5 mode with interrupts enabled. Note that this operation does
    // not return. The LPM3.5 will exit through a RESET event, resulting in a
    // re-start of the code.
    __bis_SR_register(LPM4_bits | GIE);
    __no_operation();
}

On another evaluation kit (MSP-EXP430FR6989) I was able to achieve my desired behavior with the RTCMOD register. But I don't see the RTCMOD on the 6989. Is there any similar feature on the FR6989?

// Crystal clock = 32kHz => /1000 = 32Hz => 31.25ms
void hibernate_seconds(uint8_t delay)
{
    const uint16_t freq = 32; // Hz

    // Configure RTC
    RTCMOD = freq * delay;     // Interrupt and reset every n-cycles
    RTCCTL |= RTCSS__XT1CLK | RTCSR | RTCPS__1000;
    RTCCTL |= RTCIE;

    // Enter LPM3.5 mode with interrupts enabled. Note that this operation does
    // not return. The LPM3.5 will exit through a RESET event, resulting in a
    // re-start of the code.
    PMMCTL0_H = PMMPW_H;                    // Open PMM Registers for write
    PMMCTL0_L |= PMMREGOFF;                 // and set PMMREGOFF
    __bis_SR_register(LPM3_bits | GIE);
    __no_operation();
}

Thanks,
Brian

**Attention** This is a public forum