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.

CC2640: CC2640 sleep issue

Part Number: CC2640

Hi, All

I used the UART of CC2640. Below is my initialization for UART.

void UART_Send_Init(void)

{

    UART_Params_init(&UART_Test_params);

    UART_Test_params.baudRate = UART_BAUD_RATE;

    UART_Test_params.readMode = UART_MODE_CALLBACK;

    UART_Test_params.readDataMode = UART_DATA_BINARY;

    UART_Test_params.writeDataMode = UART_DATA_BINARY;

    UART_Test_params.readCallback  = Uart_read_callback;

    UART_Test_params.dataLength = UART_LEN_8;

    UART_Test_params.stopBits = UART_STOP_ONE;

    UART_Test_params.readEcho = UART_ECHO_OFF;

 

    UART_Test_handle = UART_open(Board_UART, &UART_Test_params);

    wantedRxBytes = 1;

    UART_read(UART_Test_handle, rxBuf, wantedRxBytes);

}

when I used below code to close the UART, the current of CC2640 is about 6uA, It can meet system's requirement.

      admin_status_mode = 0;

      GAPRole_TerminateConnection();

      app_advert_set (FALSE);

      UART_Send_String ("+SLEEP\r\n");

      UartClose_GpioOpen ();  

If I only comment  the UART_Send_String ("+SLEEP\r\n") in above code.  The current will increase to 1mA. 

if I comment the UART_read(UART_Test_handle, rxBuf, wantedRxBytes) in initial, and comment UART_Send_String ("+SLEEP\r\n"). The current is  about 6uA. 

So why the UART cannot be closed when I did not send some data before I use the "UartClose_GpioOpen ()"?

Thank you

Victor