2021-06-08 04:00 AM
Hi,
I wrote an external loader and tested for writing , erasing sector, erasing chip, reading, using "\testbinary1M.bin". But it failed in verification. What could be the reason?
EDIT: I'm checkin what's going on by a logıc analyzer. I'm not using quad or dual mode for reading, using normal fast read command. When I read tha data manually it reads correct, but in mapped mode, it gives the error " Data mismatch found at address 0x90000004 (byte = 0x22 instead of 0x11)".
bool W25Q32JV_MappedMode(void)
{
QSPI_CommandTypeDef Command;
QSPI_MemoryMappedTypeDef MemoryMapppedCfg;
// Configure the command for the read instruction
Command.InstructionMode = QSPI_INSTRUCTION_1_LINE;
Command.Instruction = 0x03;
Command.AddressMode = QSPI_ADDRESS_1_LINE;
Command.AddressSize = QSPI_ADDRESS_24_BITS;
Command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
Command.DataMode = QSPI_DATA_1_LINE;
Command.DummyCycles = 0;
Command.DdrMode = QSPI_DDR_MODE_DISABLE;
Command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY ;
Command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
Command.NbData = 0;
Command.Address = 0;
// Configure the memory mapped mode
MemoryMapppedCfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
if (HAL_QSPI_MemoryMapped(&hqspi, &Command, &MemoryMapppedCfg) != HAL_OK) {
return false;
}
return true;
}
2021-06-08 08:58 AM
Suggests it either isn't writing properly, or the read-back for verification reads something different. Instrument your code so you can get real time diagnostic information via a serial port.