Hi all.
I want to implement SerialApp for cc2538 in EB. I use 3pins in EB are EM_UART_TX, EM_UART_RX and GND connect to Raspberry Pi. Is it correct?
Raspberry Pi is OK, but i cant get data from EB.
I use again project SampleLight in Home Automation and insert initial Serial Device following in zclSampleLight_Init
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE; // 2430 don't care.
uartConfig.baudRate = HAL_UART_BR_115200;
uartConfig.flowControl = FALSE;
uartConfig.flowControlThreshold = 48;
uartConfig.rx.maxBufSize = 128;
uartConfig.tx.maxBufSize = 128;
uartConfig.idleTimeout = 6; // 2430 don't care.
uartConfig.intEnable = TRUE; // 2430 don't care.
uartConfig.callBackFunc = rxCB;
HalUARTOpen (SERIAL_APP_PORT, &uartConfig);
where SERIAL_APP_PORT =0;
which static void rxCB( uint8 port, uint8 event )
{
if ( event != HAL_UART_TX_EMPTY )
{
// Read from UART
//HalUARTRead( HAL_UART_PORT, pBuf, TXRX_BUF_LEN );
//...//Process receiving pBuf data here by yourself.
}
}
Initial:
uint8 data[2]; data[0] =0x30;data[1] =0x31;
I use function HalUARTWrite(SERIAL_APP_PORT,data,2);
Or, How to connect EB and other device (Raspberry Pi) through UART.
Thanks so much