Other Parts Discussed in Thread: CC2530EM
Hi,
Following a previous post on this topic ( http://e2e.ti.com/support/wireless_connectivity/f/158/t/324748 ) I have tried to follow the same procedure to write a message over UART_1 on p1_6 and p1_7 of the CC2530EM. I'm using Putty terminal program to view the output but I'm not getting anything.
I understand the code below omits the use of the callback function but all I want to to is do a basic test of the UART, I don't need to test for any special events.
My code uses the genericApp application in Z Stack Mesh and is as follows;
In genericApp.c :
void GenericApp_Init( uint8 task_id )
{
unsigned char str[]="Hello everybody";
halUARTCfg_t uartConfig;
uartConfig.configured = TRUE; // 2x30 don't care - see uart driver.
uartConfig.baudRate = HAL_UART_BR_115200;
uartConfig.flowControl = TRUE;
uartConfig.flowControlThreshold = 48; // 2x30 don't care - see uart driver.
uartConfig.rx.maxBufSize = 128; // 2x30 don't care - see uart driver.
uartConfig.tx.maxBufSize = 128; // 2x30 don't care - see uart driver.
uartConfig.idleTimeout = 6; // 2x30 don't care - see uart driver.
uartConfig.intEnable = TRUE; // 2x30 don't care - see uart driver.
uartConfig.callBackFunc = NULL;
HalUARTOpen (HAL_UART_PORT_1, &uartConfig);
HalUARTWrite(HAL_UART_PORT_1, str, 15);
}
I have enabled UART=TRUE in preprocessor.