I am currently getting the XST_SPI_TRANSMIT_UNDERRUN status when transferring data using SPI, but I can't see why.
I have set up an AXI Quad SPI as a slave with ext_spi_clk and s_axi_aclk as 20 MHz and the frequency ratio as 16 (So the maximum clk frequency it should be able to handle is 1.25 MHz).
I have set up the master SPI (an ST uC chip) with its slowest possible clock, which is 156 kHz.
I call the XSpi_Transfer() function to get the slave to transfer [0x0A, 0x0B, 0x0C, 0x0D, 0x0E] then toggle a GPIO line to let the master know that data is available. This triggers the master to send dummy bytes in order to read the slave's SPI data. What I currently read at the master is [0x0A, 0x0A, 0x0B, 0x03, 0x0C]. The slave's SPI returns XST_SPI_TRANSMIT_UNDERRUN 3 times during this process.