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.

SK-AM64B: OSPI Flash Diag example failing

Part Number: SK-AM64B

Tool/software:

Hello Team

I am trying to run the OSPI Flash Diag example on AM64x SK board. But the as per the debug information it is failing to run:

[MAIN_Cortex_R5_0_0] [OSPI Flash Diagnostic Test] Starting ...
[OSPI Flash Diagnostic Test] Flash Manufacturer ID : 0xFF
[OSPI Flash Diagnostic Test] Flash Device ID       : 0xFFFF
[OSPI Flash Diagnostic Test] Executing Flash Erase on first block...
[OSPI Flash Diagnostic Test] Erase Failed !!!
[OSPI Flash Diagnostic Test] Performing Write-Read Test...
[OSPI Flash Diagnostic Test] Wtite Failed !!!
ERROR: ospi_flash_diag_test_compare_buffers:181: OSPI read data mismatch !!!
Some tests have failed!!

Kindly let me know what is wrong. I have uploaded the SBL NULL in OSPI and I am running the example through CCS as instructed

Thanks

Amey

  • Hello Amey,

    Thank you for your question.

    Your procedure to run the application is correct.

    This issue has been reproduced at our end and we are in the process of debugging why this is happening.

    Please allow us few business days to get back on this.

    Regards,

    Vaibhav

  • Thanks Vaibhav.

    FYI: Same error was also observed on AM64x EVM

  • Hello Amey,

    I can understand that this was also observed in the AM64x EVM.

    Allow me to run a couple of experiments and get back to you.

    Regards,

    Vaibhav

  • Hello Amey,

    I would suggest you to boot the board using any other boot mode, so for example if you are currently booting with OPSI Boot Mode set on the EVM, then I would encourage you to try initializing the SoC with a another way.

    Can you try with this way: 

    Set the board to uart boot mode:

    python uart_bootloader.py -p COMX -b sbl_prebuilt\am64x-sk\sbl_uart.release.hs_fs.tiimage -f "C:\Users\A0502407\workspace\ospi_flash_diag_am64x-sk_r5fss0-0_nortos_ti-arm-clang\Debug\ospi_flash_diag_am64x-sk_r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs"

    Once you execute the above line, then at the end of the logs there will be a line stating:

    [STATUS] Application load SUCCESS !!!
    Connect to UART in 2 seconds to see logs from UART !!!

    So you would need to connect to the COM Port and then you would actually see your logs on the respective port.

    Regards,

    Vaibhav

  • Hello Vaibhav, I will try this and let you know

  • Hello Amey,

    Thank you. I will wait for your results.

    Regards,

    Vaibhav

  • Hi Vaibhav

    The above solution worked. I got following log when running via UART SBL.

    [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!
    [QSPI 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
    NOR SPI 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.
    JSON Data for the flash :
    
    {
    
            "flashSize": 67108864,
            "flashPageSize": 256,
            "flashManfId": "0x34",
            "flashDeviceId": "0x5B1A",
            "flashBlockSize": 262144,
            "flashSectorSize": 4096,
            "cmdBlockErase3B": "0xDC",
            "cmdBlockErase4B": "0xDC",
            "cmdSectorErase3B": "0x21",
            "cmdSectorErase4B": "0x21",
            "protos": {
                    "p111": {
                            "isDtr": false,
                            "cmdRd": "0x03",
                            "cmdWr": "0x02",
                            "modeClksCmd": 0,
                            "modeClksRd": 0,
                            "dummyClksCmd": 0,
                            "dummyClksRd": 0,
                            "enableType": "0",
                            "enableSeq": "0x00",
                            "dummyCfg": null,
                            "protoCfg": null,
                            "strDtrCfg": null
                    },
                    "p112": null,
                    "p114": null,
                    "p118": null,
                    "p444s": null,
                    "p444d": null,
                    "p888s": null,
                    "p888d": {
                            "isDtr": true,
                            "cmdRd": "0xEE",
                            "cmdWr": "0x12",
                            "modeClksCmd": 0,
                            "modeClksRd": 0,
                            "dummyClksCmd": 4,
                            "dummyClksRd": 24,
                            "enableType": "0",
                            "enableSeq": "0x00",
                            "dummyCfg": {
                                    "isAddrReg": true,
                                    "cmdRegRd":"0x65",
                                    "cmdRegWr":"0x71",
                                    "cfgReg":"0x00800003",
                                    "shift":0,
                                    "mask":"0x03",
                                    "bitP":11
                            },
                            "protoCfg": {
                                    "isAddrReg": true,
                                    "cmdRegRd": "0x65",
                                    "cmdRegWr": "0x71",
                                    "cfgReg": "0x00800006",
                                    "shift": 0,
                                    "mask": "0x00",
                                    "bitP": 0
                            },
                            "strDtrCfg": {
                                    "isAddrReg": true,
                                    "cmdRegRd": "0x65",
                                    "cmdRegWr": "0x71",
                                    "cfgReg": "0x00800006",
                                    "shift": 1,
                                    "mask": "0x00",
                                    "bitP": 1
                            }
                    },
                    "pCustom": {
                            "fxn": null
                    }
            },
            "addrByteSupport": "1",
            "fourByteAddrEnSeq": "0xA0",
            "cmdExtType": "REPEAT",
            "resetType": "0x10",
            "deviceBusyType": "1",
            "cmdWren": "0x06",
            "cmdRdsr": "0x05",
            "srWip":  0,
            "srWel":  1,
            "cmdChipErase": "0xC7",
            "rdIdSettings": {
                    "cmd": "0x9F",
                    "numBytes": 5,
                    "dummy4": 0,
                    "dummy8": 0
            },
            "xspiWipRdCmd": "0x65",
            "xspiWipReg": "0x00800000",
            "xspiWipBit": 0,
            "flashDeviceBusyTimeout": 256000000,
            "flashPageProgTimeout": 512
    }
    
    All tests have passed!!
    

    What is the reason for the debugger method not to work?

    Thanks

    Amey

  • Hello Amey,

    So this is whats happening.

    So if we use OSPI boot mode, it is defeating the purpose of  ospi flash diagnostics.

    Because ospi flash diagnostics is used to get the values given we do not know the configuration, dummy cycle values and so on.

    Regards,

    Vaibhav

  • Okay. Got it. Thanks Vaibhav

  • Hello Amey,

    Thank you.

    Closing the thread as its resolved.

    Regards,

    Vaibhav