HAL_BUSY after HAL_QSPI_MemoryMapped
I have to use QSPI memory Winbond W25N01GVS in memory mapped mode on a STM32F746NG.
After issuing this command, each following QSPI command for reading/programming the flash fails with HAL_BUSY:
__ s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE;
s_command.Instruction = FAST_READ_QUAD_IO;
s_command.AddressMode = QSPI_ADDRESS_4_LINES;
s_command.AddressSize = QSPI_ADDRESS_24_BITS;
s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
s_command.DataMode = QSPI_DATA_4_LINES;
s_command.DummyCycles = 4;
s_command.DdrMode = QSPI_DDR_MODE_DISABLE;
s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY;
s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
/* Configure the memory mapped mode */
s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
s_mem_mapped_cfg.TimeOutPeriod = 0;
if (HAL_QSPI_MemoryMapped(&QSPIHandle, &s_command, &s_mem_mapped_cfg) != HAL_OK) ...__
I’ve tried this with different combinations of Instruction and AddressSize, which makes no difference. HAL_QSPI_MemoryMapped() returns HAL_OK, all following commands return HAL_BUSY.
This is the init data:
__ /* QSPI initialization */
QSPIHandle.Init.ClockPrescaler = 255; // slow for testing !!!
QSPIHandle.Init.FifoThreshold = 4;
QSPIHandle.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
QSPIHandle.Init.FlashSize = 26;
QSPIHandle.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_2_CYCLE;
QSPIHandle.Init.ClockMode = QSPI_CLOCK_MODE_0;
QSPIHandle.Init.FlashID = QSPI_FLASH_ID_1;
QSPIHandle.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
// QSPIHandle.Timeout = 5000; // make no difference
if (HAL_QSPI_Init(&QSPIHandle) != HAL_OK) ...__