When I checked the OSPI Flash Diagnostic sample output below, the erase command output by SFDP was "0xDC", but in the sample, the command used in the erase process is "0xD8".
1. It seems that there is no "0xD8" in the output of SFDP. Is it correct to use "0xD8" for erasing?
2. When I changed the erase processing command to "0xDC" and executed it, the erase processing did not work properly.
In the output of SFDP, the erase command is "0xDC". Is there any additional processing required to erase with "0xDC"?
3. The OSPI Flash IO sample works correctly with the erase process regardless of whether the erase command is "0xDC"or "0xD8".
Why is there a difference in the behavior of erase commands between OSPI Flash Diagnostic and OSPI Flash IO?
Both samples use S28HS512T (DEVICE_ID: 0x5B1A).
OSPI Flash Diagnostic output result:
------------------------------------------------------------------
All tests have passed!!
[OSPI Flash Diagnostic Test] Starting ...
[OSPI Flash Diagnostic Test] Flash Manufacturer ID : 0x34
[OSPI Flash Diagnostic Test] Flash Device ID : 0x5B1A
[OSPI Flash Diagnostic Test] Executing Flash Erase on first block...
[OSPI Flash Diagnostic Test] Done !!!
[OSPI Flash Diagnostic Test] Performing Write-Read Test...
[OSPI Flash Diagnostic Test] Write-Read Test Passed!
[OSPI Flash Diagnostic Test] SFDP Information :
================================================
SFDP
================================================
SFDP Major Revision : 0x1
SFDP Minor Revision : 0x8
Number of Parameter Headers in this Table : 6
Types of Additional Parameter Tables in this flash
---------------------------------------------------
4 BYTE ADDRESSING MODE INSTRUCTIONS TABLE
XSPI PROFILE TABLE
STATUS CONTROL AND CONFIGURATION REGISTER MAP TABLE
OCTAL DDR MODE COMMAND SEQUENCE TABLE
SECTOR MAP TABLE
Parsing of OCTAL DDR MODE COMMAND SEQUENCE TABLE table not yet supported.
Flash_NorXspiDevDefines gFlashNorXspiDeviceDefines_<part-number> = {
.XSPI_NOR_CMD_RSTEN = 0x66,
.XSPI_NOR_CMD_RSTMEM = 0x99,
.XSPI_NOR_CMD_WREN = 0x06,
.XSPI_NOR_CMD_WRREG = 0x71,
.XSPI_NOR_CMD_BULK_ERASE = 0xC7,
.XSPI_NOR_CMD_SECTOR_ERASE_3B = 0x21,
.XSPI_NOR_CMD_SECTOR_ERASE_4B = 0x21,
.XSPI_NOR_CMD_BLOCK_ERASE_3B = 0xDC,
.XSPI_NOR_CMD_BLOCK_ERASE_4B = 0xDC,
.XSPI_NOR_CMD_PAGE_PROG_3B = 0x02,
.XSPI_NOR_CMD_PAGE_PROG_4B = 0x12,
.XSPI_NOR_CMD_RDSR = 0x05,
.XSPI_NOR_CMD_RDREG = 0x65,
.XSPI_NOR_CMD_RDID = 0x9F,
.XSPI_NOR_CMD_READ = 0x03,
.XSPI_NOR_CMD_888_SDR_READ = 0x00,
.XSPI_NOR_CMD_888_DDR_READ = 0xEE,
.XSPI_NOR_CMD_444_SDR_READ = 0x00,
.XSPI_NOR_CMD_444_DDR_READ = 0x00,
.XSPI_NOR_CMD_114_READ = 0x00,
.XSPI_NOR_SR_WIP = 1,
.XSPI_NOR_SR_WEL = 2,
.XSPI_NOR_RDID_NUM_BYTES = 5,
.XSPI_NOR_MANF_ID = 0x34,
.XSPI_NOR_DEVICE_ID = 0x5B1A,
.XSPI_NOR_114_READ_MODE_CLKS = 0,
.XSPI_NOR_114_READ_DUMMY_CYCLES = 0,
.XSPI_NOR_444_READ_MODE_CLKS = 0,
.XSPI_NOR_444_READ_DUMMY_CYCLES = 0,
.XSPI_NOR_444_READ_DUMMY_CYCLES_LC = 0xFF,
.XSPI_NOR_QUAD_CMD_READ_DUMMY_CYCLES = 0x00,
.XSPI_NOR_OCTAL_READ_DUMMY_CYCLE = 24,
.XSPI_NOR_OCTAL_READ_DUMMY_CYCLE_LC = 0x0B,
.XSPI_NOR_OCTAL_DDR_RDSR_DUMMY_CYCLE = 4,
.XSPI_NOR_OCTAL_DDR_RDREG_ADDR_BYTES = 4,
.XSPI_NOR_OCTAL_DDR_WRREG_ADDR_BYTES = 4,
.XSPI_NOR_OCTAL_DDR_RDVREG_DUMMY_CYCLE = 4,
.XSPI_NOR_OCTAL_DDR_RDNVREG_DUMMY_CYCLE = 8,
.XSPI_NOR_OCTAL_RDSFDP_DUMMY_CYCLE = 8,
.XSPI_NOR_OCTAL_RDSFDP_ADDR_TYPE = 0,
.XSPI_NOR_WRR_WRITE_TIMEOUT = 5120,
.XSPI_NOR_BULK_ERASE_TIMEOUT = 256000000,
.XSPI_NOR_PAGE_PROG_TIMEOUT = 512,
.XSPI_NOR_VREG_OFFSET = 0x800000,
.XSPI_NOR_NVREG_OFFSET = 0x0,
.XSPI_NOR_QUAD_MODE_CFG_ADDR = 0x0,
.XSPI_NOR_QUAD_MODE_CFG_BIT_LOCATION = 0x0,
.XSPI_NOR_DDR_OCTAL_MODE_CFG_ADDR = 0x6,
.XSPI_NOR_DDR_OCTAL_MODE_CFG_BIT_LOCATION = 0x1,
.XSPI_NOR_DUMMY_CYCLE_CFG_ADDR = 0x3,
.XSPI_NOR_FLASH_SIZE = 67108864,
.XSPI_NOR_PAGE_SIZE = 256,
.XSPI_NOR_BLOCK_SIZE = 262144,
.XSPI_NOR_SECTOR_SIZE = 4096,
.addrByteSupport = 1,
.dtrSupport = 1,
.qeType = 0,
.seq444Enable = { 0, 0, 0, 0, 0 },
.seq444Disable = { 0, 0, 0, 0 },
.oeType = 0,
.cmdExtType = 0,
.byteOrder = 0,
};
All tests have passed!!
------------------------------------------------------------------