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.

MSP432E401Y: RTC Interrupt Generation for Subsecond Mode

Part Number: MSP432E401Y

I am following the sample as listed in the  API guide at following link.


software-dl.ti.com/.../group__hibernate__api.html

There the example listed below is what I am following.

"The following example shows how to use the Hibernation module RTC for a TM4C123x device to generate an interrupt at a certain time"

I needed to run the interrupt continuously, and therefore added the the two lines to the interrupt handler.

void
HibernateHandler(void)
{
uint32_t ui32Status;
//
// Get the interrupt status and clear any pending interrupts.
//
ui32Status = HibernateIntStatus(1);
HibernateIntClear(ui32Status);
//
// Process the RTC match 0 interrupt.
//
if(ui32Status & HIBERNATE_INT_RTC_MATCH_0)
{
//
// RTC match 0 interrupt actions go here.
       HibernateRTCSSMatchSet(  0,  HibernateRTCSSMatchGet(0 ) +3277 )     ; //32768/10 for 100mseconds
       HibernateRTCMatchSet(0, HibernateRTCGet() + 0);
//
}
}

If I just portion of the above as below, the it would generate an interrupt every send.

// RTC match 0 interrupt actions go here.
       HibernateRTCMatchSet(0, HibernateRTCGet() + 1);
I am not able to get the RTC to generate interrupt in sub-second basis. Any help is appreciated.
  • I figured it out, and now I can generate an interrupt every 100 ms. The interrupt handler changed to the following.
    void HibernateHandler(void)
    {
        uint32_t ui32Status;
        //
        // Get the interrupt status and clear any pending interrupts.
        //
        ui32Status = HibernateIntStatus(1);
        HibernateIntClear(ui32Status);
        //
        // Process the RTC match 0 interrupt.
        //
        if(ui32Status & HIBERNATE_INT_RTC_MATCH_0)
        {
            // RTC match 0 interrupt actions go here.
            HibernateRTCSSMatchSet(  0,   32768/10  )     ;  //32768/10 for 100mseconds
               HibernateRTCSet(0);         //HibernateRTCSet(0);  // clear the initial value
        }
    }


    I don't know if there is a better way to do this, but it appears to work.