cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7R7I8T6 — No communication with external QSPI Flash (W25Q128JV) via XSPI2

1337DOMINATOR228
Associate

I’m working with an STM32H7R7I8 MCU and an external W25Q128JV QSPI Flash connected to XSPI2 --NCS1 -- Port1.
The Flash memory is wired correctly (pins verified) and the Chip Select line (NCS1) idles high after power-up (I've used 10k pull up resistor on flash cs pin.
However, when I try to access or program the Flash (using CubeProgrammer or Cube IDE), there is no activity on any QSPI lines — confirmed with a logic analyzer.

My setup:

  • XSPI2 (Quad mode)

  • NCS1 connected and configured as "Chip Select Override NCS1 -- Port1"

  • Flash base address: 0x70000000

  • Firmware generated using STM32CubeIDE 1.19.0

  • The memory is initialized via HAL MX_XSPI2_Init()

  • MPU configured with:

    • Region 0 (4 GB, default)

    • Region 1 for 0x70000000, 16 MB, full access, executable

When I enable the MPU (HAL_MPU_Enable()), the MCU immediately triggers a HardFault, and the LR = 0xFFFFFFF9 (return from interrupt).
If I disable the MPU, the code runs, but the Flash is still completely silent — no CLK or CS activity visible.

What I have verified:

  • Power supply and logic levels are 3.3 V

  • All lines (CS, CLK, IO0–IO3) are 2,5 cm long and same length

  • Pull-up resistor (10 kΩ) added to CS line

  • External loader project (ExtMemLoader) builds correctly but doesn’t seem to interact with Flash in CubeProgrammer

When trying to run Debug from CUBE IDE:

1337DOMINATOR228_0-1761057964955.png

Log from terminal:

ST-LINK SN : 0D000F00182D373637365744

ST-LINK FW : V2J46S7

Board : --

Voltage : 3.20V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x485

Revision ID : Rev Y

Device name : STM32H7RSxx

Flash size : 64 KBytes (default)

Device type : MCU

Device CPU : Cortex-M7

BL Version : 0xE3

Opening and parsing file: ST-LINK_GDB_server_a01600.srec



Memory Programming ...

File : ST-LINK_GDB_server_a01600.srec

Size : 67.39 KB

Address : 0x70000000

Erasing memory corresponding to segment 0:

Erasing external memory sectors [0 16]

Error: failed to erase memory

Error: failed to erase memory

Encountered Error when opening C:\ST\STM32CubeIDE_1.19.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.200.202503041107\tools\bin\STM32_Programmer_CLI.exe

------ Switching context -----

Error in STM32CubeProgrammer

Stm32Device, closeDevice() entry

GDB session, device event: 6

GDB session, device event: 6

Stm32Device, closeDevice() exit

------ Switching to STM32CubeProgrammer -----

-------------------------------------------------------------------

STM32CubeProgrammer v2.20.0

-------------------------------------------------------------------

Log output file: C:\Users\EgorMBED\AppData\Local\Temp\STM32CubeProgrammer_a01600.log

ST-LINK SN : 0D000F00182D373637365744

ST-LINK FW : V2J46S7

Board : --

Voltage : 3.20V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x485

Revision ID : Rev Y

Device name : STM32H7RSxx

Flash size : 64 KBytes (default)

Device type : MCU

Device CPU : Cortex-M7

BL Version : 0xE3

Opening and parsing file: ST-LINK_GDB_server_a01600.srec

Memory Programming ...

File : ST-LINK_GDB_server_a01600.srec

Size : 61.20 KB

Address : 0x08000000

Erasing memory corresponding to segment 0:

Download in Progress:

�������������������������������������������������� 0%

������������������������������������������������� 98%� 100%

File download complete

Time elapsed during download operation: 00:00:00.654

Question:
What could cause no XSPI2 activity at all on STM32H7R7, even though the peripheral is initialized and clocks are enabled?
Could this be related to MPU configuration, XSPI2 domain, or CubeIDE code generation issues? Also I attach my .ioc file, hope that will be helpful

1 REPLY 1
AScha.3
Super User

Hi,

you have a board to compare, like Nucleo-H7S3 with qspi flash ?

If you feel a post has answered your question, please click "Accept as Solution".