how to get started with MX25R6425R in nRF SDK 15.2 , for this I have used qspi example in peripheral I want to write data and read it
how to get started with MX25R6425R in nRF SDK 15.2 , for this I have used qspi example in peripheral I want to write data and read it
Hi
The QSPI example in the peripheral folder shows you how to communicate with the MX25R64 device over QSPI, yes, assuming you have a nRF52840DK.
The example shows how to use the erase, write and read functions.
Is there something in this example that is unclear, or that you have questions about?
Best regards
Torbjørn
hi thank you , yes i have some questions , i want to read ID of Mx25R6435 as well i want to write some custom data and read it . in the QSPI example when we run i can see the data consistent & random values . please clarify the output of the QSPI example .
Hi
There is a quick description of the example here.
The log output after running the example should look like this:
<info> app: QSPI write and read example using 24bit addressing mode <info> app: QSPI example started. <info> app: Process of erasing first block start <info> app: Process of writing data start <info> app: Data read <info> app: Compare... <info> app: Data consistent
This confirms that the memory module has been erased, then written random data, and finally the data is read back to verify that the write operation went fine.
As you say the example uses random values, but you can just change the content of the m_buffer_tx buffer if you want to write something else.
azwin said:i want to read ID of Mx25R6435
Do you know the opcode for reading the ID?
If you look at the configure_memory() function in the example you can see how custom instructions can be sent:
uint32_t err_code;
nrf_qspi_cinstr_conf_t cinstr_cfg = {
.opcode = QSPI_STD_CMD_RSTEN,
.length = NRF_QSPI_CINSTR_LEN_1B,
.io2_level = true,
.io3_level = true,
.wipwait = true,
.wren = true
};
// Send reset enable
err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, NULL, NULL);
APP_ERROR_CHECK(err_code);
You should be able to read the ID in a similar fashion, just make sure to update the opcode and length, and to provide an RX buffer to read out the response.
Best regards
Torbjørn
yes i know the opcode for reading the ID . QSPI_STD_CMD_RDID -0x9F for which i was able read in the system window viewer like c2 28 17 thank you . next step is to write and read custom data .
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fhardware_driver_qspi.html this link was helpful in understanding the QSPI better.