Quantcast
Channel: Cypress Semiconductor - PSoC 3 Device Programming
Viewing all articles
Browse latest Browse all 103

why Rx Buffer missing some incoming data after successsful first exection

$
0
0

Hello Everyone 

I have been working on the PSoc3.3 for a while 

I am using the UART component to send the AT commands to the modem

During the First AT command execution RX buffer is working as expected and returning all the values in the Debug terminal 

Sending the AT COMMANDS second time by using While(1) Loop

AT command are sent to the modem by the UART  but the data returning from the modem are missed by the buffer and the values show on the debug terminal is showing some of the incoming data are missed 

since last week i have been trying to the find the issue but not able to solve this issue so i am expecting some help or ideas from this group actually i have wrote an circular buffer to process the data return from the Modem 

unsigned char rx_buffer[256];

unsigned char ptr_rx_buffer_R;  // pointer to position in RxBuffer to write incoming Rx bytes
unsigned char ptr_rx_buffer_W;  // pointer to position in RxBuffer to write incoming Rx bytes

CY_ISR(isr_RX_INT)

    
    while(UART_ReadRxStatus()& UART_RX_STS_FIFO_NOTEMPTY)
    {
    rx_buffer[ptr_rx_buffer_W] = UART_RXDATA_REG;
    ptr_rx_buffer_W++;
    UART_ClearRXBuffer();
    }
  
}

This is my above interrupt function it is working only for the first time after that it is started missing some datas i dont know why please help me to sort out this issue

i have attached the two pictures first one is workign well while in the seocnd picutre you will get clear idea of what i have been facing

 

Thank you

prabhu


Viewing all articles
Browse latest Browse all 103


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