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/TMS320F28075: Re-programming DCSM protected device with UniFlash

Part Number: TMS320F28075
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

I have programmed a device with DCSM security enabled. I modified the security registers using the “DCSM_Z1_ZoneSelectBlock.asm” file provided from the "blinky_with_DSCM" sample program. I configured all Flash Sectors and all RAM to Zone 1.   My test program simply configures the SCI-A serial port and outputs a message to a terminal window.

In CCS, if I provide the proper passwords for the device in the debug configuration, I am able to re-program and debug the device.  Subsequent power cycles to the device shows that the device was properly programmed (message is output to terminal).

If I take the exact same .out file and try to program the device using UniFlash, the chip does not operate properly (no message out from serial port when power cycled).  Before attempting to program the chip I entered the proper passwords in the "Security Settings" page of UniFlash.  I was able to successfully unlock the chip, and the console indicated that the programming operation completed successfully.

Is there a different procedure that is required when attempting to re-program a DCSM secured device using UniFlash?

Code Composer Studio, v.6.1.3.00034; UniFlash v.3.4

  • Toby,

    I want to verify that UniFlash loaded your program correctly. Can you try the following sequence?

    1. Load your program using UniFlash first
    2. Start CCS and launch a debug session for your configuration and connect to your device
    3. Try unlocking your device using the On-Chip Flash view
    4. Go to 'Tools -> Debugger Options -> Program/Memory Load Options', and change the verification options to "Full verification"
    5. Go to 'Run -> Load -> Verify Program...' and choose the same program you loaded with UniFlash

    Please let me know if this verifies correctly or not.

    Thanks,
    Ricky
  • Hi Ricky,

    When I tried to verify, I received this message:
    C28xx_CPU1: File Loader: Verification failed: Memory map prevented reading 0x78020@Program

    I also tried unlocking the device before attempting the verification, and received the same message:
    C28xx_CPU1: Performing Security Operation...
    C28xx_CPU1: Calculated Link Pointer Offset: 0x20
    C28xx_CPU1: Unlocking device...
    C28xx_CPU1: Lock status: 0
    C28xx_CPU1: Operation completed successfully.
    C28xx_CPU1: File Loader: Verification failed: Memory map prevented reading 0x78020@Program


    - Toby
  • Toby,

    Looks like 0x78020 is OTP memory on the F28075. Looking at the GEL file, it looks like it should be readable on the data memory page, but not the program memory page. This is probably why are you getting the verification read error. Do you need to keep the OTP sections in your application for it to run correctly? If not, can you try removing the sections and try verifying again?

    Thanks,
    Ricky
  • Hi Ricky,

    A bit more progress! I removed the sections from my application as you suggested (I did this by excluding the "DCSM_Z1_ZoneSelectBlock.asm" and "2807x_dcsm_lnk_cpu1.cmd" linker file from the project). After doing this, I was able to perform a successful verification after unlocking the device.

    I also downloaded the latest UniFlash (v.4.1.2.1329). This version let me successfully reprogram the device which I verified by power cycling the device and seeing my test program output a message to a terminal window.

    A couple of things that I was not able to do in UniFlash was to verify the programmed image, or read the program memory (the Memory Browser shows all zeros), even though I unlocked the device. These functions work properly in CCS, but not in UniFlash.

    Any suggestions?

    Thanks,
    Toby
  • Toby,

    Glad to hear that you were able to get your application working on UniFlash v4.

    As for the verification issue on UniFlash, this is a known issue that we are tracking. By default, UniFlash disconnects from the core after a flash operation, and therefore it will lock the device again before you verify or read memory. You might be able to work-around this by clicking on the core name in the upper right corner in the UniFlash GUI (below Settings), and clicking on "Remain Connected after operations". This should leave the device connected, and after an unlock, you should be able to do a verify and memory read.

    Please let me know if this works for you.

    Thanks,
    Ricky
  • Hi Ricky,

    The work around you suggested for Uniflash works perfectly!

    Thanks for all your help!

    Toby