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.

CC2530串口0异常

Other Parts Discussed in Thread: CC2530

CC2530 zstack 3.0.2 用的是串口0,P0.2和P0.3脚

P0.4和P0.5作为LED的控制,测试时发现P0.5接的LED灯在串口来数据的时候会闪一下

这是为什么?MT_UART_DEFAULT_OVERFLOW 已经设为FLASE了

预编译里

ZTOOL_P1
MT_TASK

串口的初始化如下,

void initUart0()
{
halUARTCfg_t uartConfig;

/* Initialize APP ID */
App_TaskID = 0;

uartConfig.configured = TRUE;
uartConfig.baudRate = HAL_UART_BR_9600;
uartConfig.flowControl = FALSE;
uartConfig.flowControlThreshold = 0;
uartConfig.rx.maxBufSize = 128;//默认128;
uartConfig.tx.maxBufSize = 128;//默认128;
uartConfig.idleTimeout = 6;//默认6
uartConfig.intEnable = FALSE;
uartConfig.callBackFunc = uartRxCb;
HalUARTOpen (HAL_UART_PORT_0, &uartConfig);
}