Other Parts Discussed in Thread: SYSCONFIG, , UNIFLASH
Hi Expert,
For the custom xSpi flash driver of "IS25LX256", I followed up the steps TI guided.
step 1, step2, and step 3 have been done without error. I was able to see SFDP information from the new flash using OSPI Flash Diagnostic and mapped it to the setting in the flash driver, and also enabled the new xSpi in syscfg as below.
However, in step 4, when I executed OSPI Flash IO, the manufacturer ID and device ID were always 0x0 and 0x0 and stuck in Flash_norXspiReadId().
Flash_NorXspiDevDefines gFlashNorXspiDeviceDefines_IS25LX256 = { .NOR_CMD_SRSTE = 0x66U, .NOR_CMD_SFRST = 0x99U, .NOR_CMD_WREN = 0x06U, .NOR_CMD_WRREG = 0x00U, .NOR_CMD_BULK_ERASE = 0xC7U, .NOR_CMD_BLOCK_ERASE = 0xD8U, .NOR_CMD_RDSR = 0x05U, .NOR_CMD_RDID = 0x9FU, .NOR_CMD_WRITE_VCR = 0x85U, .NOR_CMD_OCTAL_READ = 0x7CU,//0x8BU, 4byte address .NOR_CMD_READ = 0x03U, .NOR_CMD_PAGE_PROG = 0x02U, .NOR_CMD_RDREG = 0x00U, .NOR_CMD_OCTAL_PROG = 0x84U, .NOR_CMD_OCTAL_DDR_READ = 0x9DU, .NOR_SR_WIP = 0, .NOR_RDID_NUM_BYTES = 0x5U, .NOR_MANF_ID = 0x9DU, .NOR_DEVICE_ID = 0x5A19, .NOR_SINGLE_CMD_READ_DUMMY_CYCLE = 0U, .NOR_OCTAL_READ_DUMMY_CYCLE = 8U, .NOR_OCTAL_READ_DUMMY_CYCLE_LC = 0x0U, .NOR_OCTAL_READ_DUMMY_CYCLE_INDAC = 0U, .NOR_OCTAL_READ_DUMMY_CYCLE_LC_INDAC = 0x0U, .NOR_OCTAL_DDR_CMD_READ_DUMMY_CYCLE = 8U, .NOR_OCTAL_SDR_CMD_READ_DUMMY_CYCLE = 0U, .NOR_WRR_WRITE_TIMEOUT = (12U * 100U), .NOR_BULK_ERASE_TIMEOUT = (72U * 1000U * 1000U), .NOR_PAGE_PROG_TIMEOUT = 12U, .NOR_VREG_ADDR = 0x000000U, .NOR_CFG2_VREG_ADDR = 0x000003U, .NOR_CFG3_VREG_ADDR = 0x000004U, .NOR_CFG3_NVREG_ADDR = 0x00U, .NOR_PAGE_SIZE = 256U, }; #define FLASH_SIZE (32U * 1024U * 1024U) #define FLASH_BLOCK_SIZE (128U * 1024U) #define FLASH_PAGE_SIZE (256U) #define FLASH_NUM_BLOCKS (FLASH_SIZE / FLASH_BLOCK_SIZE) #define FLASH_NUM_PAGES_PER_BLOCK (FLASH_BLOCK_SIZE / FLASH_PAGE_SIZE) Flash_Attrs gFlashNorXspiAttrs_IS25LX256 = { .deviceId = 0, /* filled by Flash_open, after querying the flash */ .manufacturerId = 0, /* filled by Flash_open, after querying the flash */ .driverInstance = 0, /* filled by SysConfig */ .flashSize = FLASH_SIZE, .blockCount = FLASH_NUM_BLOCKS, .blockSize = FLASH_BLOCK_SIZE, .pageCount = FLASH_NUM_PAGES_PER_BLOCK, .pageSize = FLASH_PAGE_SIZE, .sectorSize = 0, /* NOT USED */ .sectorCount = 0, /* NOT USED */ };
Q1) Could you share any checkpoints related to this problem? Should I customize the syscfg as well with the IS25LX256 datasheet, like input clock frequency, divider, DDR, PHY and so on?
Q2) I found some hard code in Flash_norXspiEnableDDR() in "flash_not_xspit.c" in SDK as below. This seems to be the code for the infieon-specific xSPi flash used for TI evaluation board. Do I have to modify this function even though it is a common function executed for every xSpi flash?
I would appreciate it if you share your experience and knowledge on this custom flash driver issue as well.
Regards,
Moonil