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.

AM620-Q1: Understanding the low power modes

Part Number: AM620-Q1

Tool/software:

Hello,

        We have a requirement to run the application on MCU before the linux core boots on A53 core? I got this to work by flashing to emmc boot partition. 

Q1. Is it loaded to DDR and M4F executes from DDR? This is because when I enter into MCU only mode by following the steps mentioned in 3.3.5. Low Power Modes — Processor SDK AM62x Documentation I could see there is no response when any key is pressed in MCU uart. I added debug log continuously in the mcu uart to verify the mcu only mode. But the log stops after 31 counts.


[IPC RPMSG ECHO] Suspend request to MCU-only mode received
[IPC RPMSG ECHO] Press a sinlge key on this terminal to resume the kernel from MCU only mode
I am running 0
I am running 1
I am running 2
I am running 3
I am running 4
I am running 5
I am running 6
I am running 7
I am running 8
I am running 9
I am running 10
I am running 11
I am running 12
I am running 13
I am running 14
I am running 15
I am running 16
I am running 17
I am running 18
I am running 19
I am running 20
I am running 21
I am running 22
I am running 23
I am running 24
I am running 25
I am running 26
I am running 27
I am running 28
I am running 29
I am running 30
I am running 31
I am▒C

Another requirement is to save power by powering down the Linux core with M4F periodically waking up using rtc and checking for voltage levels using external ADC. It should wake up the main core when the voltage is above the threshold. If not, it should go back to sleep.

Q2. Does Partial IO mode suit this need? If the MCU wakes up on RTC interrupt, does the main core also wake up which will consume more current?  we don't want the main core to be up when the voltage is being checked.

Q3. What is the TI suggestion to achieve this goal? 

