This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDS64EVM: Flash Driver api(Flase_eraseSector) is not working correctly.

Part Number: TMDS64EVM

Tool/software:

I imported ospi_flash_io application and successfully ran in TMDS64EVM board.

In this application, to write flash, sequence is as follows.

Flash_offsetToBlkPage(gFlashHandle[CONFIG_FLASH0], offset, &blk, &page);
status = Flash_eraseBlk(gFlashHandle[CONFIG_FLASH0], blk);

status = Flash_write(gFlashHandle[CONFIG_FLASH0], offset, gOspiTxBuf, APP_OSPI_DATA_SIZE);

I have to write flash only erase sector not block.

So I updated the above as follows,

Flash_offsetToSectorPage(gFlashHandle[CONFIG_FLASH0], offset, &sector, &page);
status = Flash_eraseSector(gFlashHandle[CONFIG_FLASH0], sector);

status = Flash_write(gFlashHandle[CONFIG_FLASH0], offset, gOspiTxBuf, APP_OSPI_DATA_SIZE);

When I ran the above code, Flash_write error happen. I found out that Flase_eraseSector is not working correctly. When I read flash after Flash_eraseSector executed, couple of values are not 0xFF.

Please let me know how to write flash only erasing sector.

Regards,

Sangjoon