reinitializing the UART1 RX in low power mode for the RT1050

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

reinitializing the UART1 RX in low power mode for the RT1050

434件の閲覧回数
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 返答(返信)

399件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

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

Best regards,
Omar

0 件の賞賛
返信

387件の閲覧回数
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 件の賞賛
返信

362件の閲覧回数
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 件の賞賛
返信