cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743VIT6 + STM32CubeIDE 1.4.1 + QSPI W25Q256

RDos
Associate II

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.

3 REPLIES 3

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
Up vote any posts that you find helpful, it shows what's working..
RDos
Associate II

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;

}

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
Up vote any posts that you find helpful, it shows what's working..