Skip to main content
Visitor II
September 5, 2024
Question

Configuring Single QSPI Flash on STM32H750B-DK

  • September 5, 2024
  • 1 reply
  • 748 views

Hello everyone,

I'm working with an STM32H750B-DK board featuring the STM32H750XB MCU, and it currently has two "MT25QL512ABB8ESF" flash ICs configured in Dual-Mode QSPI.

I would like to switch to using just one flash IC in standard QSPI mode. Could anyone advise on the necessary changes to configure for a single flash setup?

Thanks in advance!

Following is the existing QSPI init code.

 

 

static void MX_QUADSPI_Init(void)
{

 /* USER CODE BEGIN QUADSPI_Init 0 */
 BSP_QSPI_Init_t qspi_initParams;
 /* USER CODE END QUADSPI_Init 0 */

 /* USER CODE BEGIN QUADSPI_Init 1 */

 /* USER CODE END QUADSPI_Init 1 */
 /* QUADSPI parameter configuration*/
 hqspi.Instance = QUADSPI;
 hqspi.Init.ClockPrescaler = 3;
 hqspi.Init.FifoThreshold = 1;
 hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE;
 hqspi.Init.FlashSize = 26;
 hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_4_CYCLE;
 hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
 hqspi.Init.DualFlash = QSPI_DUALFLASH_ENABLE;
 if (HAL_QSPI_Init(&hqspi) != HAL_OK)
 {
 Error_Handler();
 }
 /* USER CODE BEGIN QUADSPI_Init 2 */
 qspi_initParams.InterfaceMode = MT25TL01G_QPI_MODE;
 qspi_initParams.TransferRate = MT25TL01G_DTR_TRANSFER;
 qspi_initParams.DualFlashMode = MT25TL01G_DUALFLASH_ENABLE;
 BSP_QSPI_DeInit(0);
 if (BSP_QSPI_Init(0, &qspi_initParams) != BSP_ERROR_NONE)
 {
 Error_Handler();
 }
 if (BSP_QSPI_EnableMemoryMappedMode(0) != BSP_ERROR_NONE)
 {
 Error_Handler();
 }
 /* USER CODE END QUADSPI_Init 2 */

}

 

 

 

    This topic has been closed for replies.

    1 reply

    ST Employee
    September 5, 2024

    Hello @ChameeraW  ,

     

    For your STM32H750B-DK board, you can follow the example provided in the STM32CubeH7 repository on GitHub. Specifically, you can refer to the QSPI  examples for the STM32H743I-EVAL board ( Projects/STM32H743I-EVAL/Examples/QSPI) . Here is the link to the example: QSPI_MemoryMapped

     

    You can use this example as a reference and update it to match your STM32H750B-DK board. 

    also to better understand the differences between configuring QSPI for dual and single flash setups, you can compare the following two QSPI examples provided by STMicroelectronics:  QSPI_MemoryMapped & QSPI_MemoryMappedDual .

    Best regards