reinitializing the UART1 RX in low power mode for the RT1050

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

reinitializing the UART1 RX in low power mode for the RT1050

513 次查看
Vinos
Contributor III

 I have recently been looking at the power_mode_switch_rtos example in the RT1050 SDK. The following code will be executed before entering and after exiting low power mode:

 

void APP_PowerPreSwitchHook(lpm_power_mode_t targetMode)
{
    if (targetMode == LPM_PowerModeSNVS)
    {
        PRINTF("Now shutting down the system...\r\n");
    }

    if (targetMode > LPM_PowerModeRunEnd)
    {
        /* Wait for debug console output finished. */
        while (!(kLPUART_TransmissionCompleteFlag & LPUART_GetStatusFlags((LPUART_Type *)BOARD_DEBUG_UART_BASEADDR)))
        {
        }
        DbgConsole_Deinit();

        /*
         * Set pin for current leakage.
         * Debug console RX pin: Set pinmux to GPIO input.
         * Debug console TX pin: Don't need to change.
         */
        ConfigUartRxPinToGpio();
    }
}

void APP_PowerPostSwitchHook(lpm_power_mode_t targetMode)
{
    if (targetMode > LPM_PowerModeRunEnd)
    {
        /*
         * Debug console RX pin is set to GPIO input, need to re-configure pinmux.
         * Debug console TX pin: Don't need to change.
         */
        ReConfigUartRxPin();
        BOARD_InitDebugConsole();
    }
    else
    {
        /* update current run mode */
        APP_SetRunMode(targetMode);
    }
}

 

 What is the purpose of reconfiguring UART1 here? I checked the schematic of the RT1050 Evaluation Kit, and UART1 is not connected elsewhere. Why do we need to reconfigure the RX pin here?

标签 (1)
0 项奖励
回复
3 回复数

478 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

As the low power mode desconfigures UART it needs to be re-enabled. 

Best regards,
Omar

0 项奖励
回复

466 次查看
Vinos
Contributor III
Is there original text in the manual? Why does UART1 need to be reconfigured in low power mode? Since I am using the other 7 serial ports, do they all need to be reconfigured as well?
0 项奖励
回复

441 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

This document details how the power mode behaves on all modules. How to use i.MX RT Low Power Feature (nxp.com) It may depend on the module configuration before entering the power mode or if in a specific power mode it is completely shutdown. 

Best regards,
Omar

0 项奖励
回复