Other Parts Discussed in Thread: TMDS64EVM
Our customer sees OSPI_DIAG example fails on TMDS243EVM.
I have confirmed that it reproduces on TMDS64EVM as well.
[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...
ERROR: ospi_flash_diag_test_compare_buffers:185: OSPI read data mismatch !!!
Some tests have failed!!
This issue seems to be caused by insufficient wait time after Flash has been erased because the example works fine when more than a suitable wait time is added after Flash is erased in the code.
DebugP_log("[OSPI Flash Diagnostic Test] Executing Flash Erase on first block...\r\n");
status = OSPI_norFlashErase(ospiHandle, offset);
if(SystemP_SUCCESS == status)
{
DebugP_log("[OSPI Flash Diagnostic Test] Done !!!\r\n");
}
else
{
DebugP_log("[OSPI Flash Diagnostic Test] Erase Failed !!!\r\n");
}
#if 1 // Changed codes
int32_t loop_count;
for (loop_count = 0; loop_count < 40000000; loop_count++); // for wait
#endif
DebugP_log("[OSPI Flash Diagnostic Test] Performing Write-Read Test...\r\n");
status = OSPI_norFlashWrite(ospiHandle, offset, gOspiTxBuf, APP_OSPI_DATA_SIZE);
Could you tell me the correct fix for the example to work fine?
Best regards,
Daisuke