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.

RTC only can not wake up by RTC alarm

Hello

I have refered the post topic http://processors.wiki.ti.com/index.php/C55xx_RTC_ONLY_MODE_SUPPORT

Now,  the system can enter RTC Only mode.  But It can not wake up by RTC Alarm.

When I set the 1s Alarm interrupt,  the led will shock. But system can not wakeup.

From datasheet, the high pulse should > 30.5us.

But I don't know how to change it,  or I can not do this,  just because it is controlled by RTC internally.

This problem is blocking our project for long time.

We are waiting for your help

Thanks.

  • Hi,

    Team will work on this and will provide an update on the same.

    Thanks & regards,

    Sivaraj K

  • Great that you have read the wiki page. Attached is a modified version of wiki file for alarm. It is a reference and have not been confirmed on HW. Please share your code afterward.

    As for the >30.5us requirement, it is for external WAKEUP input only.

    7888.wakeup_abb.c.rtf

    Regards.

  • Hello Steve

    Thanks for your help.  Now, the wakeup from RTC Alarm can work well according to your document.

    1: From the program behavior,  I found the system will restart completly after wakeup,  right or wrong?

    2: And another question is where the DSP instruction will stop after power BG_PD and LDO_PD is setted by 1.

    For example,  after WU_DIR input & LDO & BG shutdown,  the remaining instructions can not be excutted.

    Is it right?

    asm(" *port(#0x1930) = #0x0006 "); //WU_DIR input & LDO & BG shutdown

    // following instruction can or can not continue?

    asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags

    // Enter RTC-only

    while (1){

    .............

    .......

    }

    Regards
    William Zhu

  • Thanks for your help.  Now, the wakeup from RTC Alarm can work well according to your document.

    Steve: That's great! Please post your working code for others to share.

    1: From the program behavior,  I found the system will restart completly after wakeup,  right or wrong?

    A1: Since RTC-Only mode shuts down all LDOs powering the device, specifically the DSP, as such. when power is backed up, it is same as a restart from beginning.

    2: And another question is where the DSP instruction will stop after power BG_PD and LDO_PD is setted by 1.

    A2: The DSP will continue to execute instructions till the power drops down below the minimum operation level (you can find it in datasheet). The time is various, thus, you should assume valid operation stops after power BG_PD and LDO_PD is set.

    Regards.

  • Hi Steve

    Please read following code.  There are three wakeup method, including external wakeup, RTC alarm and RTC

    periodic interrup.   I choose periodic interrup for 1 second.   Please check the following code.

    This instruction can enable it.

    asm(" *port(#0x1924) = #0x0022 "); //EXTINTEN enabled and second periodic interrup

    When this program is running,  Led will light and delay a long time,  and then be turned off for 1 second.

    This procedure will repeat again and again.  It proves periodic interrup works well as our expected.

    void main(void) {

            Uint16 temp1920, temp1924;

            Uint32 i;

            // when system wake up  the led will be last a long time.  It's easy to judge wakeup is successful or not.   

            for(i=0; i<10000000; i++);    // delay and watch LED

           asm(" @#IFR0_L = #0xffff || mmap() "); // clear int flags
            asm(" @#IER0_L = #0x0000 || mmap() "); // set RTC int
            asm(" @#IFR1_L = #0xffff || mmap() "); // clear int flags
            asm(" @#IER1_L = #0x0004 || mmap() "); // set RTC int
            asm(" bit(ST1,#11) = #0 "); // GLOBAL INTERRUPT ENABLE


    // RTC configure


            asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags

            asm(" *port(#0x1900) = #0x0001 "); //RTCINTEN enabled

            asm(" *port(#0x1924) = #0x0022 "); //EXTINTEN enabled and second periodic interrup

            asm(" *port(#0x1930) = #0x0000 "); //WU_DIR input


            do // waiting until RTC interrupt is enabled in the RTC domain could take 2 RTC clocks for write to propagate

            {

                    temp1924 = *(volatile ioport unsigned int *) (0x1924);

            } while ((temp1924&0x0022)==0);


            temp1920 = *(volatile ioport unsigned int *) (0x1920);

            if ((temp1920&0x0022)!=0)

            {

                    asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags

            }


            asm(" *port(#0x1930) = #0x0006 "); //WU_DIR input & LDO & BG shutdown

            asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags


    // Enter RTC-only

            while (1)

            {

                    temp1920 = *(volatile ioport unsigned int *) (0x1920);

                    if ((temp1920&0x0022)!=0)

                    {

                    asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags

                    asm(" *port(#0x1930) = #0x0006 "); //WU_DIR input & LDO & BG shutdown

                    asm(" *port(#0x1920) = #0x803F "); //clear interrupt flags

                    }

            }

    }

    // Interrupt code

    interrupt void rtc_isr (void)
    {

        asm(" @#IFR1_L = #0xffff || mmap() "); // clear int flags
        
        asm(" *port(#0x1920) = #0x803F "); // clear flags
        
        asm(" *port(#0x1930) = #0x0006 "); //WU_DIR input & LDO & BG shutdown
        
        asm(" *port(#0x1920) = #0x803F "); // clear flags
        
        asm(" *port(#0x1924) = #0x0022 ");  //EXTINTEN enabled and second periodic interrup

    }

  • Great!

    Thank you for sharing your result with the community. This would be very helpful.

    Regards.