LCD not showing when core enters __WFI()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LCD not showing when core enters __WFI()

811件の閲覧回数
MithileshKumar
Contributor II

I want to put core into low power run mode and enter into __WFI (). But at this time the lcd should be showing display. I am not able to achieve this. Could you please help on this.

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

783件の閲覧回数
ramprakash08
Contributor IV

It seems you're struggling with maintaining the LCD display while transitioning the core into low power run mode using the __WFI() function. This issue can be resolved by configuring the LCD controller to stay active during low power mode.

Keep in mind that the __WFI() function induces sleep mode in the core, potentially affecting peripherals like the LCD. However, certain NXP microcontrollers offer the option to keep peripherals operational in low power mode. This often involves setting a power control bit in a register.

For instance, in some NXP microcontrollers, the LCD controller's power control bit is found in the LCD Control register (LCDCON). Setting this bit to 1 maintains LCD activity during low power. Here's a code excerpt demonstrating this:

LCDCON |= (1 << LCDCON_LCDPWR);

Remember that the exact register and bit names could differ based on your microcontroller. Refer to its reference manual for accurate details.

Also, ensure the LCD controller employs a clock source that remains active during low power, often the system oscillator.

If the issue persists, furnish more specifics about your setup, including the microcontroller type and the code governing low power mode and LCD control. This will aid in providing precise assistance.

0 件の賞賛
返信

657件の閲覧回数
MithileshKumar
Contributor II

@ramprakash08 Thank you for the response.

My aim is to attain feature like screensaver i.e., when in low power run mode, the screen should display some content and on touch it wakes up from sleep and goes to main window. What is happening at my end is that I have put 30s wakeup time but during that wakeup time the screen goes black. Once 30s expires the screen come backs and resume the previous task. Below are the changes done in power_mode_switch_bm project.

 

    LPM_Init();
    APP_PowerPreSwitchHook(LPM_PowerModeFullRun);
    APP_PowerModeSwitch(LPM_PowerModeFullRun);
    APP_PowerPostSwitchHook(LPM_PowerModeFullRun);
    APP_Elcdif_Cfg();
    while (1)
    {
    static uint32_t waitcount = 0;
    static bool flag = false;
 
 
        if (flag == false)
        {
        waitcount++;
 
        if (waitcount > 200)
        {
        waitcount = 0;
        flag = true;
            CLOCK_SetMux(kCLOCK_LcdifPreMux, 0);
            CLOCK_SetDiv(kCLOCK_LcdifPreDiv, 1);
            CLOCK_SetDiv(kCLOCK_LcdifDiv, 1);
        APP_GetWakeupConfig(s_targetPowerMode);
        APP_SetWakeupConfig(s_targetPowerMode);
        APP_PowerPreSwitchHook(LPM_PowerModeLowPowerRun);
            APP_PowerModeSwitch(LPM_PowerModeLowPowerRun);
            APP_PowerPostSwitchHook(LPM_PowerModeLowPowerRun);
            __DSB();
            __ISB();
            __WFI();
            __DSB();
            __ISB();
            GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, LOGIC_LED_OFF);
        }
 
        }
 
APP_Elcdif_Process();
    }

 

Am I doing something wrong?

0 件の賞賛
返信