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.

LP-AM243: Data mismatched when testing ospi flash diag demo.

Part Number: LP-AM243

Tool/software:

Hi TI

We are integrating a new custom flash device IS25LP128F, we test the ospi flash diag and failed when doing write read test.

We debuged the data and found that data read back is shifted one byte compared to the data we wrote in. What we wrote is [00, 01, 02, 03, 04, .....], but data read back is [01, 02, 03, 04, 05...]. 

We are using sdk version mcu_plus_sdk_am243x_09_02_01_05.

Fullscreen
1
2
3
4
5
6
7
8
9
void OSPI_ReadCmdParams_init(OSPI_ReadCmdParams *rdParams)
{
rdParams->cmd = OSPI_CMD_INVALID_OPCODE;
rdParams->cmdAddr = OSPI_CMD_INVALID_ADDR;
rdParams->numAddrBytes = 3;
rdParams->rxDataBuf = NULL;
rdParams->rxDataLen = 0;
rdParams->dummyBits = 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

dummyBits is already set to 0.

We do more test on it, just write 8 bytes from 0 to 7 and then read back.

Write cycle is as expected, 02 is write command, address is 08 00 00, followed by data 0-7.

But in read cycle, data field is not 8 but 9, one more byte than expected. so data read out is [01 - 07 FF].

We don't know why in read cycle, one more byte cycle is performed and why we just trigger one read command but actuallly OSPI controller repeated several times as shown in the above picture.

We need help, looking forward to your reply. Thanks a lot.

  • Hello Cheng,

    The ospi flash diagnostics will mostly do the operations in 1S-1S-1S mode to retrieve the values from the flash part.

    Okay, so now I want you to go ahead and run the ospi flash diagnostics example without making any modifications in the code.

    And I want you to put a breakpoint inside the following function OSPI_readDirect(). The call stack should look like this:

    Put  a breakpoint just after OSPI_enableDacMode()

    Once done, you should open memory broswer and put the address as 0x60080000. Can you share me the screenshot of the values from 0x60080000 onwards?

    Looking forward to your response.

    Regards,

    Vaibhav

  • Hi Vaibhav

    Thanks for your help.

    The error occured when we boot from uart, andl load uart sbl. After we changed to boot from dev mode, the error disappears, I think uart sbl did some initialization that don't fit this ospi diag demo.

  • Hello Cheng,

    Thanks for your response.

    After we changed to boot from dev mode, the error disappears, I think uart sbl did some initialization that don't fit this ospi diag demo.

    That is correct understanding. That is how it is supposed to be run.

    Please go through a similar thread which addresses this issue: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1391564/sk-am64b-ospi-flash-diag-example-failing

    Marking this thread resolved.

    Regards,

    Vaibhav