This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible to use QSPI for NAND flash without SR?

Hi,

I try to use QSPI to communicate with Gigadevice NAND flash http://www.datasheet-pdf.com/Search-Datasheet-PDF/GD5F1GQ4. There's no DK, the custom board was produced, but the QSPI example from SDK 16.0.0 is used as base.

Thought QSPI can be used as "ordinary" SPI, but, it seems not so. Just after the nrf_drv_qspi_init() function is called (before any memory config), continuously communication is started. The picture is as here: https://devzone.nordicsemi.com/f/nordic-q-a/40884/need-qpi-code-example-for-my-memory-chip/158966#158966, however, RDSR request (0x05) is cyclic. Next 0x05 RDSR request is started immediately after previous ends. And, in controversy with that picture, there's no any custom commands after 0x05 SR request when stepping through nrf_drv_qspi_cinstr_xfer() function. CINSTCONF register always set to 0x00000000 in Watch window.

When I tried to search a code that can produce RDSR request, there's one place was found: nrfx_qspi_mem_busy_check func, but this code not used and optimized away from project...

1. How to use external flash that doesn't have any 0x05 command? Is it hardwired in NRF52840 to send RDSR or can be changed in drivers?

2. How to make that RDSR request was not cyclic and/or to implement any other custom command between RDSR requests as displayed at picture above? For a start, I'd like to read ID from flash.

  • Hi,

    1. To answer your question whether it's possible to use the QSPI peripheral with NAND flash without the 0x05 command.The sending of 0x05 command on activation of the QSPI peripheral is implemented in hardware, not in the driver. Which means that you need to use a Flash that supports this command to use the QSPI peripheral. The answer to your question is therefore no. 

    2. You're second question is not quite that clear. The thread that you linked to contains several images, which one are you referring to? Could you upload an image that explains what you're asking about? It seems that you're trying to implement a custom command but you're only seeing the RDSR instruction when you're sending the command? Is this correct? Could upload a trace that shows this?

    regards

    Jared

  • Hi,

    >> You're second question is not quite that clear. The thread that you linked to contains several images, which one are you referring to?

    I referred to all images. You can see single RDSR request (pic 1) or single RDSR request followed by 1-byted custom command (pic 2,3,4). After single proceed exchange, if I can believe theese images, CS goes high and QSPI stops interfacing. In my case, I see cyclic RDSR requests, CS goes high and immediately goes low with new RDSR request, repeately, again and again. It begins after QSPI initialization, and no any custom commands I tried to send are appeared after RDSR or between RDSRs or instead of them. I don't know why it's happened, is it HW revision that differs from pictures related to, or the different kind of initialization is required. And question 2 was - how to make RDSR not to be cyclic (to be single, as on images), and/or to make custom command been issued. My revision is 1 (CAA).

    In any case, now I use connection to flash as ordinary SPI interface.

Related