we want to connect FPGA to 52840 using QSPI interface for data transfer, 52840 used as master, and FPGA as slaver. so we use write opcode PP4O for 4 lines writing data .
now we met problem , FPGA couldnot receive correct data from 52840. we used oscilloscope to grasp signals, found that 52840 continuously send 0x05 (read status reg1), it seemed read status reg opcode looping. so the transfer data could not be sent out.
please check the following:
err_code = nrf_drv_qspi_write(my_tx_buf, QSPI_TEST_DATA_SIZE,0)
could you help us? thanks
You need to use multiples of 4 bytes when you attempt to write using the function qspi_write function. What is this size set to in your application?
data defined as below:
QSPI_TEST_DATA_SIZE = 512;
for(int i =0;i < QSPI_TEST_DATA_SIZE;i++)
my _tx_buf[i] = 0x55;
it seemed that the read status reg opcode (0x05) is looping , no data were sent out.
Can you check where this OP code comes from and what it means? That should give us some idea as to what is going on here.
it seems you have to implement dummy status register and command 0x05 in your FPGA...
* @brief Function for writing data to QSPI memory.
* Write, read, and erase operations check memory device busy state before starting the operation.
* If the memory is busy, the resulting action depends on the mode in which the write operation is used:
* - blocking mode (without handler) - a delay occurs until the last operation runs or
* until the operation data is being sent.
* - interrupt mode (with handler) - event emission occurs after the last operation
* and sending of operation data are finished.