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.

AM2634: SFDP QSPI FLASH Customization Questions in SDK_08_05_00_24

Part Number: AM2634
Other Parts Discussed in Thread: UNIFLASH

Hi experts,

     My customer is trying to use MX25L12833F this flash. They put it on our LP-AM263x and run qspi_flash_diag_am263x demo project and get json file as attachment.

{

        "flashSize": "16777216",
        "flashPageSize": "256",
        "flashManfId": "0xC2",
        "flashDeviceId": "0x2018",
        "flashBlockSize": "65536",
        "flashSectorSize": "4096",
        "cmdBlockErase3B": "0xD8",
        "cmdBlockErase4B": "0xD8",
        "cmdSectorErase3B": "0x20",
        "cmdSectorErase4B": "0x20",
        "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": {
                        "isDtr": false,
                        "cmdRd": "0x3B",
                        "cmdWr": "0x02",
                        "modeClksCmd": 0,
                        "modeClksRd": 0,
                        "dummyClksCmd": 0,
                        "dummyClksRd": 8,
                        "enableType": "0",
                        "enableSeq": "0x00",
                        "dummyCfg": null,
                        "protoCfg": null,
                        "strDtrCfg": null,
                },
                "p114": {
                        "isDtr": false,
                        "cmdRd": "0x6B",
                        "cmdWr": "0x02",
                        "modeClksCmd": 0,
                        "modeClksRd": 0,
                        "dummyClksCmd": 0,
                        "dummyClksRd": 8,
                        "enableType": "255",
                        "enableSeq": "0x00",
                        "dummyCfg": null,
                        "protoCfg": null,
                        "strDtrCfg": null,
                },
                "p118": null,
                "p444s": null,
                "p444d": null,
                "p888s": null,
                "p888d": null,
                "pCustom": null
        },
        "addrByteSupport": "0",
        "fourByteAddrEnSeq": "0x00",
        "resetType": "0x10",
        "cmdWren": "0x06",
        "cmdRdsr": "0x05",
        "srWip": 0,
        "srWel": 1,
        "cmdChipErase": "0xC7",
        "flashDeviceBusyTimeout": 0,
        "flashPageProgTimeout": 400
}

We meet problem to load json file. So we key in flash parameters manually. However, some questions may need your help to clarify:

1. in json file, p114 1s-1s-4s protocol

"enableType": "255",
"enableSeq": "0x00",

There is no enable type "255" in syscfg, and according flash datasheet we need to use type "2" to set QE bit

how is this type coming from?

What does "enableSeq": "0x00" mean?

2.  Timeout value:

In json file, 

"flashDeviceBusyTimeout": 0,
"flashPageProgTimeout": 400

however, in qspi flash driver source codes, these two values just default timer values which count down in a while loop. if timer set to 0, it means it timeout immediately and we will get timeout error since erase,flash write needs some time to accomplish it. Can you please check why we get these two values from diag demo?

Regards

