2022-11-01 10:36 PM
Hello , wanted to interface QSPI dual flash with STM32H743Zit6 . The External Flash memory i am using is sst26vf064b . I am having 2 of this Flash memory on my hardware Can anyone help me with the same?
I am trying to read the ID data
First -- With SPI
sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE;
sCommand.Instruction = 0x9F;
sCommand.AddressMode = QSPI_ADDRESS_NONE;
sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
sCommand.DataMode = QSPI_DATA_1_LINE;
sCommand.DummyCycles = 0;
sCommand.Address = 0;
sCommand.DdrMode = QSPI_DDR_MODE_DISABLE;
sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
sCommand.NbData = 3;
HAL_QSPI_Command(&hqspi, &sCommand, 1000);
HAL_QSPI_Receive(&hqspi, ID_REG, 1000);
it is giving me {0x01,0x20,0x18} as output which is not the expected output
Second -- with QuadSPI,
Enable QuadIO
sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE;
sCommand.Instruction = 0x38;//READ_CONFIGURATION_REG_CMD;
sCommand.AddressMode = QSPI_ADDRESS_NONE;
sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
sCommand.DataMode = QSPI_DATA_NONE;
sCommand.DummyCycles = 0;
sCommand.DdrMode = QSPI_DDR_MODE_DISABLE;
sCommand.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY;
sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
sCommand.NbData = 0;
HAL_QSPI_Command(&hqspi, &sCommand,1000);
sCommand.InstructionMode = QSPI_INSTRUCTION_4_LINES;
sCommand.Instruction = 0xAF;
sCommand.AddressMode = QSPI_ADDRESS_NONE;
sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
sCommand.DataMode = QSPI_DATA_4_LINES;
sCommand.DummyCycles = 2;
sCommand.DdrMode = QSPI_DDR_MODE_DISABLE;
sCommand.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY;
sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
sCommand.NbData = 3;
HAL_QSPI_Command(&hqspi, &sCommand.1000);
HAL_QSPI_Receive(&hqspi, &ID_REG[0],1000);
which gives me output as {0x88,0x88,0x88}