Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C code to send AT comand and receive OK

Status
Not open for further replies.

cdl121

Newbie level 2
Joined
Nov 7, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
hardware detail:-
TMS320C5515
TELIT GL865
TXS0102(voltage level converer)

softwear detail:-
code composer studio v5
window 7(64bit)

want to send AT command and receive OK

code used for transmit at command


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
void UartTxChar(unsigned char ch) //function to transmit character
{
    CSL_Status status;
    while (((hUart->uartRegs->LSR) & (0x0020)) != 0x0020);
    status = UART_write(hUart, &ch, 1, 0);
    if(status == CSL_SOK)
            {
              // printf("\n  sent %c",ch);
            }
            else
            {
                //printf("\n  Write Failed");
            }
    //USBSTK5515_waitusec(1000);
    //while(command != ch );
 
}
void UartTxString(unsigned char *str) //function to transmit string
{
 
//while(*str != '\0')
{
UartTxChar(*str);
*str++;
}
UartTxChar(0X0D);
UartTxChar(10);
USBSTK5515_waitusec(25000);//put it to wait for sending
USBSTK5515_waitusec(2500000);//put to wait for the ok




code to receive ok


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void uart_rxIsr(void)
{
 
    //printf("rxc");
//UART_read(hUart,&command,1,0);
    command = CSL_FEXT(hUart->uartRegs->RBR,UART_RBR_DATA);
    //if (command == 's')
    //{
    //  gcount = 1;
 
//      dsp_call = 0;
    //}
 
    Recv[etc] = command;
    for( j = 0; j<=etc; j++ )
     printf("%c",Recv[j]);
    etc++;
}



can anyone help me to find where is the problem and how to solve it
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top