芯片:2530
协议栈:mesh1.0.0
问题:如题,我初始化了串口以及接受中断,串口可以发送数据但是接受不到数据,进入不了接收中断,请问是什么问题呢?急求解决!关键代码如下,感谢。
void GenericApp_Init( uint8 task_id )
{
GenericApp_TaskID = task_id;
GenericApp_NwkState = DEV_INIT;
GenericApp_TransID = 0;
HalUARTInit();
UserUsartInit(); // open the usart
IEN0 |= 1<<2;
void UserUsartInit(void)
{
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE;
uartConfig.baudRate = HAL_UART_BR_9600;
uartConfig.flowControl = FALSE;
uartConfig.flowControlThreshold = HAL_UART_FLOW_THRESHOLD;
uartConfig.rx.maxBufSize = HAL_UART_RX_BUF_SIZE;
uartConfig.tx.maxBufSize = HAL_UART_TX_BUF_SIZE;
uartConfig.idleTimeout = HAL_UART_IDLE_TIMEOUT;
uartConfig.intEnable = TRUE;
uartConfig.callBackFunc = npUartCback;
HalUARTOpen(HAL_UART_PORT, &uartConfig);
}