2020-08-07 11:40 AM
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.
2020-08-07 12:06 PM
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
2020-08-07 12:45 PM
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;
}
2020-08-07 01:18 PM
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.