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.

CCS/AM5716: Processor SDK Serial Flash not working

Part Number: AM5716
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi,

We have a question relating https://e2e.ti.com/support/tools/ccs/f/81/t/822206.

After my customers download FlashWriter from CCS and execute it, and then they execute serial flash erasing of UniFlash,

they got below error.

------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

   C:\ti\uniflash_5.0.0> .\dslite.bat --mode processors -c COM14 -e 10000 -d 2 -o 2000

   Executing the following command:

   > C:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM14 -e 10000 -d 2 -o 2000

 

   For more details and examples, please refer to the UniFlash Quick Start guide.

    ----------------------------------------------------------------------------

   ProcessorSDKSerialFlash CLI Tool

   Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/

   Version 1.0.0.6

   ----------------------------------------------------------------------------

   Erasing Flash....

 

   Transferring Header information..

   Header Transfer Complete!!

   Read Failure!!

 

   C:\ti\uniflash_5.0.0>

------------------------------------------------------------------------------------------------------------------------------------------------------------------

 They suspend FlashWriter on CCS in this state and they find the program stays in for loop.

     In "xmodem.c:UFP_xModemHeaderReceive()",

        outbyte(XMODEM_STS_ACK);

        for(;;) /* Waiting for EOT from uniflash */

It seems ACK is sent from FlashWriter but UniFlash cannot get ACK or UniFlash doesn't process properly.

Could you please tell me the workaround.

We would appreciate it if TI can give us the new UniFlash program correcting this issue.

Best Regards,

Masashi Ohhashi

 

  

 

 xmodem.c:UFP_xModemHeaderReceive()内の、

        outbyte(XMODEM_STS_ACK);

        for(;;) /* Waiting for EOT from uniflash */

  • Hi Masashi,

    Please check the supported Sitara platforms for the Uniflash tool. UART mode is not supported on AM571x IDK, you may try the JTAG mode instead.

    Regards,
    Garrett

  • Garrett-san,

    Thank you for your reply.

    I would like to confirm what you said JTAG mode. Does it mean using JTAG interface described "3.5.1.6.2 Loading Flash Writer over JTAG interface"?

    If yes, my customer downloaded Flash Writer program via JTAG and saw the code on CCS. 

    Could you please tell us what we should check any other points? We would like to know whether the flash erase is completed or not in this situation though displaying "Read Filure!!"

    Best Regards,

    Masa

    .  

  • Hi Masa,

    Yes, the customer need follow the procedure described "3.5.1.6.2 Loading Flash Writer over JTAG interface

    >>C:\ti\uniflash_5.0.0> .\dslite.bat --mode processors -c COM14 -e 10000 -d 2 -o 2000

    The COM14 indicates this is a UART interface.

    And the JITAG interface command is:

    dslite.bat --mode load --config=<Path_to_ccxml_file> -f <Path_to_the_flash_writer_to_be_transfered> -n <core_to_be_connected_on_the_target_platform>

    Regards,
    Garrett

  • Garrett-san,

    Thank you for your reply.

    I understood loading Flash Writer over JTAG interface. And I have a question about erasing flash memory.

    It seems to be described only UART mode in "3.5.1.9. Erasing Flash Device on the Target Platform".

        # cd <path_to_the_uniflash>

        #dslite.bat --mode processors -c ,COM_Port> -e <Erase_Length_in_bytes> -d <device_type> -o <Erase_Offset>

        Example:

        #dslite.bat --mode processors -c COM7 -e 10000 -d 1 -o 20000

    I think we cannot erase flash memory if AM571x support only JTAG mode and the flash erasing is only support UART mode.

    Is my understanding correct?

    If yes, could you please tell us how to erase flash memory in case of AM571x.

    Best Regards,

    Masa

  • Hi Masa,

    Is the customer testing the Uniflash on TI AM571x IDK or their own board?

    If they have used the JTAG mode to successfully load and run the flash writer, then to erase flash memory, the procedure is as described in "3.5.1.9. Erasing Flash Device on the Target Platform".

    Below is what I captured on AM572x IDK with flash writer from PRSDK v6.0.

    -------------------

     c:\ti\uniflash_5.0.0>.\dslite.bat --mode processors -c COM24 -e 10000 -d 2 -o 20000
    Executing the following command:
    > c:\ti\uniflash_5.0.0\processors\ProcessorSDKSerialFlash.exe -c COM24 -e 10000 -d 2 -o 20000

    For more details and examples, please refer to the UniFlash Quick Start guide.


    ----------------------------------------------------------------------------
    ProcessorSDKSerialFlash CLI Tool
    Copyright (C) 2017-2019 Texas Instruments Incorporated - http://www.ti.com/
    Version 1.0.0.6
    ----------------------------------------------------------------------------
    Erasing Flash....

    Transferring Header information..
    Header Transfer Complete!!
    Flash Erase Success!

    Regards,

    Garrett

  • Hi Garrett-san,

    They are testing it on their own board.

    They tired to download FlashWriter described as "3.5.1.6.2 Loading Flash Writer over JTAG interface" and then erased flash memory as "3.5.1.9. Erasing Flash Device on the Target Platform". They got same error message, "Read Failure!!". 

    They analyzed the source code of UniFlash(ProcessorSDKSerialFlash) and  FlashWriter, and they found suspicious place.

    There is the code of waiting ACK from FlashWriter in xmodemHTransfer() of ProcessorSDKSerialFlash.cpp. In case the timing of sending ACK from FlashWriter is later than waiting ACK in UniFlash, it seems "SerialPort::getArray() doesn't have error process for it. So they think the process is not good after it. In other words, they think below process in yellow highlight doesn't do correct process. (Please see attached file.)

    /cfs-file/__key/communityserver-discussions-components-files/791/Sequence.xlsx 

    The customer would like TI to provide Uniflash correcting this issue. We would appreciate it if you would send us the execution file.

    Best Regards,

     Masa.O

    No. PC side: UniFlash(ProcessorSDKSerialFlash) No. Board side: FlashWriter
    1 Open RS232C port 1 Initialize
    2
    Read 'C' from RS232C port (Wait input from FlashWriter)
    2
    Write 'C' UART(RS232C)
    3
    Write command+CRC(13bytes) to RS232C port
    3 Wait input from from UART
    4 Wait ACK(0x06) from FlashWriter 4 Read command+CRC(13bytes) from UART
    5 Read ACK from FlashWriter 5 Write ACK to UART
    6 Write EOT(0x04) to RS232C port
    6 Wait EOT from UART
    7 Wait ACK from FlashWriter 7 Read EOT from UART
    8
    Read ACK from FlashWriter
    8 Write ACK to UART
    9 Wait flash erasing process from FlashWriter 9 Initialize flash
    10   10 Flash erasing
    11   11 Close flash
    12
    Read flash erasing process from FlashWriter
    12 Write result of flash erasing(0x2A/0x2B) to UART
    13 Write ACK to RS232C port
    13 Wait ACK from UART
    14 Cloase RS232C port 14 Read ACK from UART
    15 end 15 Wait input from UART
  • Hi  Masa.O

    I am closing the thread as it's moved to email discussion.

    Regards,

    Garrett