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.

CC1310串口问题

Other Parts Discussed in Thread: SYSBIOS

大家好

最近1310要低功耗,串口部分耗电比较多,我们这里串口不用的时候准备关闭串口,但是关闭串口后程序死机

串口初始化代码

    UART_init();
    UART_Params_init(&uart_params);
    uart_params.readMode = UART_MODE_CALLBACK;
    uart_params.readCallback = Uart_ReadCallback;
    uart_params.writeDataMode = UART_DATA_BINARY;
    uart_params.readDataMode = UART_DATA_BINARY;
    uart_params.readReturnMode = UART_RETURN_FULL;
    uart_params.readEcho = UART_ECHO_OFF;
    uart_params.baudRate = baudrate;

       uart0 = UART_open(Board_UART0, &uart_params);
        if (uart0 == NULL)
        {
            System_abort("Error opening the UART");
        }

串口关闭代码

    if(uart0 != NULL)
    {
        UART_readCancel(uart0);
        UART_close(uart0);
        uart0 = NULL;
    }

调试关闭串口后死机停止部分

谢谢各位了