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.

AM5729: AM5729 custom board QSPI issue

Part Number: AM5729
Other Parts Discussed in Thread: UNIFLASH,

Hi,

Below is the steps followed to program QSPI flash using uniflash tool.

 

ERASING QSPI FLASH:
-------------------
> Power cycle the board and let it boot from qspi.
> Open ccs.
> launch the target configuration but don't connect it.
> right click on the core (a15) -> open gel files view -> right click in the gel/script section -> remove all. Basically, you have to connect the core without gel files.
> then connect the core and load and run <path\to\uniflash\root_folder>\processors\FlashWriter\idkAM571x\uart_idkAM571x_flash_programmer.out.
> You can see CCC in the serial console.
> Note down the port number and close the console.
> Open CLI from uniflash root folder and give below command - dslite.bat --mode processors -c COM4 -e 10000 -d 2 -o 0.

 

 

command line qspi flash IDK:
---------------------------

> cd C:\ti\uniflash_6.2.0

> dslite.bat --mode load --config=C:\ti\pdk_am57xx_1_0_17\packages\MyExampleProjects\MMCSD_idkAM572x_armTestproject\targetConfigs\IDK_AM572X.ccxml -f C:\ti\uniflash_6.2.0\processors\FlashWriter\idkAM572x\uart_idkAM572x_flash_programmer.out -n 8

> dslite.bat --mode processors -c COM19 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM572x\qspi\bin\MLO -d 2 -i 1 -o 0

> dslite.bat --mode processors -c COM19 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM572x\idk\led_TEST -d 2 -o 80000

 

 

When we are executing highlighted line of the above script in our custom board, it’s hanging and no response in tool. We tried to program same custom board MLO file flashing in EVM and it’s working fine.

 

Main hardware change between custom board and EVM is only the size of the flash.

 

EVM -  S25FL256S

Custom Board - S25FL512SAGMFIR10

 

Do we need to do any modification for working with different flash in uniflash tool?

 

Processor – AM5729

PDK - pdk_am57xx_1_0_17

Regards,

