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.

AM623: Flash device recognition error

Part Number: AM623
Other Parts Discussed in Thread: SK-AM62, SYSCONFIG, SK-AM62B

Tool/software:

I have a custom board mounted AM62 device, and booted it up with SD boot.

There is an error about the Flash device configuration, but I can't figure out what caused it.

I have referred to the following link and created an SD.

https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Overview/Processor_SDK_Linux_create_SD_card.html

The image file generated by the SBL_NULL project is renamed to "tiboot3.bin" and placed on the SD card.

The configuration is changed as follows, because the Flash device is different from the components mounted on the SK-AM62 evaluation board.

【Device Information】

・CPU:AM6234ATCGHAALW
・FlashROM:MT25QL256ABA8ESF
 -256Mbit
 -Quad SPI

【More information】

・I confirmed that the waveform shows that the reset is unlocked after CS is asserted.
・CLK was not being output.

  • Hi, I will send this to one of our experts. In the meantime, I was wondering if you could try QSPI flash (not with SD card) procedure from MCU+SDK? AM62x MCU+ SDK: EVM Setup (ti.com)

    Also, do they have a AM62x SK or LP board to try their SD card and flash above shared steps?.

    Finally, maybe good to double check Manufacture ID and Device ID are correct in Sysconfig.

    Thank you,

    Paula

  • Thank you for your support. Best regards.

    I have evaluation boards SK-AM62 and SK-AM62B.
    I cannot use the default UART port, so I cannot run the normal flow along MCU+SDK procedure and thus I am booting from the SD card.

    I have checked the “MT25QL256ABA” datasheet regarding the manufacture ID and device ID.

  • Hello, thank you for your feedback.
    I have confirmed that the custom board can be booted using SBL_SD boot.
    However, I think SBL_SD does not have a FlashROM setting.

    I have also confirmed that the evaluation board can be booted by placing the image file, created with SBL_NULL, on the SD card.
    (I know that in case of SBL_NULL, DDR4 needs to be initialized additionally).


    What I really want to do is just check the connection between the FlashROM and the CPU.
    Also, I thought it would be inconvenient to not be able to use FlashROM when executing various projects in the future.
    Therefore, I would like to ask you to check if there are any faults in the settings related to FlashROM.

  • Can you please follow these steps to initialize the flash in 1s-1s-1s mode instead of the higher modes which can have issues if the custom flash part configurations are not done correctly.

    • Change the protocol to 1S-1S-1S.
    • Update the Basic Flash Configuration parameters like Flash Size, ManID, DeviceID according to your flash part.
    • Rebuild the SBL_NULL.

    If it still fails at reading the ID, can you apply the following patch to dump the read ids

    diff --git a/source/board/flash/ospi/flash_nor_ospi.c b/source/board/flash/ospi/flash_nor_ospi.c
    index f859408..23dacbb 100644
    --- a/source/board/flash/ospi/flash_nor_ospi.c
    +++ b/source/board/flash/ospi/flash_nor_ospi.c
    @@ -851,6 +851,9 @@ static int32_t Flash_norOspiReadId(Flash_Config *config)
     
             manfID = (uint32_t)idCode[0];
             devID = ((uint32_t)idCode[1] << 8) | ((uint32_t)idCode[2]);
    +
    +        DebugP_log("[%s:%d] manfID: 0x%x, devID: 0x%x\r\n", __func__, __LINE__, manfID, devID);
    +
             if (!((manfID == config->attrs->manufacturerId) && (devID == config->attrs->deviceId)))
             {
                 /* Try the other 3 bytes */
    

  • Thanks for the quick response. I used 1s-1s-1s and got the following.
    PHY does not seem to be Enable.

  • Attached are part of the configuration values.

  • Hello,

    The SBL_NULL bootloader boots a WKUP R5F application image from the default address of 0xA00000. If the application image is not flashed then the boot will fail.

    If you are looking to just test the flash R/W then I would recommend using SBL_SD bootloader to boot the OSPI_FLASH_IO example.

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/10_00_00_14/exports/docs/api_guide_am62x/EXAMPLES_DRIVERS_OSPI_FLASH_IO.html

    Regards,

    Prashant

  • After running SBL_SD bootloader, I ran OSPI_FLASH_IO example from CCS, but the same error occurred.
    The settings used were 1s-1s-1s.

  • Dear TI Engineers.
    I have not yet resolved this issue. Please check it out.

  • Hello,

    After running SBL_SD bootloader, I ran OSPI_FLASH_IO example from CCS, but the same error occurred.

    Can you please disable PHY & try again?

    I would also like to know which core's OSPI_FLASH_IO example you are running from the CCS.

    Thanks!

  • I turned off PHY but still got the same error.

    The following is a part of ti_board_open_close.c, which is output after setting at TI BOARD DRIVER>>FLASH in Sysconfig.

    /*
     * FLASH
     */
    /* FLASH Object - initialized during Flash_open() */
    Flash_NorOspiObject gFlashObject_MT25QL256ABA8ESF =
    {
        .rdDummyValPhyMode = FLASH_NOR_UPDATE_RD_DUMMY_VALUE,
    };
    
    /* FLASH Attrs */
    Flash_Attrs gFlashAttrs_MT25QL256ABA8ESF =
    {
        .flashType = CONFIG_FLASH_TYPE_SERIAL,
        .flashName = "MT25QL256ABA8ESF",
        .deviceId = 0xBA19,
        .manufacturerId = 0x20,
        .flashSize = 33554432,
        .blockCount = 1024,
        .blockSize = 32768,
        .pageCount = 128,
        .pageSize = 256,
        .sectorCount = 8192,
        .sectorSize = 4096,
    };
    
    /* FLASH DevConfig */
    Flash_DevConfig gFlashDevCfg_MT25QL256ABA8ESF =
    {
        .cmdExtType = OSPI_CMD_EXT_TYPE_REPEAT,
        .enable4BAddr = TRUE,
        .addrByteSupport = 1,
        .fourByteAddrEnSeq = 0xA0,
        .cmdWren = 0x06,
        .cmdRdsr = 0x05,
        .cmdWrsr = 0x00,
        .srWip = (1 << 0),
        .srWel = (1 << 1),
        .xspiWipRdCmd = 0x85,
        .xspiWipReg = 0x00800000,
        .xspiWipBit = (1 << 0),
        .resetType = 0x10,
        .eraseCfg = {
            .blockSize = 32768,
            .sectorSize = 4096,
            .cmdBlockErase3B = 0x52,
            .cmdBlockErase4B = 0x52,
            .cmdSectorErase3B = 0x20,
            .cmdSectorErase4B = 0x20,
            .cmdChipErase = 0xC7,
        },
        .idCfg = {
            .cmd = 0x9F, /* Constant */
            .numBytes = 3,
            .dummy4 = 0,
            .dummy8 = 0,
        },
        .protocolCfg = {
            .protocol = FLASH_CFG_PROTO_1S_1S_1S,
            .isDtr = FALSE,
            .cmdRd = 0x0B,
            .cmdWr = 0x02,
            .modeClksCmd = 0,
            .modeClksRd = 0,
            .dummyClksCmd = 8,
            .dummyClksRd = 8,
            .enableType = 0xFF,
            .enableSeq = 0xFF,
            .dummyCfg = {
                .isAddrReg = FALSE,
                .cmdRegRd = 0x85,
                .cmdRegWr = 0xB1,
                .cfgReg = 0x00,
                .shift = 0,
                .mask = 0x00,
                .cfgRegBitP = 0,
            },
        },
        .flashWriteTimeout = 512,
        .flashBusyTimeout = 256000000,
    };

  • Hi, can you please disable the 4B addressing mode with the following option in the Sysconfig of OSPI_FLASH_IO example?

  • Thank you for your confirmation.
    The test passed when the core used is r5fss0-0 freertos.
    In the case of a53ss0-0 freertos, the same error occurs, but I do not know why.

    When I change to 4s-4s-4s, nothing appears in the console.


    The settings for Flash in sysconfig's "ti_board_oepn_close.c" are as follows.

    /*
     * FLASH
     */
    /* FLASH Object - initialized during Flash_open() */
    Flash_NorOspiObject gFlashObject_MT25QL256ABA8ESF =
    {
        .rdDummyValPhyMode = FLASH_NOR_UPDATE_RD_DUMMY_VALUE,
    };
    
    /* FLASH Attrs */
    Flash_Attrs gFlashAttrs_MT25QL256ABA8ESF =
    {
        .flashType = CONFIG_FLASH_TYPE_SERIAL,
        .flashName = "MT25QL256ABA8ESF",
        .deviceId = 0xBA19,
        .manufacturerId = 0x20,
        .flashSize = 33554432,
        .blockCount = 1024,
        .blockSize = 32768,
        .pageCount = 128,
        .pageSize = 256,
        .sectorCount = 8192,
        .sectorSize = 4096,
    };
    
    /* FLASH DevConfig */
    Flash_DevConfig gFlashDevCfg_MT25QL256ABA8ESF =
    {
        .cmdExtType = OSPI_CMD_EXT_TYPE_REPEAT,
        .enable4BAddr = FALSE,
        .addrByteSupport = 1,
        .fourByteAddrEnSeq = 0xA0,
        .cmdWren = 0x06,
        .cmdRdsr = 0x05,
        .cmdWrsr = 0x00,
        .srWip = (1 << 0),
        .srWel = (1 << 1),
        .xspiWipRdCmd = 0x85,
        .xspiWipReg = 0x00800000,
        .xspiWipBit = (1 << 0),
        .resetType = 0x10,
        .eraseCfg = {
            .blockSize = 32768,
            .sectorSize = 4096,
            .cmdBlockErase3B = 0x52,
            .cmdBlockErase4B = 0x52,
            .cmdSectorErase3B = 0x20,
            .cmdSectorErase4B = 0x20,
            .cmdChipErase = 0xC7,
        },
        .idCfg = {
            .cmd = 0x9F, /* Constant */
            .numBytes = 3,
            .dummy4 = 0,
            .dummy8 = 0,
        },
        .protocolCfg = {
            .protocol = FLASH_CFG_PROTO_4S_4S_4S,
            .isDtr = FALSE,
            .cmdRd = 0x6B,
            .cmdWr = 0x02,
            .modeClksCmd = 0,
            .modeClksRd = 0,
            .dummyClksCmd = 10,
            .dummyClksRd = 10,
            .enableType = 0,
            .enableSeq = 0x00,
            .protoCfg = {
                .isAddrReg = FALSE,
                .cmdRegRd = 0x6B,
                .cmdRegWr = 0x02,
                .cfgReg = 0x00,
                .shift = 0,
                .mask = 0x00,
                .cfgRegBitP = 0,
            },
            .strDtrCfg = {
                .isAddrReg = TRUE,
                .cmdRegRd = 0x85,
                .cmdRegWr = 0xB1,
                .cfgReg = 0x00800006,
                .shift = 1,
                .mask = 0x02,
                .cfgRegBitP = 1,
            },
            .dummyCfg = {
                .isAddrReg = FALSE,
                .cmdRegRd = 0x85,
                .cmdRegWr = 0xB1,
                .cfgReg = 0x00,
                .shift = 0,
                .mask = 0x00,
                .cfgRegBitP = 0,
            },
        },
        .flashWriteTimeout = 512,
        .flashBusyTimeout = 256000000,
    };

  • When I change to 4s-4s-4s, nothing appears in the console.

    As previously conveyed, the higher modes would require correct flash parameters according to the flash datasheet.

    If you have filled the different parameters according to the datasheet & still see the issue, please create a new thread for our OSPI expert to follow on the issue.

    Thanks,

    Prashant