Skip to main content
RDos
Associate II
August 7, 2020
Question

STM32H743VIT6 + STM32CubeIDE 1.4.1 + QSPI W25Q256

  • August 7, 2020
  • 2 replies
  • 1400 views

I am using the attached code, To access W25Q256 in QSPI mode,

In the QSPI_ResetMemory ()

Always returns QSPI_NOT_SUPPORTED

Running this same code in STM32F765VIT6, it works.

Analyzing the pins of the QSPI, I see no changes.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
August 7, 2020

Drill into the function, determine which piece fails.

Personally, I'd make sure to clear the local/auto variables so they don't hold random/unexpected junk, there might be additional fields you're missing, as these differ from family to family

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
RDos
RDosAuthor
Associate II
August 7, 2020

In the QSPI_ResetMemory routine,

function: HAL_QSPI_Command

does not return HAL_OK. always returns HAL_BUSY.

static uint8_t QSPI_ResetMemory ()

{

QSPI_CommandTypeDef s_command;

/ * Initializes the reset enable command * /

s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE;

s_command.Instruction = RESET_ENABLE_CMD;

s_command.AddressMode = QSPI_ADDRESS_NONE;

s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;

s_command.DataMode = QSPI_DATA_NONE;

s_command.DummyCycles = 0;

s_command.DdrMode = QSPI_DDR_MODE_DISABLE;

s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY;

s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;

/ * Send the command * /

if (HAL_QSPI_Command (& QSPIHandle, & s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE)! = HAL_OK)

{

return QSPI_ERROR;

}

Tesla DeLorean
Guru
August 7, 2020

You have a debugger and the source, drill down to see why it thinks it is busy.

Likely to be an issue with state in QSPIHandle (initialization or how you've left it), or that you haven't initialized s_command properly.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..