Is the ADC conversion is happening properly ? Kindly check the following application note. https://www.cypress.com/documentation/application-notes/an61102-psoc-3-and-psoc-5lp-adc-data-buffering-using-dma .
Vasanth R S
Thank you for your reply, I am controlling an External ADC with the help of SPI communication, I want to use the SPI configuration without DMA,
SPIM_ReadRxStatus needs to be compared to the return values to check if the event has occurred. For example, in your case, you are checking if the SPI RX has received any data. If no data is received, you stay in the while loop. To do that :
while(!(SPIM_ReadRxStatus & SPIM_STS_RX_FIFO_FULL())
In most cases, the ideal way to poll the ReadRxStatus is to check if the no of bytes sent = no of bytes received. For example in your case, you are sending 1 byte of data. Stay in the while loop until you receive one byte of data in the RX FIFO. This will indicate that you have received the byte correctly.
while(SPIM_GetRxBufferSize() != no_of _bytes_transmitted);
If the above doesn't resolve your issue. Please do the following:
1. Please probe the SPI lines and check if the ADC is sending out any data. Share the waveform.
2. If possible, please share the datasheet of the ADC used.
3. Check if there are any initialization sequence that needs to be performed to correctly start the adc.
4. Check if you are using the correct mode of SPI (CPOL and CPHA )