STM32H5 XSPI Not Setting TC Flag
Hello,
I am using the STM32H563RGT6. I am using the OCTOSPI peripheral to connect a quad spi connection a flash chip. I can successfully read the status registers on the flash chip, send the write enable command, write an erase command to address 0x0, read status register 1 and wait for BUSY flag to clear, then send the write enable command again. However, when I go to erase the next block at addr 0x10000, and the HAL_XSPI_FLAG_TC never gets set in the HAL_XSPI_Command function.
All of the write commands to this point use the following regular command settings:
XSPI_RegularCmdTypeDef sCommand = { 0 };
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
sCommand.IOSelect = HAL_XSPI_SELECT_IO_3_0;
sCommand.Instruction = cmd;
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_1_LINE;
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
sCommand.Address = addr;
sCommand.AddressMode = HAL_XSPI_ADDRESS_1_LINE;
sCommand.AddressWidth = HAL_XSPI_ADDRESS_24_BITS;
sCommand.DataMode = HAL_XSPI_DATA_NONE;
sCommand.DataLength = 0;
sCommand.DummyCycles = num_dummy_cycles;
sCommand.DQSMode = HAL_XSPI_DQS_DISABLE;
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_ONLY_FIRST_CMD;The command that returns a HAL_TIMEOUT (set to 5s for testing), is configured with Instruction mode, 24 bit address, and no data mode. I don't understand why the TC register flag never gets set and I have no idea what else to try.
Any advice on what to try next?
Thanks,
Chad
