reinitializing the UART1 RX in low power mode for the RT1050

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

reinitializing the UART1 RX in low power mode for the RT1050

433 Views
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?

Labels (1)
0 Kudos
Reply
3 Replies

398 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

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

Best regards,
Omar

0 Kudos
Reply

386 Views
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 Kudos
Reply

361 Views
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 Kudos
Reply