Please share any references if available. Thanks in advance. 

  • Hello,

    I'm looking into this and will get back to you. Please ping the thread if you haven't gotten a response by Thursday.

    Thanks,

    Anshu

  • Hello,

    Is it loaded to DDR and M4F executes from DDR?

    During MCU Only mode, DDR is in self refresh so nothing will execute from DDR.

    I could see there is no response when any key is pressed in MCU uart. I added debug log continuously in the mcu uart to verify the mcu only mode. But the log stops after 31 counts.

    Can you share any changes to code to make the debug log? Which SDK version are you using for this?

    Does Partial IO mode suit this need?

    Partial I/O mode will shut off almost the whole SoC expect the CANUART pins. This includes the M4F core. Partial I/O will not wakeup from RTC since the RTC will be off.

    For any low power mode applications that require the M4F to be on, MCU Only mode is the suitable option.

    Thanks,

    Anshu

  • Please provide answers to all my 6 questions. Thanks in advance.

    1. Can you share any changes to code to make the debug log? Which SDK version are you using for this? I initially used 09.01 later used the latest one.

    2. Partial I/O mode will shut off almost the whole SoC expect the CANUART pins. This includes the M4F core. Partial I/O will not wakeup from RTC since the RTC will be off. Does any wakeup trigger from Partial IO mode by CANUART pins makes the A53 and M4F core boot. I want to understand specifically if the Linux also boots when any of the IO pin is triggered.

    3. Is there a way, like programming the DM / Wake up firmware to modify how the device should wakeup from Partial IO/MCU only mode. Basically, does a customer have control over DM firmware related to wakeup.

    Attached below is the code snippet from ipc_rpmsg_echo.c. Highlighted the newly added code.

    4. Basically, I added a while loop which will print to the uart continuously with certain delay. I understand the uart blocking call will be called to come out of low power mode. But, I want to confirm if the MCU keeps running in the MCU only mode.

    void lpm_mcu_uart_wakeup_task(void* args)
    {
    int32_t status;
    UART_Transaction trans;
    uint8_t uartData;
    uint32_t count=0;

    UART_Transaction_init(&trans);

    status = SemaphoreP_constructBinary(&gLpmSuspendSem, 0);
    status = SemaphoreP_constructBinary(&gLpmResumeSem, 0);
    DebugP_assert(SystemP_SUCCESS == status);

    while (1)
    {
    /* Read 1 byte */
    trans.buf = &uartData;
    trans.count = 1U;

    /* Wait for suspend from linux */
    SemaphoreP_pend(&gLpmSuspendSem, SystemP_WAIT_FOREVER);


    DebugP_log("[IPC RPMSG ECHO] Suspend request to MCU-only mode received \r\n");
    DebugP_log("[IPC RPMSG ECHO] Press a sinlge key on this terminal to resume the kernel from MCU only mode \r\n");

    gNumBytesRead = 0u;

    while(1)
    {
    //if(RPMessage_getLocalEndPt(pRpmsgObj) == 13)

    DebugP_log("I am running %d\r\n", count++);

    uint32_t timeout=0;
    while(timeout < 1000000)
    timeout++;
    }
    /* Wait for any key to be pressed */
    status = UART_read(gUartHandle[CONFIG_UART0], &trans);
    DebugP_assert(status == SystemP_SUCCESS);

    while ((gNumBytesRead == 0u) && (gbSuspended == 1u))
    {

    }

    if (gNumBytesRead != 0)
    {
    DebugP_log("[IPC RPMSG ECHO] Key pressed. Notifying DM to wakeup main domain\r\n");
    //SOC_triggerMcuLpmWakeup();
    SOC_generateSwWarmResetMainDomainFromMcuDomain();
    /* Wait for resuming the main domain */
    SemaphoreP_pend(&gLpmResumeSem, SystemP_WAIT_FOREVER);

    DebugP_log("[IPC RPMSG ECHO] Main domain resumed due to MCU UART \r\n");
    }
    else if (gbSuspended == 0u)
    {
    UART_readCancel(gUartHandle[CONFIG_UART0], &trans);
    DebugP_log("[IPC RPMSG ECHO] Main domain resumed from a different wakeup source \r\n");
    }

    if (gbShutdown == 1u)
    {
    break;
    }
    }
    SemaphoreP_destruct(&gLpmSuspendSem);
    SemaphoreP_destruct(&gLpmResumeSem);
    vTaskDelete(NULL);
    }

    5. what is the difference between SOC_triggerMcuLpmWakeup() and SOC_generateSwWarmResetMainDomainFromMcuDomain()?

    6. Is it possible to put the A53 core in powered down instead of suspend to RAM before going into MCU only mode?

  • Hello,

    Are you testing MCU Only mode on a TI EVM or custom board design?

    Does any wakeup trigger from Partial IO mode by CANUART pins makes the A53 and M4F core boot.

    Yes, the whole SoC will resume. Please see section 6.2.4 Power Modes in the AM62x TRM: https://www.ti.com/lit/ug/spruiv7b/spruiv7b.pdf

    Is there a way, like programming the DM / Wake up firmware to modify how the device should wakeup from Partial IO/MCU only mode. Basically, does a customer have control over DM firmware related to wakeup.

    The wakeup processes are pre-defined in the DM Firmware and not able to be changed. I'll double check on this.


    what is the difference between SOC_triggerMcuLpmWakeup() and SOC_generateSwWarmResetMainDomainFromMcuDomain()?

    I recommend you make a seperate thread for this question. This is MCU+ SDK specific question which not in my expertise. You can also look into <MCU+ SDK Directory>/source/drivers/soc/am62x/soc.h for some additional information.


    Is it possible to put the A53 core in powered down instead of suspend to RAM before going into MCU only mode?

    No its not possible within MCU Only mode. You can send requests to the DM Firmware to power down the A53 cores, but this is not MCU Only mode.

    Thanks,

    Anshu

  • Hi Anshu,

     The wakeup processes are pre-defined in the DM Firmware and not able to be changed. I'll double check on this. Could you please confirm this?

    No its not possible within MCU Only mode. You can send requests to the DM Firmware to power down the A53 cores, but this is not MCU Only mode. - What is this mode then?

    Are you testing MCU Only mode on a TI EVM or custom board design? - I am testing it in AM62X-SK_LP evk

  • Hello,

    No its not possible within MCU Only mode. You can send requests to the DM Firmware to power down the A53 cores, but this is not MCU Only mode. - What is this mode then?

    This is not a specific low power mode. This is just adjusting what cores are active and which ones are not.

    A Low Power Mode will be pre-defined and there isn't flexibility for what cores/peripherals are active and what is not. An Active State allows for this customization. 

    Thanks,

    Anshu