STM/STM32_LIBRARIES/tm_stm32_qspiflash.c
uint8_t BSP_QSPI_MemoryMappedMode(void)
{
  QSPI_CommandTypeDef      s_command;
  QSPI_MemoryMappedTypeDef s_mem_mapped_cfg;

  /* Configure the command for the read instruction */
  s_command.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
  s_command.Instruction       = QUAD_INOUT_FAST_READ_CMD;
  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       = N25Q128A_DUMMY_CYCLES_READ_QUAD;
  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_ENABLE;
  s_mem_mapped_cfg.TimeOutPeriod     = 100;
  
  if (HAL_QSPI_MemoryMapped(&QSPIHandle, &s_command, &s_mem_mapped_cfg) != HAL_OK)
  {
    return QSPI_ERROR;
  }

  return QSPI_OK;
}
/**
  * @brief  Configure the QSPI in memory-mapped mode
  * @param  None  
  * @retval QSPI memory status
  */
@brief  Configure the QSPI in memory-mapped mode
@param  None
@retval QSPI memory status
@brief Configure the QSPI in memory - mapped mode @param None @retval QSPI memory status
uint8_t BSP_QSPI_MemoryMappedMode(void)
{
  QSPI_CommandTypeDef      s_command;
  QSPI_MemoryMappedTypeDef s_mem_mapped_cfg;
  s_command.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
  s_command.Instruction       = QUAD_INOUT_FAST_READ_CMD;
  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       = N25Q128A_DUMMY_CYCLES_READ_QUAD;
  s_command.DdrMode           = QSPI_DDR_MODE_DISABLE;
  s_command.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
  s_command.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
  s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_ENABLE;
  s_mem_mapped_cfg.TimeOutPeriod     = 100;
  if (HAL_QSPI_MemoryMapped(&QSPIHandle, &s_command, &s_mem_mapped_cfg) != HAL_OK)
  {
    return QSPI_ERROR;
  }
  return QSPI_OK;
}
uint8_t BSP_QSPI_MemoryMappedMode ( void ) { QSPI_CommandTypeDef s_command ; QSPI_MemoryMappedTypeDef s_mem_mapped_cfg ; s_command . InstructionMode = QSPI_INSTRUCTION_1_LINE ; s_command . Instruction = QUAD_INOUT_FAST_READ_CMD ; 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 = N25Q128A_DUMMY_CYCLES_READ_QUAD ; s_command . DdrMode = QSPI_DDR_MODE_DISABLE ; s_command . DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY ; s_command . SIOOMode = QSPI_SIOO_INST_EVERY_CMD ; s_mem_mapped_cfg . TimeOutActivation = QSPI_TIMEOUT_COUNTER_ENABLE ; s_mem_mapped_cfg . TimeOutPeriod = 100 ; if ( HAL_QSPI_MemoryMapped ( & QSPIHandle , & s_command , & s_mem_mapped_cfg ) != HAL_OK ) { return QSPI_ERROR ; } return QSPI_OK ; }
@brief  Configure the QSPI in memory-mapped mode
 @param  None
 @retval QSPI memory status
@brief Configure the QSPI in memory - mapped mode @param None @retval QSPI memory status
/* Configure the command for the read instruction */ /* Configure the memory mapped mode */