Andre

  • Hi ,

    I have assigned the query to the expert. He will come back to you on this shortly.

    Best Regards.
    Aakash

  • Hi Andre,

    This flash has an older SFDP version and thus, the required parameters will need to be manually updated in the Json file.

    As you already found out, "enableType" can be set to 2.

    "enableType" is don't care in this case since it only for 4s-4s-4s mode.

    The timeouts values also should be manually updated.

    Regards,

    Ashwin

  • Update the procedures.

    1. Use qspi_flash_diag project to get flash information. Since mx25f12833f supports sfdp, we can get flash parameters as attached log.

    [Cortex_R5_0] [QSPI Flash Diagnostic Test] Starting ...
    [QSPI Flash Diagnostic Test] Flash Manufacturer ID : 0xC2
    [QSPI Flash Diagnostic Test] Flash Device ID       : 0x2018
    [QSPI Flash Diagnostic Test] Executing Flash Erase on first block...
    [QSPI Flash Diagnostic Test] Done !!!
    [QSPI Flash Diagnostic Test] Performing Write-Read Test...
    [QSPI Flash Diagnostic Test] Write-Read Test Passed!
    [QSPI Flash Diagnostic Test] SFDP Information : 
    ================================================
                          SFDP                      
    ================================================
    SFDP Major Revision                       : 0x1
    SFDP Minor Revision                       : 0x0
    Number of Parameter Headers in this Table : 2
    
    Types of Additional Parameter Tables in this flash
    ---------------------------------------------------
    Unsupported Parameter Table type!!! - 0xFFC2
    
    
    {
    
    	"flashSize": "16777216",
    	"flashPageSize": "256",
    	"flashManfId": "0xC2",
    	"flashDeviceId": "0x2018",
    	"flashBlockSize": "65536",
    	"flashSectorSize": "4096",
    	"cmdBlockErase3B": "0xD8",
    	"cmdBlockErase4B": "0xD8",
    	"cmdSectorErase3B": "0x20",
    	"cmdSectorErase4B": "0x20",
    	"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": {
    			"isDtr": false,
    			"cmdRd": "0x3B",
    			"cmdWr": "0x02",
    			"modeClksCmd": 0,
    			"modeClksRd": 0,
    			"dummyClksCmd": 0,
    			"dummyClksRd": 8,
    			"enableType": "0",
    			"enableSeq": "0x00",
    			"dummyCfg": null,
    			"protoCfg": null,
    			"strDtrCfg": null,
    		},
    		"p114": {
    			"isDtr": false,
    			"cmdRd": "0x6B",
    			"cmdWr": "0x02",
    			"modeClksCmd": 0,
    			"modeClksRd": 0,
    			"dummyClksCmd": 0,
    			"dummyClksRd": 8,
    			"enableType": "255",
    			"enableSeq": "0x00",
    			"dummyCfg": null,
    			"protoCfg": null,
    			"strDtrCfg": null,
    		},
    		"p118": null,
    		"p444s": null,
    		"p444d": null,
    		"p888s": null,
    		"p888d": null,
    		"pCustom": null
    	},
    	"addrByteSupport": "0",
    	"fourByteAddrEnSeq": "0x00",
    	"resetType": "0x10",
    	"cmdWren": "0x06",
    	"cmdRdsr": "0x05",
    	"srWip": 0,
    	"srWel": 1,
    	"cmdChipErase": "0xC7",
    	"flashDeviceBusyTimeout": 0,
    	"flashPageProgTimeout": 400
    }
    
    All tests have passed!!

    2. Modify syscfg manually according to SFDP.  We changed 

    a. MFGID from 0x01 t0 0xC2

    b. QE type from type 1 to type 2 according to mx25l12833f datasheet.

    c. Keep original "flashDeviceBusyTimeout" "flashPageProgTimeout" values.  The modified syscfg can be reference as.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/3583.example.syscfg

    3. Use new syscfg with qspi_flash_dma_transfer demo project, we can pass 32K bytes read/write test. 

    4. Base on this result, we use modified syscfg to rebuild sbl_uart_uniflash , sbl_qspi and sbl_null.

    5. Use new sbl_uart_uniflash to program sbl_null. We can boot from mx25l12833f successfully.

    (mcu+) andre@elevation:~/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot$ python uart_uniflash.py -p /dev/ttyACM0 --cfg=/home/andre/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot/app_config/mx25l12833f_sbl_null.cfg 
    
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 2 command(s) !!!
    
    Executing command 1 of 2 ...
    Found flash writer ... sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am26Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am26Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am26                                                                                                                                         Sent flashwriter /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 68041 bytes in 8.99s.
    
    Executing command 2 of 2 ...
    Command arguments : --file=/home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage --operation=flash --flash-offset=0x0
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_nor                                                                                                                                         Sent /home/andre/workspace_v12/sitara_mcu/am263x/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_null_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 187249 bytes in 20.38s.
    [STATUS] SUCCESS !!!
    
    All commands from config file are executed !!!
    (mcu+) andre@elevation:~/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot$ 
    
    
    
    Welcome to minicom 2.7.1
    
    OPTIONS: I18n 
    Compiled on Aug 13 2017, 15:25:34.
    Port /dev/ttyACM0, 11:23:55
    
    Press CTRL-A Z for help on special keys
    
    
    Starting NULL Bootloader ... 
    INFO: Bootloader_runCpu:155: CPU r5f1-1 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f1-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runCpu:155: CPU r5f0-1 is initialized to 400000000 Hz !!!
    [BOOTLOADER_PROFILE] Boot Media       : undefined 
    [BOOTLOADER_PROFILE] Boot Image Size  : 0 KB 
    [BOOTLOADER_PROFILE] Cores present    : 
    [BOOTLOADER PROFILE] System_init                      :        683us 
    [BOOTLOADER PROFILE] Drivers_open                     :         43us 
    [BOOTLOADER PROFILE] LoadHsmRtFw                      :         21us 
    [BOOTLOADER_PROFILE] SBL Total Time Taken             :      21901us 
    
    NULL Bootloader Execution Complete... 
    INFO: Bootloader_loadSelfCpu:207: CPU r5f0-0 is initialized to 400000000 Hz !!!
    INFO: Bootloader_runSelfCpu:217: All done, reseting self ...
    
    

    6. Use new sbl_uart_uniflash to program sbl_qspi and gpio_led_blinking. We can make application work properly.

    (mcu+) andre@elevation:~/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot$ python uart_uniflash.py -p /dev/ttyACM0 --cfg=/home/andre/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot/app_config/mx25l12833f_gpio_led_blink_am263x-lp.cfg
    
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 3 command(s) !!!
    
    Executing command 1 of 3 ...
    Found flash writer ... sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am26Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am26                                                                                                                                         Sent flashwriter /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 68041 bytes in 6.22s.
    
    Executing command 2 of 3 ...
    Command arguments : --file=/home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage --operation=flash --flash-offset=0x0
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_norSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_nor                                                                                                                                         Sent /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 187249 bytes in 18.58s.
    [STATUS] SUCCESS !!!
    
    Executing command 3 of 3 ...
    Command arguments : --file=/home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage --operation=flash --flash-offset=0x80000
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_                                                                                                                                         Sent /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage of size 39488 bytes in 6.63s.
    [STATUS] SUCCESS !!!
    
    All commands from config file are executed !!!
    (mcu+) andre@elevation:~/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot$ 
    

    Here are SBLs modified for MX25L12833F for reference.

    MX25L12833F.zip

    Regards

    Andre