Other Parts Discussed in Thread: MSP430WARE
Hello,
I am using CCS v8.2 along with driver for uart MSP430Ware -v:3.80.05.04. my application is to receive 40 bytes and parse the received bytes. the problem here i am facing is unable to to debug using single step and unable to receive all the bytes (ie some of the bytes are missing.) below is the code snippet, I have also found the resolution to receive all bytes ie to compare single byte.
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A0_VECTOR
__interrupt
#elif defined(__GNUC__)
__attribute__((interrupt(USCI_A0_VECTOR)))
#endif
void EUSCI_A0_ISR(void)
{
switch(__even_in_range(UCA0IV,USCI_UART_UCTXCPTIFG))
{
case USCI_NONE: break;
case USCI_UART_UCRXIFG:
//RXData = UCA0RXBUF;//EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
//while(!(UCA0IFG&UCTXIFG));
RXData= UCA0RXBUF;
// UCA0TXBUF=RXData; //used for loop back
u0_rx_buff[u0_rx_buff_cntr]=RXData;
/*if this comparision (RXData==')') is done the code works just fine */
/*if this comparision (u0_rx_buff[u0_rx_buff_cntr-1]==')')is done the code hangs*/
if(RXData==')')//if(u0_rx_buff[u0_rx_buff_cntr-1]==')')
{
EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'P');
}
u0_rx_buff_cntr++;
break;
case USCI_UART_UCTXIFG: break;
case USCI_UART_UCSTTIFG: break;
case USCI_UART_UCTXCPTIFG: break;
}
}
I dont know whats the is issue in comparing the array . Any suggestions would be appreciated.
B.R.
Gourav