STR CONFIG


1. STR Introduction

STR(short for Suspend to RAM) means that the device enters a low-power state and only retains RAM for self-refresh. All device and system states are stored in RAM, and peripherals are suspended.


2. APP Enable STR

APP suspension.

Execute "system("echo mem> /sys/power/state");" to suspend the APP. Before that, you need to exit all MI modules and pull down the gpio associated with the module, such as deinitializing DISP/PANEL, uninstalling wifi ko, disable the screen backlight, etc.

If the MI module adds an API, call the corresponding DeInitDev interface when the module exits and releases the module resources. For example, when exiting the DISP module, call MI_DISP_DeInitDev().

MI_S32 SSTAR_DestroyVdec2DispPipe(MI_S32 s32VdecChn, MI_S32 s32DivpChn)
{
    SSTAR_ModuleUnBind(E_MI_MODULE_ID_VDEC, 0, s32VdecChn, 0,
                    E_MI_MODULE_ID_DISP, 0, 0, 0); //DIVP->DISP
    SSTAR_DestroyVdecChannel(s32VdecChn);
    MI_DISP_DisableInputPort(0, 0);

    MI_VDEC_DeInitDev();
    MI_DISP_DeInitDev();

    return MI_SUCCESS;
}

3. APP Recovery

After waking up by an external interrupt, APP needs to re-open the screen backlight, load wifi, and reinitialize Panel/DISP.

External interrupt settings:

The evaluation board sets a GPIO to wake up in pioneer3.dtsi. The GPIO can be specified by the user or set as an interrupt pin corresponding to the touch screen.

App demo can refer to https://github.com/aaron201912/SSD222_Demo SSD222_Demo/bringup/zk_full. The directory is SSD222_Demo/bringup/zk_full.