nrf_drv_qspi_write taking around 500 micro sec ( long time to write ) . How to optimize nrf_drv_qspi_write time.?
nrf_drv_qspi_write taking around 500 micro sec ( long time to write ) . How to optimize nrf_drv_qspi_write time.?
Hi,
How much data are you writing in nrf_drv_qspi_write()? When you called nrf_drv_qspi_init(&config, ...), what was the parameter for config.phy_if.sck_freq?
-Amanda H.
Hi,
How much data are you writing in nrf_drv_qspi_write()? When you called nrf_drv_qspi_init(&config, ...), what was the parameter for config.phy_if.sck_freq?
-Amanda H.
Hi,
Please find the configuration.
#define QSPI_NAND_FLASH_CONFIG \
{ \
.xip_offset = 0, \
.pins = { \
.sck_pin = QSPI_NAND_FLASH_SCK_PIN, \
.csn_pin = QSPI_NAND_FLASH_CSN_PIN, \
.io0_pin = QSPI_NAND_FLASH_IO0_PIN, \
.io1_pin = QSPI_NAND_FLASH_IO1_PIN, \
.io2_pin = QSPI_NAND_FLASH_IO2_PIN, \
.io3_pin = QSPI_NAND_FLASH_IO3_PIN, \
}, \
.irq_priority = (uint8_t)NRFX_QSPI_CONFIG_IRQ_PRIORITY, \
.prot_if = { \
.readoc = QSPI_IFCONFIG0_READOC_READ4O, \
.writeoc = QSPI_IFCONFIG0_WRITEOC_PP4O, \
.addrmode = (nrf_qspi_addrmode_t)NRFX_QSPI_CONFIG_ADDRMODE, \
.dpmconfig = false, \
}, \
.phy_if = { \
.sck_freq = NRF_QSPI_FREQ_32MDIV1, \
.sck_delay = (uint8_t)NRFX_QSPI_CONFIG_SCK_DELAY, \
.spi_mode = (nrf_qspi_spi_mode_t)NRFX_QSPI_CONFIG_MODE, \
.dpmen = false \
}, \
}
Also, while calling program load API , Internally we are calling this nrf_drv_qspi_write? How do we know Internally its calling PROGRAM_LOAD x 4 OPCODE? Where could i see Opcode being issued to flash? I am using MT29F4G01ABBFDWB,
Currently set to 32 MHz QSPI.
32 * 4 ( 4 lines transfer )=128 bits / sec = 128 killo bits per 1 milli sec = 32 killo bytes per 1 milli sec ;
So, for 512 bytes of transfer it should take = 512* 1 milli/32killo = 16 micro sec ideally it should take , its taking 666 micro sec. which is huge
Hi,
We are using 32 Mhz clock still getting 600 micro sec per transaction. Isnt it huge?