This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC1310: UART register retention in standby mode

Part Number: CC1310


Tool/software: TI-RTOS

Hi,

I am confused about register retention in standby mode, please comment on my understanding and test result, Thanks.

From "Table 6-5. Power Modes as Defined in TI-RTOS" from RTM, the "Register retention" is "Partial", and says "See Figure 6-3 for modules with retention."

In "Figure 6-3. Digital Power Partitioning in CC26x0 and CC13x0", UART module is colored in orange which means "Module no retention"

In "6.6.4 Standby Mode", it says "All parts in MCU_VD with retention, as shown in Figure 6-3, are retained in standby mode. All other logic in MCU_VD must be reconfigured after wake up from Standby mode."

Based on above information, i think the UART module should be re-initialized after wake up from standby mode.

But, my test result does not support the claim, below is my test method.

I use uartecho example from SDK, and make below modification in echoFxn function

while (1) {
// UART_read(uart, &input, 1);
// UART_write(uart, &input, 1);
UART_write(uart, echoPrompt, sizeof(echoPrompt));
Task_sleep(200000);
}

System will go to standby mode after calling Task_sleep(), then go back to active after the timeout.

Based on my understanding, the register is not retained in standby mode, and it should be re-initialized to work after wake up from standby

But, in my test, i just call UART_write() without re-initialization, and i still can see the output in TeraTerm

  • Hi,

    you are right, UART register content is lost during standby and must be re-initialized after wake-up. The UART driver solves that problem by registering a callback in the power driver. The power driver notifies the UART driver (and any other driver registering a callback) whenever it wakes up from standby. The UART driver then re-initializes the UART registers. Have a look at <SDK_INSTALL_DIR>/source/ti/drivers/uart/UARTCC26XX.c:

    UART_Handle UARTCC26XX_open(UART_Handle handle, UART_Params *params)
    {
        // [...]
        /* Register notification function */
        Power_registerNotify(&object->uartPostObj, PowerCC26XX_AWAKE_STANDBY, (Power_NotifyFxn)uartPostNotify, (uint32_t)handle);
        // [...]
    }
    
    /*
     *  ======== uartPostNotify ========
     *  This functions is called to notify the UART driver of an ongoing transition
     *  out of sleep mode.
     *
     *  @pre    Function assumes that the UART handle (clientArg) is pointing to a
     *          hardware module which has already been opened.
     */
    static int uartPostNotify(unsigned int eventType, uintptr_t eventArg, uintptr_t clientArg)
    {
        /* Reconfigure the hardware if returning from sleep */
        if (eventType == PowerCC26XX_AWAKE_STANDBY) {
            UARTCC26XX_initHw((UART_Handle) clientArg);
        }
        return Power_NOTIFYDONE;
    }

  • hi, Richard,

    thank you very for your explanation.