Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Compiler/CC2530: UART in Z-stack 3.0

$
0
0

Part Number:CC2530

Tool/software: TI C/C++ Compiler

Hello

I am a beginer in zigbee network.

I want use uart in generic_app in z-stack 3.0. I config uart in function zclGenericApp_Init :

halUARTCfg_t uartConfig;
uartConfig.configured = TRUE; 
uartConfig.baudRate = HAL_UART_BR_115200;
uartConfig.flowControl = TRUE;
uartConfig.flowControlThreshold = 48;
uartConfig.rx.maxBufSize = 128; 
uartConfig.tx.maxBufSize = 128; 
uartConfig.idleTimeout = 6; 
uartConfig.intEnable = TRUE;
uartConfig.callBackFunc = NULL;
HalUARTOpen (HAL_UART_PORT_0, &uartConfig)

after I put


uint8* mes= " UART0 Message ";

if ( keys & HAL_KEY_SW_1 )
{

HalUARTWrite (HAL_UART_PORT_0,mes,sizeof(mes));
}

in 

zclGenericApp_HandleKeys function.

in IAR preprocessor , i define 

HAL_UART=TRUE
ISR_KEYINTERRUPT
HAL_UART_DMA=1

But when i press key 1, no message trans over uart port.

Can you tell me where is problem ?

Thanks


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>