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

QSPI async read write

Hi,

We are using a custom board based on nRF 52840, trying to transfer data to external QSPI  flash(GD2QC).

Flash  was successfully initialized and exchanged chunks of data. Our use case is mostly  async read and write based on ble data.

But after some time qspi stops responding  with NRF_BUSY after initialization. After referring sdk 15.2 interrupt clear issue, we cherry picked qspi driver files from sdk ver 17.2, but issue still exists.

Once initialized we are not calling nrf_drv_qspi_uninit() since we . Also MCU power management is off.

Here is our qspi config

{                                                                       \
    .xip_offset  = 0,                         \
    .pins = {                                                           \
       .sck_pin     = 19,                                \
       .csn_pin     = 20,                                \
       .io0_pin     = 17,                                \
       .io1_pin     = 22,                                \
       .io2_pin     = 23,                                \
       .io3_pin     = 21,                                \
    },                                                                  \
    .prot_if = {                                                        \
        .readoc     = (nrf_qspi_readoc_t)0,       \
        .writeoc    = (nrf_qspi_writeoc_t)0,     \
        .addrmode   = (nrf_qspi_addrmode_t)0,   \
        .dpmconfig  = 0,                                            \
    },                                                                  \
    .phy_if = {                                                         \
        .sck_delay  = (uint8_t)1,              \
        .dpmen      = 0,                                            \
        .spi_mode   = (nrf_qspi_spi_mode_t)0,       \
        .sck_freq   = (nrf_qspi_frequency_t)15, \
    },                                                                  \
    .irq_priority   = (uint8_t)6,           \
}

Thanks,

Manoj

Parents Reply
  • Do you have an engineering revision of your device? This is a very old device. Please provide markings on your device.


    Also, I see pasted the wrong function in my previous post, it should have been:

     err_code = nrf_drv_qspi_init(&config, qspi_handler, NULL);
        APP_ERROR_CHECK(err_code);
        NRF_LOG_INFO("QSPI example started.");

    Not that this should do any difference. 


    On further debugging what I observed is qspi driver returns NRFX_ERROR_BUSY from qspi_task_perform

    What task is failing?

    /**
     * @brief QSPI tasks.
     */
    typedef enum
    {
        /*lint -save -e30*/
        NRF_QSPI_TASK_ACTIVATE   = offsetof(NRF_QSPI_Type, TASKS_ACTIVATE),   /**< Activate the QSPI interface. */
        NRF_QSPI_TASK_READSTART  = offsetof(NRF_QSPI_Type, TASKS_READSTART),  /**< Start transfer from external flash memory to internal RAM. */
        NRF_QSPI_TASK_WRITESTART = offsetof(NRF_QSPI_Type, TASKS_WRITESTART), /**< Start transfer from internal RAM to external flash memory. */
        NRF_QSPI_TASK_ERASESTART = offsetof(NRF_QSPI_Type, TASKS_ERASESTART), /**< Start external flash memory erase operation. */
        NRF_QSPI_TASK_DEACTIVATE = offsetof(NRF_QSPI_Type, TASKS_DEACTIVATE), /**< Deactivate the QSPI interface. */
        /*lint -restore*/
    } nrf_qspi_task_t;
     

    Have you verified that the m_finished flag is toggled during debugging? Are you certain that you have the correct commands for the GD25Q16C?

    -Øyvind

Children
No Data
Related