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.

TMS320F280049: Programming Issue with UniFlash Batch File Using Olimex XDS100-v2 - Works in GUI but Fails in Batch Mode

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

Tool/software:

Hello everyone,

I am having an issue with UniFlash when trying to program my TMS320F280049 using an Olimex XDS100-v2. I have a firmware locked with DCSM. My problem is that I need to create a batch file since I cannot use UniFlash manually; I can only run the batch file to program the boards.

The operations I perform with UniFlash are:

  • Erase flash (entire FLASH)
  • Set CSMPSWD passwords (Program Password)
  • Set the GRABSECT/RAM (program GRABSECT/RAM)
  • Set OTPSECLOCK (program OTPSECLOCK)
  • Load the binary file with Binary Option checked and address 0x80000
  • Finish

When I follow this procedure manually using the UniFlash GUI, everything works perfectly. However, when I generate the batch file directly from UniFlash, it seems not to work properly.

Let me explain in more detail: I don't get any error messages; in fact, it says it has been programmed successfully. The problem is that by observing the board's current consumption, it remains as if it was never programmed. With a virgin board, the current consumption is 8-10mA. During programming, it increases to 25mA. Once programmed with the UniFlash GUI, I get 40mA, which is correct. But if I use the batch file, the consumption goes from 8-10mA to 25mA during programming, and then remains at 8-10mA once it finishes.

It seems like nothing is being programmed. The batch file hasn't been modified or anything; it just doesn't seem to work correctly. From a virgin board, with the UniFlash GUI, everything works perfectly. If I switch to another virgin board and run the batch file, I get the following: "C28xx_CPU1: Warning: Failed unlocking device (zone 1) after reset." But from the GUI, everything works fine.

I can't understand what's happening because if I follow the same procedure in the GUI, it works perfectly, but the batch file generated by UniFlash does not.

Can someone help me?

  • Hello,

    However, when I generate the batch file directly from UniFlash, it seems not to work properly.

    I assume you are referring to the standalone command-line package. I'm not sure all the steps you mentioned would be added to the package

    Can you provide the generated package? You can remove the entire ccs_base folder. If you do not wish to share your execuatble, you can remove the /user_files/images folder too.

    Thanks

    ki

  • Hi, thanks for the reply.

    Yes, correct, I meant the standalone command line. I have attached the zip archive below. I removed the Image folder where the Firmware is contained, and I also changed the values of CSMP, GRABSECT, etc., to XXXXXXXX for security reasons.

    Additionally, I noticed that in my "manual" procedure, I also set otpseclock, but as you can see in the settings file, it is not present and is never defined. All the "protected" values have been replaced with X.

    Thanks for your help

    Uniflash_batch.zip

  • Solved my problem! I had to specify the registers and then use the -b option to indicate the actions. This is the command I used:

    dslite flash -c C:\Users\nicola.reat\Downloads\XXXXXXX.ccxml -s Z1B0CSMPSWD3=XXXXXXX -s Z1B0CSMPSWD2=XXXXXXX -s Z1B0CSMPSWD1=XXXXXXX -s Z1B0CSMPSWD0=XXXXXXX -b Z1PasswordProgram -s Z1B0GRABSECT=XXXXXXX -s Z1B0GRABRAM=XXXXXXX -b Z1B0GRABProgram -s Z1B1GRABSECT=XXXXXXX -b Z1B1GRABProgram -s Z1B0PSWDLOCK=XXXXXXX -s Z1B0CRCLOCK=XXXXXXX -b Z1OTPSECLOCKProgram -b Z1OTPBOOTCTRLProgram -b Z1Unlock -s VerifyAfterProgramLoad="No verification" -e "C:\Users\nicola.reat\XXXXXX.bin,0x80000"
    
    
    
    
    
    

    Explanation:

    • -c C:\Users\nicola.reat\Downloads\XXXXXXX.ccxml: This specifies the configuration file for the target device.
    • -s Z1B0CSMPSWD3=XXXXXXX (and similar parameters): These commands set the specific register values.
    • -b Z1PasswordProgram (and similar parameters): The -b option indicates the specific actions to be performed.
    • -s VerifyAfterProgramLoad="No verification": This option specifies not to verify after programming the load.
    • -e "C:\Users\nicola.reat\XXXXXX.bin,0x80000": This specifies the binary file to be flashed and the memory address where it should be loaded.

    I hope this helps someone!