A53 core suspend

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A53 core suspend

2,712 Views
Lakshmi_AG
Contributor III

Hi,

I am using imxqm with only A53 cores enabled.

Presently trying to self suspend A53 cores(0,1,2,3) using below mentioned scu API but i see cores are not suspending and DDR also not in refresh mode.

/*************************************sleep sequence****************************************************/

sc_irq_enable(ipc_handle, 297U, SC_IRQ_GROUP_WAKE, SC_IRQ_PAD, SC_TRUE);
    /* Enable GPIO pad wakeup */
    sc_pad_set_wakeup(ipc_handle, 40U, 6U);//SC_PAD_WAKEUP_RISE_EDGE 6U

    /* make sure system sources power ON in low power mode by default */
    sc_pm_req_low_power_mode(ipc_handle, SC_R_A53_0, SC_PM_PW_MODE_ON);
    /* Config system interface HPM, LPM */
    sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_DDR, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF);
    sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_OCMEM, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF);
    sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_OFF, SC_PM_PW_MODE_OFF);
    sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_INTERCONNECT, SC_PM_PW_MODE_ON,
        SC_PM_PW_MODE_OFF);
    sc_pm_set_cpu_resume(ipc_handle, SC_R_A53_0,true, 0x80000000);//
    sc_pm_req_cpu_low_power_mode(ipc_handle, 1U,SC_PM_PW_MODE_OFF, SC_PM_WAKE_SRC_SCU);

__asm__("dsb sy");
    __asm__("wfi");

while(1);

/************************************************************************************************/

/***************************wake-up sequence******************************************/

/* Query SCU wakeup event status */
#if 1
    uInt32 status;
    sc_irq_status(ipc_handle, 297U, SC_IRQ_GROUP_WAKE, &status);
    /* Check for pad wakeup */
    if (status & SC_IRQ_PAD)
    {
        /* Check for GPIO pad wakeup */
        /* Note: SCFW updates pending pad wakeup config to SC_PAD_WAKEUP_OFF */
        uInt8 gpio_wakeup;
        //sc_pad_get_wakeup(ipc_handle, 40U, &gpio_wakeup);
        if (gpio_wakeup == SC_PAD_WAKEUP_OFF)
        {
            /* GPIO pad generated wake event */
            print(DEBUG_PRINT_ALWAYS, "GPIO wakeup\r\n");

 

        } }

 

Is the suspend sequnce all good, because if i add any print statemnt inside while(1), is it still executing that mean A53 are still alive.

Is there any other steps do we need to follow before suspending, or is there any method to check if cores are suspend mode.    

0 Kudos
22 Replies

294 Views
Lakshmi_AG
Contributor III

steps followed:

Power down sequence.

1. Detect the powerd down.

2. prepare scu for core low-power

3. disable irq_steer

4.disable irq,fiq

5. execute wfi(dsb and isb before wfi) 

6. once core is out from wfi scu, poll for scu irq status to check if wake up from configured pad.

7.resuem back core to normall mode.

 

0 Kudos

453 Views
Lakshmi_AG
Contributor III

Hi,

We are looking for the immediate support on wfi not working on A53 cores (imx8qm),

Please help us to identify the issue.

 

Regards

Lakshmi 

Tags (1)
0 Kudos