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.

请教各位TI大神,CC2538的串口要如何打开?

Other Parts Discussed in Thread: CC2538

1.第一个问题就是CC2538的串口要如何打开?串口的初始化如下,但是打印不出来东西,请问问题出在哪里?

static void InitUart(void)
{
halUARTCfg_t uartConfig;
uartConfig.configured =TRUE;
uartConfig.baudRate =HAL_UART_BR_9600;
uartConfig.flowControl =FALSE; 
uartConfig.flowControlThreshold =64;
uartConfig.rx.maxBufSize =128;
uartConfig.tx.maxBufSize =128;
uartConfig.idleTimeout =6;
uartConfig.intEnable =TRUE;
uartConfig.callBackFunc = SerialApp_CallBack;
HalUARTOpen(SERIAL_APP_PORT,&uartConfig);// 打开串口0
}

2.然后CC2538可以通过USB实现串口功能,我不想使用这个功能,想把HAL_UART_USB指定成FALSE,但是为什么在IAR中找不到定义HAL_UART_USB的地方?麻烦大神告知define HAL_UART_USB在哪个文件中?