This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/MSP430F5419A: NOT ABLE TO GET RESPONSE OF AT COMMANDS FROM MSP430F5419A CONTROLLER WITH SIM7600E GSM MODULE WITH 9600BAUD RATE AND 1MHZ FREQUENCY

Part Number: MSP430F5419A

Tool/software: TI C/C++ Compiler

Hello,

 I'm working with MSP430F419A controller and SIM7600E GSM module so the issue i'm facing is that not able to get the response of an AT command in my response buffer i'm clearing it before sending the  new AT command properly.

Below code i,m using for getting in response buffer:-

memset(response,'\0',sizeof(response)-1);
//memset(response,'\0',40);
check_status=0;
SEND_AT_CMD(netclose);
SIM340_RESPONSE(response);//9
check_status = compare("+NETCLOSE:0",response,5);

Function which is used  for SIM340_RESPONSE

void SIM340_RESPONSE(char *resp)
{
char resp_buffer[30];
int count = 0,loop = 0;
unsigned long waitcount=0;
unsigned long waitlimit=50000;
memset(resp_buffer,'\0',30);

while(x != '\r'){
waitcount++;
if(waitcount >waitlimit)
break;
}
x = '\0';
waitcount=0;
while(x != '\n'){
waitcount++;
if(waitcount >waitlimit)
break;
}
x = '\0';
waitcount=0;
while(x == '\0'){
waitcount++;
if(waitcount >waitlimit)
break;
}
waitcount=0;
do
{
resp_buffer[count] = x;
x = '\0';
while(x == '\0'){
waitcount++;
if(waitcount >waitlimit)
break;
}
count++;
waitcount++;
}while(x != '\r' && waitcount < waitlimit);
x = '\0';

while(x != '\n'){
waitcount++;
if(waitcount >waitlimit)
break;
}
x = '\0';

for(loop=0;loop<count;loop++)
*(resp+loop) = resp_buffer[loop];

*(resp+loop) = '\0';
return; 

}

for SEND _AT COMMAND

void SEND_AT_CMD(char *at_ptr)
{
tx_ptr = at_ptr;
TX_STRING(tx_ptr);
//rx_array_ptr = rec_array;
return;
}

so please check your response is valuable for me.

  • Hi,

    Could you explain more clearly about what issue you are face for MSP430 part? Not just the whole system issue which may lead by the SIM7600E GSM module itself or the communication between the two parts.

  • Hello Wei,

        yaa off course i will explain you that my GSM baud rate is  9600 and i have set the controller baud rate also 9600 i will show you the code ,i think that the reason behind not getting response in response buffer properly is because of is there issue of baud rate miss match

    below is code for UART of controller to sent Baud rate please check it correct or not

    P3SEL |= BIT4+BIT5;                                                                // select p3.4 and p3.5 as TXD and RXD respectively
    P3DIR |= 0x1A;                                                                         // Set TX, RTS as output. P3.4 = 1 & P3.3 = 1
    UCA0CTL1 |= UCSWRST;                                                       // **Put state machine in reset**
    UCA0CTL1 |= UCSSEL_2;                                                      // SMCLK
    UCA0BR0 = 6;                                                                         // 1MHz 9600 (see User's Guide)
    UCA0BR1 = 0;                                                                         // 1MHz 9600
    UCA0MCTL = UCBRS_0 + UCBRF_13 + UCOS16;             // Modln UCBRSx=0, UCBRFx=0,
    UCA0CTL1 &= ~UCSWRST;                                                  // **Initialize USCI state machine**
    __no_operation();
    UCA0IE |= UCTXIE;
    UCA0IE |= UCRXIE;                                                            // Enable USCI_A3 RX interrupt

     

  • hello,

    any suggestions guy's...please give any suggestion waiting for your response.

  • Hi,

    Sorry for reply late.

    Your UART configuration looks good.

    Firstly, you should confirm the GSM module sending out the data properly. Try to scope the signal of the UART to confirm the data on the signal bus is okay.

    Then, if the data is sent out by GSM module properly and you should check if the RX buffer of MSP430 UART get the data and trigger the interrupt.

**Attention** This is a public forum