1 of 1 people found this helpful
I believe the problem is that you configured your GSM UART for 160 Rx bytes. Therefore the Rx interrupt is enabled.
The Rx ISR will automatically move (read) the incoming Rx data from the FIFO to the 160 byte Rx data buffer.
When this occurs, the Rx status register will automatically clear the GSM_RX_STS_FIFO_NOTEMPTY bit flag (due to the read of the Rx data in the Rx ISR). Therefore you reading the GSM_ReadRxStatus() for the GSM_RX_STS_FIFO_NOTEMPTY bit is not necessary and should never be set at the application level.
Here is a snip of the UART_ReadRxStatus() API call. Note the section in the RED outline.
You can modify the Rx ISR to signal the application that data is available. This is the proper way, in the case where the ISR is reading the Rx data.
Thank you for your advice. I didn't read side Effect. My mistake.