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.

Failing to lock CPU2 with UniFlash command line

Other Parts Discussed in Thread: UNIFLASH

OS = Windows7 64-bit

CCS = UniFlash 3.1.0.00026 with XDS200 USB Emulator

Device = F28377D

I have been able to successfully lock CPU1 with the command line arguments below, but when I give similar arguments for CPU2 it fails. I'm wondering if this is a bug or if the order that I specify my parameters/operations matter?

CPU1 command:

uniflash -log myLog1.xml –ccxml myConfig.ccxml -core "C28xx_CPU1" –setOptions FlashCoreSelection="CPU1 (Master)" Z1PSWDLOCK=55555555 Z1CSMPSWD0=55555555 Z1CSMPSWD1=55555555 Z1CSMPSWD2=55555555 Z1CSMPSWD3=55555555  Z1LINKPOINTER1=FFFFFFFF Z1LINKPOINTER2=FFFFFFFF Z1LINKPOINTER3=FFFFFFFF Z1GRABSECT=15555555 Z1GRABRAM=10005555 –operationZ1LINKPOINTERProgram Z1GRABProgram Z1OTPSECCLOCKProgram Z1PasswordProgram Z1Lock


CPU2 command:

uniflash -log myLog2.xml –ccxml myConfig.ccxml -core "C28xx_CPU2" –setOptions FlashCoreSelection="CPU2 (Slave)" Z1PSWDLOCK=55555555 Z1CSMPSWD0=55555555 Z1CSMPSWD1=55555555 Z1CSMPSWD2=55555555 Z1CSMPSWD3=55555555  Z1LINKPOINTER1=FFFFFFFF Z1LINKPOINTER2=FFFFFFFF Z1LINKPOINTER3=FFFFFFFF Z1GRABSECT=15555555 Z1GRABRAM=10005555 –operationZ1LINKPOINTERProgram Z1GRABProgram Z1OTPSECCLOCKProgram Z1PasswordProgram Z1Lock


From the XML log, the error says:

C28xx_CPU2: Error performing current operation, the value specified (with property ID: Z1GRABRAM) needs to have a length of 8. Consider padding the value with Fs or 0s. Operation cancelled.\n

But from the XML a few lines above it has 

ENTRY ID: Z1GRABRAM Value: 10005555

  • David,

    I don't see anything wrong with what you are doing, so I'm not sure why you are getting this error. In fact, I tried to test the same command, and it seems to work for me. The only thing I can thing of is that there is some weird character encoding happening in the command line characters.

    A few things I can suggest:

    1. Try to do the same thing in the UniFlash GUI by inputting the same security entries and see if it works.

    2. You can extract the GUI options into a session file (Session->Save Settings as a Copy) and use these settings in the Command Line tool via the -loadSettings argument.

    3. Try to generate the Debug Server logs when running the UniFlash command. To capture the logs, set the following environment variable before running the command:

    set TI_DS_ENABLE_LOGGING=1

    set TI_DS_LOGGING_OUTPUT=c:/path/file.log

    Attach the logs if you are able to generate one.

    Thanks,

    Ricky

  • I tried using the UniFlash GUI and it resulted in the same error of "Z1GRABRAM needs to have length of 8".


    I then did as you recommended, and enabled the DS_LOGGGING.  I've attached the log file.

    8508.test1.log

  • David,

    From the log, the Z1GRABRAM property is returning a value of 0, which is why you are getting the "length of 8" error. As for why you are seeing this behaviour, I'm still not sure. I'll see if I can extract more information from the log.

    Thanks,

    Ricky

  • I've found a way to program the Z1_GRABRAM. 

    If I use the UniFlash GUI and click the "Program GRABSECT/RAM" button after entering my values (Z1-GRABSECT=1555555, Z1-GRABRAM=10005555) then it fails for Z1-GRABRAM having a length of zero and it reverts the values that I just entered to 0.  If I re-enter my values and click the 'Program GRABSECT/RAM" button again then it succeeds like you would expect.


    This is good, but doesn't allow for a programmatic solution.  Retrying with the command prompt always gives me the same error.

    I'll try digging into the javascript and maybe I kind find the bug there.

  • David,

    This is weird. I still can't find anything in my code that would handle the GRABRAM property any different from the other security fields.

    Are you digging into the command line javascript, or the DSS script that I sent Henry (not sure if you have been working with Henry on this issue or not, but he was contacting me about this issue)? There are APIs that allow you to print out the value of an option after setting it, so you can see if the set was actually successful using that.

    Please keep me updated on what you find.

    Thanks,

    Ricky