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

QSPI and w25q64fv flash

Hi all. I try to configure QSPI example to work with w25q64fv flash. I connected all pins from flash to same pins on nRF as on PCA10056 DK board. After all i have "Data inconsistent" message.  I looked in to data array from flash and in it every element was equal to 0x88. I have a couple questions about how to configure driver to work with my flash and how to configure nrfx_qspi_cinstr_xfer function configuration structure.

static void configure_memory()
{
    uint8_t temporary[2] = {0x00, 0x02};
		uint8_t rx_buf[3];
    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);

    // Send reset command
    cinstr_cfg.opcode = QSPI_STD_CMD_RST;
    err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, NULL, NULL);
    APP_ERROR_CHECK(err_code);
		
		cinstr_cfg.opcode =	QSPI_STD_CMD_JID;
		cinstr_cfg.length = NRF_QSPI_CINSTR_LEN_4B;
		
		err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, NULL, rx_buf);
		APP_ERROR_CHECK(err_code);
		
		
		SEGGER_RTT_printf(0, "ID = %x%x%x\r\n", rx_buf[0], rx_buf[1], rx_buf[2]);
		
//    // Switch to qspi mode
    cinstr_cfg.opcode = QSPI_STD_CMD_WRSR;
    cinstr_cfg.length = NRF_QSPI_CINSTR_LEN_3B;
    err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, temporary, NULL);
    APP_ERROR_CHECK(err_code);
		
}

If i connect logic analyzer to IO0 pin i always get NRFX_ERROR_TIMEOUT err code.

Parents Reply
  • Hi ,

    Could you please provide the PIN configuration used? I'm trying to the use the same family Flash for my evaluation and will appreciate the help.

    I used: 

    // <s> NRFX_QSPI_PIN_SCK - SCK pin value.
    #ifndef NRFX_QSPI_PIN_SCK
    #define NRFX_QSPI_PIN_SCK BSP_QSPI_SCK_PIN
    #endif
    
    // <s> NRFX_QSPI_PIN_CSN - CSN pin value.
    #ifndef NRFX_QSPI_PIN_CSN
    #define NRFX_QSPI_PIN_CSN BSP_QSPI_CSN_PIN
    #endif
    
    // <s> NRFX_QSPI_PIN_IO0 - IO0 pin value.
    #ifndef NRFX_QSPI_PIN_IO0
    #define NRFX_QSPI_PIN_IO0 BSP_QSPI_IO0_PIN
    #endif
    
    // <s> NRFX_QSPI_PIN_IO1 - IO1 pin value.
    #ifndef NRFX_QSPI_PIN_IO1
    #define NRFX_QSPI_PIN_IO1 BSP_QSPI_IO1_PIN
    #endif
    
    // <s> NRFX_QSPI_PIN_IO2 - IO2 pin value.
    #ifndef NRFX_QSPI_PIN_IO2
    #define NRFX_QSPI_PIN_IO2 BSP_QSPI_IO2_PIN
    #endif
    
    // <s> NRFX_QSPI_PIN_IO3 - IO3 pin value.
    #ifndef NRFX_QSPI_PIN_IO3
    #define NRFX_QSPI_PIN_IO3 BSP_QSPI_IO3_PIN
    #endif
    

    However, I see all the data read after write to be 0xFF

Children
Related