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.
I am using cc2530 with z-stack. Currently I exploring UART drivers. I took "SensorDemo" as basic application.
I have switched off compile options ZTOOL_P1 and MT_TASK because they also take use of UART.
Then I initialize UART:
First I prepare the callback function:
void UART_Multiplexor_in ( uint8 port, uint8 event )
{
HalLcdWriteString( "Something good", HAL_LCD_LINE_3 );
switch(event) {
case HAL_UART_RX_FULL:
break;
case HAL_UART_RX_ABOUT_FULL:
break;
case HAL_UART_RX_TIMEOUT:
break;
case HAL_UART_TX_EMPTY:
break;
}
}
Then I make task initialization:
void UART_Multiplexor_initUART(void) {
HalUARTInit();
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE;
uartConfig.baudRate = HAL_UART_BR_38400;
uartConfig.flowControl = TRUE;
uartConfig.flowControlThreshold = 48;
uartConfig.rx.maxBufSize = 128;
uartConfig.tx.maxBufSize = 128;
uartConfig.idleTimeout = 6;
uartConfig.intEnable = TRUE;
uartConfig.callBackFunc = UART_Multiplexor_in;
HalUARTOpen (UART_MULTIPLEXOR_PORT, &uartConfig);
}
Ater that I start debugging my application. I make break point at the beginning of callback function UART_Multiplexor_in.
Unfortunately I see that the code of function is never reached.
I send data to application through serial cable, but function UART_Multiplexor_in is never called.
What am I doing wrong?
Please help!