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

External Flash and QSPI Settings

I have tried to study the behavior of the QSPI and the external flash. I noticed that the QSPI_CONFIG_READOC and QSPI_CONFIG_WRITEOC settings in sdk_config.h cannot be set to use a higher data lines.

More specifically, the QSPI_CONFIG_READOC can only be set to Read2IO and QSPI_CONFIG_WRITEOC to PP. Anything above would cause the FATFS module to throw an error and the USB MSC to not recognize the drive (For some reasons, PP2O works on USB MSC but not FATFS).

I have set QSPI_CONFIG_SCK_DELAY to 255 and QSPI_CONFIG_FREQUENCY to 32MHz/16, so it might not be a clock issue.

Anyone succesfully use more data lines?

Parents Reply Children
  • Okay found the solution. Quiet obvious. The example for qspi enables the QSPI mode of the memory. Hence, the QSPI can be used. This is missing insde the nrf_block_dev_qspi.c inside the init routine. You have to add the following lines to started from e.g. 388:

        // Switch to qspi mode
        uint8_t temporary = 0x40;
        cinstr_cfg.opcode = QSPI_STD_CMD_WRSR;
        cinstr_cfg.length = NRF_QSPI_CINSTR_LEN_2B;
        ret = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, &temporary, NULL);
        APP_ERROR_CHECK(ret);

    This will enable the QSPI of the memory chip and it is afterwards possible to used the QSPI_CONFIG_WRITEOC = 3 and QSPI_CONFIG_READOC = 4.

Related