I'm new to Vitis and XilinX-edk world.
I'm working on a project and i want to implement a design that uses microblaze to do these 3 tasks :
1-Read some data from a specific QSPI Flash address.
2-Save into the BRAM.
3-Wait for 1 in a GPIO Input then print the BRAM data to the UART.
I just have a question for the first task, so firstly I saved the bitstream file and a hex file containing some data into the QSPI using Vivado. My Hex file is saved to the address 0x01E00000.
My question now is; how can I read back my file from the QSPI Flash? I found this function to Write/Read into and from QSPI but there is no way to set the address to read from:
status = XSpi_Transfer(&QSPI, qspi_write_buffer, qspi_read_buffer, (unsigned int)bytes_to_read);
if (status == XST_FAILURE)
{
xil_printf("QSPI read failed!\r\n");
break;
}
XSpi_Transferis a raw SPI function and doesn't implement the protocol for your flash chip. The chip has a read command that you need to send first, and that will include the address. The bytes that make up that command will go inqspi_write_buffer.