Hello,
I am working on cc2530 with z-stack home.
I want to configure any of the either port of cc2530 for UART communication.
I found a post on TIE2E-
then I defined the functions as it is in my code..but the serial communication is not working.
#include "ioCC2530.h"
unsigned char output;
//..............................................................................
void initUART(void) //sets all configurations in UART
{
CLKCONCMD = CLKCONSTA & 0xB8; //clock control
while(CLKCONSTA & 0x40);
PERCFG&=~0x01; //Alernative 1 selected for UART0 peripheral.
P0SEL |= 0x0C; //P0.2 and P0.3 peripheral mode enabled.
U0CSR |= 0xC0; //UART mode selected for USART0.
U0UCR |= 0x00; //H/w flow control disabled
U0GCR |= 0x08;
U0BAUD = 0x3b; //Baud rate set to 9600 bps
}
//..............................................................................
//..............................................................................
void send(unsigned char c)
{
UTX0IF = 0;
U0DBUF=c;
while (!UTX0IF);
UTX0IF = 0;
}
//..............................................................................
since i only want to send data out so i used only send function.
when I call send function i.e.
send (output);
the program stuck at
while (!UTX0IF);
in the send function.
please help to resolve the issue.
Regards
Dhanraj