hello Nordic
i work with nrf52840, SDK16.0 S140
i use QSPI for writing to an external flash (IS25LP064A)
if i write 16 bytes then its all ok but if i try to write more then i don't get the values i put after the 18 byte
i tried first with 240, then 24, then 16, then 20 (all aligned sizes).
here how i init the QSPI:
uint32_t err_code = 0;
nrfx_qspi_config_t config = NRFX_QSPI_DEFAULT_CONFIG;
config.prot_if.readoc = NRF_QSPI_READOC_READ2IO; //NRF_QSPI_READOC_FASTREAD;
config.prot_if.writeoc = NRF_QSPI_WRITEOC_PP;
config.prot_if.addrmode = NRF_QSPI_ADDRMODE_24BIT;
config.pins.sck_pin = FLASH_MEM_SPI_CLK; //19;
config.pins.csn_pin = FLASH_MEM_SPI_CS; //17;
config.pins.io0_pin = FLASH_MEM_SPI_MOSI; //20;
config.pins.io1_pin = FLASH_MEM_SPI_MISO; //21;
config.pins.io2_pin = NRF_QSPI_PIN_NOT_CONNECTED;
config.pins.io3_pin = NRF_QSPI_PIN_NOT_CONNECTED;
config.phy_if.sck_freq = NRF_QSPI_FREQ_32MDIV1;
err_code = nrfx_qspi_init(&config, qspi_handler, NULL);
APP_ERROR_CHECK(err_code);
configure_memory();
External_flash_erase();
for( uint8_t i = 0; i < 240; i++)
{
syntetic_240_buff[i] = i;
}
this is the configuration commands for the flash:
and here is my write command:
err_code = nrfx_qspi_write(syntetic_240_buff, AUDIO_BUFF_SIZE, audio_address_mark); audio_address_mark += AUDIO_BUFF_SIZE;
any ideas what causes this ?
hope to read from you soon
best regards
Ziv
