cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 QSPI External Loader Issues After Migrating from MT25TL to MT25QL

vijay29489
Associate II
Overview

I’m working on a custom PCB based on STM32H757BIT6, conceptually similar to the STM32H747I-EVAL board. The original EVAL board uses a Micron MT25TL01G (dual-die) QSPI flash on BK1_CS (PG6). On my board, the flash is replaced with MT25QL01G (single-die) and connected to BK2_NCS (PC11).

I need to know what changes are required in the BSP and external loader (.stldr) to make them work with this new flash and cs pin changes.

Hardware

  • MCU: STM32H757BIT6
  • QSPI Flash:
    • Original: MT25TL01GHBB8ESF (dual-die)
    • New: MT25QL01GBBB8ESF (single-die)
  • New QSPI CS is connected at BK2_NCS (PC11); BK1_CS is tied to BK2_NCS.

Tools

  • STM32CubeIDE 1.18.x
  • External loader build: IAR EWARM
  • Programmer: STM32CubeProgrammer v2.18.0
  • ST-LINK FW: V2J46S7

Differences vs EVAL

  • Flash changed to single-die MT25QL
  • CS moved to BK2
  • Hardware is fixed; BSP/loader adapted from EVAL

Current Status

  • App firmware: QSPI init works after making few changes like  FlashID = QSPI_FLASH_ID_1, DualFlash = DISABLE, memory-mapped mode initialization is OK and QSPI init is also OK.
  • External loader: But when i make above changes in loader source code in IAR IDE, we get the error of Erase/program fails (failed to erase memory).

Changes Made

  • CS is remapped to PC11
  • QSPI_FLASH_ID_1 used
  • DualFlash disabled
  • MT25QL commands checked
  • StorageInfo updated:
    DeviceStartAddress = 0x90000000  
    DeviceSize = 0x08000000  
  • QSPI MSP init is aligned with CubeMX

While code flashing the loader starts to erase the QSPI flash memory before writing the gui data on it. Below is the error message - 

STMicroelectronics ST-LINK GDB server. Version 7.12.0
Copyright (c) 2025, STMicroelectronics. All rights reserved.

STM32CubeProgrammer v2.18.0 | Windows-64Bits

ST-LINK SN : 30091411A418303030303032
ST-LINK FW : V2J46S7
Board : --
Voltage : 3.16V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device CPU : Cortex-M7/M4

Memory Programming ...
File : <application>.srec
Size : 2.21 MB
Address : 0x08000000

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 3]

Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 14]

Error: failed to erase memory

Error: failed to erase memory
Error in STM32CubeProgrammer
Shutting down...
Exit.

Key Concern

Original BSP/loader assumes:

  • Dual-die geometry
  • Dual-flash behavior
  • MT25TL-specific registers

My board uses single-die MT25QL → possible mismatch can happen in erase/program logic.

I have many questions as below ... will be very helpful to get answer to any/all of it

  1. What BSP changes are needed for MT25TL → MT25QL migration?
  2. What .stldr changes are mandatory for MT25QL?
  3. Any dual-die assumptions in STM32H747I-EVAL loader that need removal?
  4. Is there an ST reference loader for MT25QL01G on STM32H7?
  5. Any extra loader-only init steps beyond app firmware?
  6. Does BK2 CS work fully in loaders, or are there hidden BK1 dependencies?

 I have attached the snapshot of eval kit QSPI design pinout vs our custom qspi design pinout and the zip of external qspi loader source code.

Any help or existing source code is highly appreciated at this point.

 

Thanks in advance,

Vijay.



 

 

0 REPLIES 0