PIC32 SPI Receive Data Buffer is Empty and Interrupt Flag is Not Set
The oscilloscope/logic analyzer shows the correct data going to the SPI data input (SDI) pin, but the receive buffer is empty and SPIxSTATbits.SPIRBF is never set, indicating that the buffer is empty. How can this be resolved?
The SDI/MISO pin needs to be set as a digital input. It should be noted that the MPLAB® Harmony Configurator(MHC) does not set this by default when the device pin is set to SDIx. Also, check the voltage levels of the signal coming into the SDI pin, as this might not be above the threshold for detection of a high.