K.A.Rajeshwar.

  • Hi,
                  
                > We are able to erase QSPI flash location using  Uniflash. but, when we are trying to program into QSPI flash, we are unable to load the MLO using Uniflash.
     
                > We executed command like below to write MLO to QSPI:
                    dslite.bat --mode processors -c COM19 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM572x\qspi\bin\MLO -d 2 -i 1 -o 0
                Uniflash QSPI command line prints:
                -----------------------------------------------
                 ***************************************************************************************************************
               

                   C:\ti\uniflash_6.2.0>dslite.bat --mode processors -c COM6 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM572x\qspi\bin\MLO -d 2 -i 1 -o 0

                   Executing the following command:
                   > C:\ti\uniflash_6.2.0\processors\ProcessorSDKSerialFlash.exe -c COM6 -f                                             C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM572x\qspi\bin\MLO                  -d 2 -i 1 -o 0
                   For more details and examples, please refer to the UniFlash Quick Start guide.
                  ----------------------------------------------------------------------------
                  ProcessorSDKSerialFlash CLI Tool
                 Copyright (C) 2017-2021 Texas Instruments Incorporated - http://www.ti.com/
                 Version 1.4.0.0
                 ----------------------------------------------------------------------------
                 Transferring the Image to Flash Programmer..
     
                 Transferring Header Information.. Header Transfer Complete!
                *******************************************************************************************************************************

                 But it seems to be stopped after "Header Transfer Complete!" . Kindly help us to resolve the issue.

    Regards,
    K.A.Rajeshwar
  • Hi,

    there are few debugging cases you can follow here:

    • Is your SD boot is working fine. If so, whether it is the default MLO or you have to built it freshly against your custom Board. 
      • I guessed, you must have built it for your custom board taking new board library into account. If so, you have to rebuild the qspi MLO again, taking reference with the modification what you have did for MMCSD MLO.
    • You can also check SPI interface first (preferably diagnostic test or driver example), to validate read/write access to the interface.

    you can see below useful documentation also:

  • Hi Anubhav,

             > We created new MMCSD MLO and QSPI MLO for custom board. MMCSD MLO is working in custom board for SD card boot-up. QSPI MLO we unable flash in Uniflash method. it's stopped above we mentioned in our quary.

              > SPI read/write interfaces we tested using QSPI pdk example file . 

    Regards,

    Rajeshwar

  • Hi,

    We created new MMCSD MLO and QSPI MLO for custom board. MMCSD MLO is working in custom board for SD card boot-up. QSPI MLO we unable flash in Uniflash method.

    Please follow the steps mentioned here under writing sequence section: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1005148/faq-processor-sdk-am57x-how-to-boot-from-qspi-flash-on-am57x?tisearch=e2e-quicksearch&keymatch=faq%20qspi%20am

    what about SPI addresses, are the starting addresses are same for custom and TIEvms?

    For flash related code, you should probably update board/src/flash folder.

  • Hi Anubhav,

               > we used your Writing sequence only. SPI addresses is same for custom and EVM.  for Custom Board - S25FL512SAGMFIR10 QSPi we updated board/src/flash folder. but, when trying uniflash MLO flash, itstopped after "Header Transfer Complete!" . Kindly help us to resolve the issue.

               > we are planning to replace our Custom Board - S25FL512SAGMFIR10 QSPI IC to AM572x IDK  EVM -  S25FL256S QSPI IC. because TI RTOS PDk QSPI configuration for EVM -  S25FL256S QSPI. is it work?

    Regards,

    Rajeshwar.

  • Hi,

    we updated board/src/flash folder

    Have you validated the updated library.

    is it work?

    This ICs are already validated with AM57x evm.

    Can you check/share your MLO for TI evms.

  • Hi Anubhav, 

                 1) Have you validated the updated library   --> i don't how to validated QSPI board/src/flash folder. You have any steps to validate. kindly share steps for validate.

                   2) i checked  MLO AM572x IDK. here i attached AM572x IDK MLO file as MLO.txt format.

    .7840.MLO.txt

  • Hi,

    I am thinking that qspi is not initialized yet.

    1) Have you validated the updated library   --> i don't how to validated QSPI board/src/flash folder. You have any steps to validate. kindly share steps for validate.
    • Can you check manufacturer and device id by doing register read using board lib api and match it with ids given in datasheet.
    • If succeeded, run the qspi diag test and share the log.
    2) i checked  MLO AM572x IDK. here i attached AM572x IDK MLO file as MLO.txt format.

    This one is working on TIevm.

    In case of sd boot, is the same card is booting on both custom board and TIevm.

  • Hi Anubhav,

          1) we are able to read manufacturer and device id by doing register read using QSPI_BasicExample_idkAM572x_armExampleProject. but when we use UNIFLASH method  not able to flash MLO. we suspected in UNIFLASH method, we are not able write properly in QSPI memory space. kindly check and help us for resolve this issue.

           2) SD card boot, for custom board and TI evm we are use different card wth different MLO and app. For QSPI also we generated different MLO for QSPI for custom and TI evm.

    Regards,

    Rajeshwar

  • Hi,

    we are able to read manufacturer and device id by doing register read using QSPI_BasicExample_idkAM572x_armExampleProject.

    Read/write is successful?

    when we use UNIFLASH method  not able to flash MLO.

    you have to flash uart_XXXAM57XX_flash_programmer.out first before MLO.

    • which .out you are flashing.
      • I think you are using uniflash/processors/FlashWriter/idkAM572x/uart_idkAM572x_flash_programmer.out. If so, this might be the issue. You are updating board/src/flash/ inside pdk and running the script from uniflash, these two will are two different folders. After updating the flash folder build the library and flash the .out generated at pdk_am57xx_X_X_XX\packages\ti\board\utils\uniflash\target\bin\idkAM572x\. This binary is linked with your updated board library.
    • are you seeing CCC on the console.
  • Hi Anubhav,

    > yes, we able to read and write properly using QSPI_BasicExample_idkAM572x_armExampleProject code.

    > yes, we first flashed uart_XXXAM57XX_flash_programmer.out. we able erase also. but we are not able flash MLO. please check our first quary about this issue.

    Regards,

    Rajeshwar

  • Hi,

    yes, we able to read and write properly using QSPI_BasicExample_idkAM572x_armExampleProject code.

    great, means your flash is in place.

    yes, we first flashed uart_XXXAM57XX_flash_programmer.out. we able erase also. but we are not able flash MLO. please check our first quary about this issue.
    C:\ti\uniflash_6.2.0\processors\FlashWriter\idkAM572x\uart_idkAM572x_flash_programmer.out -n 8

    what i am seeing here is you are using flash_programmer.out from uniflash folder. 

    I think you are using uniflash/processors/FlashWriter/idkAM572x/uart_idkAM572x_flash_programmer.out. If so, this might be the issue. You are updating board/src/flash/ inside pdk and running the script from uniflash, these two will are two different folders. After updating the flash folder build the library and flash the .out generated at pdk_am57xx_X_X_XX\packages\ti\board\utils\uniflash\target\bin\idkAM572x\. This binary is linked with your updated board library.

    As mentioned here, have you tried with binary at board/src/utils/uniflash/target/bin folder. Make sure this binary is not the prebuilt one. Rebuild this binary, then only it will take your flash changes.

  • Hi Anubhav, 

       > we updated the flash folder, build the library and we  generated  .out.

       > In  this folder we found our new                                     "pdk_am57xx_X_X_XX\packages\ti\board\utils\uniflash\target\bin\idkAM572x\uart_idkAM572x_flash_programmer.out"

       > after flashed uart_idkAM572x_flash_programmer.out. we able erase. but we are not able flash MLO. But it seems to be stopped after "Header Transfer Complete!" . Kindly help us to resolve the issue.

    Regards,

    Rajeshwar

  • Hi,

    Can you check the following:

    • After 'Header Transfer Complete!' does flash programmer send 'C'. Can you check on serial console without resetting the board. If flash programmer sends 'C', then QSPI init is successful and waiting for flashing image from uniflash. (If 'C's are not coming at 115k baudrate, then can you check on 3M baudrate).

    (Note: Flashing address should be the start of sector)

  • Hi,

             After 'Header Transfer Complete!' flash programmer not send 'C'. serial console not print C. where i have change Baudrate?. please check and  Kindly help us for debug.

    Regards,

    Sathish

  • Hi,

    where i have change Baudrate?

    you can change that from serial console settings.

    for example, in teraterm you can change as follows:

  • Hi Anubav,

                      i changed baudrate 3000000 to 115200 in ProcessorSDKSerialFlash.exe Uniflash application file. but i am not able to flash.

     here i attached my debug log. Kindly check and help us resolve issue.

    C:\ti\uniflash_6.2.0>dslite.bat --mode processors -c COM8 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
    Executing the following command:
    > C:\ti\uniflash_6.2.0\processors\ProcessorSDKSerialFlash.exe -c COM8 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
    
    For more details and examples, please refer to the UniFlash Quick Start guide.
    
    optInName: -f
    optInVal: C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO
    cliarg: -f
    cliargval :C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO
    optInName: -d
    optInVal: 2
    cliarg: -d
    cliargval :2
    optInName: -i
    optInVal: 1
    cliarg: -i
    cliargval :1
    optInName: -o
    optInVal: 0
    cliarg: -o
    cliargval :0
    
    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.2.0.0
    ----------------------------------------------------------------------------
    Transferring the Image to Flash Programmer..
    Device Type-2
    ImageType-1
    Offset-0
    
    Configuring COM Port!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    Configuring COM Port success!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    Failure in sending Command packet
    Failure in sending Command packet
    Failure in sending Command packet
    Failure in sending Command packet
    Failure in sending Command packet
    Failure in sending Command packet
    crc: 33511
    hsize: 12
    
    Configuring COM Port!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    Configuring COM Port success!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    crc: 34461
    hsize: 12
    Received from Rx !!Retry0
    Sending EOT
    Rcvd ACK for EOT
    Set BaudRate command packet - SS
    
    Transferring Header Information..
    Header - SP21
    
    Configuring COM Port!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    Configuring COM Port success!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    crc: 37463
    hsize: 12
    Received from Rx !!Retry0
    Sending EOT
    Rcvd ACK for EOT
    Header Transfer Complete!
    BaudRate need to change - 115200
    
    Opening file C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO
    
    Configuring COM Port!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    Configuring COM Port success!
    
    BaudRate = 115200, ByteSize = 8, Parity = 0, StopBits = 0
    
    
    File size 274516bytes
    
    Flashing Image of size 274516 bytes
    0% complete
    Received from Rx !!Retry0
    0% complete
    Received from Rx !!Retry0
    0% complete
    Received from Rx !!Retry0
    1% complete
    Received from Rx !!+Retry7
    
    Flash Programming Failed!!
    
    C:\ti\uniflash_6.2.0>

    Regards,

    Sathish

  • i changed baudrate 3000000 to 115200 in ProcessorSDKSerialFlash.exe

    As shown, i asked you change serial console (teraterm), not the .exe file.

    There is one more way to debug this:

  • Hi Anbhav,

             thanks, i will check.

             below i attached my logs of uniflash MLO trying. but it failed after 1%. is this QSPI speed issue?. kindly check and update me for resolve this issue.

    C:\ti\uniflash_6.2.0>dslite.bat --mode processors -c COM5 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0

    Executing the following command:
    > C:\ti\uniflash_6.2.0\processors\ProcessorSDKSerialFlash.exe -c COM5 -f C:\ti\pdk_am57xx_1_0_17\packages\ti\boot\sbl\binary\idkAM571x\qspi\bin\MLO -d 2 -i 1 -o 0
    For more details and examples, please refer to the UniFlash Quick Start guide.

    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2021 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.4.0.0
    ----------------------------------------------------------------------------
    Transferring the Image to Flash Programmer..
    Transferring Header Information..
    Header Transfer Complete!
    Flashing Image of size 274516 bytes
    1% complete
    Flash Programming Failed!!
    Regards,
    Sathish
  • Hi,

    below i attached my logs of uniflash MLO trying. but it failed after 1%. is this QSPI speed issue?

    Its hard to tell like this.

    My doubt is QSPI(new part number) integration only. Thats why, i suggested to first validate it with linux. From linux please try raw read/write over the whole memory(including boundary addresses).

  • Hi Anubhav,

                    Thanks for support.

                    i am not that much familar in Linux. now, i installed TI SDK AM572x and CCS 9.3.0 in my ubuntu system. kindly provide steps to check QSPI whole memory in linux environment.

    Regards,

    Sathish

  • Hi Sathish,

    'sf probe' command will initialize the QSPI in U-Boot.
    You can use:

    sf read $loadaddr QSPI_Offset_in_bytes size_in_bytes

    The above will dump all the contents from QSPI_Offset_in_bytes of size size_in_bytes to RAM loadaddr.

    You can check the whole contents there in U-Boot itself.

    - Keerthy

  • Hi Anubhav,

    IN WINDOWS, i checked above link, without changing i just rebuild "pdk_am57xx\packages\ti\board\utils" this folder. after that, i load "uart_idkAM57Xx_flash_programmer.out" in my processor. i am not getting any print "C". please check and kindly help.
    Regards,
    Sathish
  • Hi,

    As mentioned in previous replies have you verified your QSPI integration from Linux point of view?

    The FAQ mentioned above is working given QSPI module is integrated successfully and board/src/flash is validated against new QSPI part number.

  • Hi Anubhav,

                      In Linux, i am facing some issue for QSPI check. i am not able detect my processor in linux.

                      In Windows, i am check QSPI read/write using example code. i am verified my QSPI new device is working. "board/src/flash is validated against new QSPI part number"  for this what are the files i  need change. can you provide proper steps to changing files and rebuild QSPI.

    Regards,

    Sathish

  • Hi,

    In Linux, i am facing some issue for QSPI check. i am not able detect my processor in linux.

    If you are certainbof this issue, Can you create a separate thread for this.

    In Windows, i am check QSPI read/write using example code. i am verified my QSPI new device is working. "board/src/flash is validated against new QSPI part number"  for this what are the files i  need change.

    The SDK provided example will confirm QSPI access not the whole memory. Thats, why i asked to confirm it with linux.

    i load "uart_idkAM57Xx_flash_programmer.out" in my processor. i am not getting any print "C". please check and kindly help.

    Here you are saying that, you are not getting CCC pattern.

    > yes, we first flashed uart_XXXAM57XX_flash_programmer.out. we able erase also. but we are not able flash MLO. please check our first quary about this issue.

    Here, you were saying that you are able to flash the binary and it was working fine.

    Can you confirm the current scenario. Because till now, i was focussing on MLO and now you are saying first step is not working which you only said was working earlier.

    Please confirm the current scenario.

  • Hi Anubhav,

    Thanks for your help.

     In RTOS AM572x, Now i can able to flash my MLO and Bin app file throughu Uniflash. but i am facing QSPI BOOT-UP issue. Out of 10 times it's properly booting 7 times and 3 times it's not booting. Kindly check this  scenario and update us resolve this issue.

    Regards,

    Sathish

  • Hi,

    In RTOS AM572x, Now i can able to flash my MLO and Bin app file throughu Uniflash.

    Good to hear that. Can you please mention the resolution for future customers?

    Out of 10 times it's properly booting 7 times and 3 times it's not booting

    will continue here - https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1042832/am5729-am5729-qspi-boot-up-issue