QSPI/WSPI Still broken on H7? Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

dynfer
Posts: 12
Joined: Sun Aug 25, 2024 6:11 pm
Has thanked: 2 times
Been thanked: 5 times

QSPI/WSPI Still broken on H7?  Topic is solved

Postby dynfer » Sat Oct 11, 2025 4:15 pm

Hello,

Im currently working a on custom H743 board with a Winbond W25Q128 flash IC connected via WSPI with the following pins:

Code: Select all

#include "w25q256jv.h"
#include "hal_flash_device.h"
#include "hal_serial_nor.h"
#include "hal_mfs.h"

#define NO_CACHE __attribute__((section(".ram3")))

static NO_CACHE SNORDriver snor1;
static NO_CACHE snor_nocache_buffer_t snor1buf;

static const WSPIConfig w25q_wspicfg = {
    .end_cb = NULL,
    .error_cb = NULL,
    .dcr = ((0 << 0) | STM32_DCR_CSHT(1) | STM32_DCR_FSIZE(24)),
};

const SNORConfig snorcfg1 = {
    .busp = &WSPID1,
    .buscfg = &w25q_wspicfg};

void testFlash()
{

  // IO3, IO2 (normally floating; optional PU early-boot)
  palSetPadMode(GPIOF, 6U, PAL_MODE_ALTERNATE(9) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
  palSetPadMode(GPIOF, 7U, PAL_MODE_ALTERNATE(9) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);

  // IO0, IO1
  palSetPadMode(GPIOF, 8U, PAL_MODE_ALTERNATE(10) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
  palSetPadMode(GPIOF, 9U, PAL_MODE_ALTERNATE(10) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);

  // CLK
  palSetPadMode(GPIOB, 2U, PAL_MODE_ALTERNATE(9) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);

  // NCS (chip select) — keep pulled up
  palSetPadMode(GPIOB, 6U, PAL_MODE_ALTERNATE(10) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
  wspiStart(&WSPID1, &w25q_wspicfg);

  snorObjectInit(&snor1, &snor1buf);
  snorStart(&snor1, &snorcfg1);
}


But to no luck there is no output on CLK / IO / NCS pins (checked with a scope). All neccessary registers seem to be set correctly.
Is it an issue in the driver or related to the H7 itself, since I've saw simillar problems on the forum but there was no definitive anwser to the issue.

User avatar
Giovanni
Site Admin
Posts: 14729
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1155 times
Been thanked: 962 times

Re: QSPI/WSPI Still broken on H7?

Postby Giovanni » Sat Oct 11, 2025 7:02 pm

Hi,

Last time I ran the test application STM32-WSPI-MFS it worked so it seems something specific in your board port, check clocks and GPIO settings.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 4 guests