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.

Export Flash contents of TMS320F2802 using Uniflash

Other Parts Discussed in Thread: TMS320F2802, UNIFLASH

Hi,

I have an old customer project that we used the TMS320F2802. The customer want to produce a new batch, but we don't have the source code/ programming files anymore.  But we do have the keys we used in this project.  So I can unlock the device. The problem is when I try to export the flash contents I just get a blank file.

I am using Uniflash. Is there a special start address/ memory range that I should use to be able to export the memory contents to a file to flash the new batch?

  • Nick,

    It should work. Do you see Uniflash saving the flash contents to disk? This should take a few seconds to do, and you should see a status bar updating with percentage complete.

    Did you successfully unlock the CSM using Uniflash first? Uniflash should report:

    [09:12:24] C28xx: Starting device unlocking...
    [09:12:24] C28xx: Device unlocked. To clear the programmed password, please erase Sector A of Flash memory.
    [09:12:25] Operation Unlock returned.

    When you say you get a blank file, do you mean the file is empty (with a size of 0 KB on disk), or are you saying the file contents show all flash data as zero? If the later (zero), this suggests the CSM is not unlocked.

    Regards,
    David
  • Hi David,

    Thanks for replying. The unlock routine is working fine and It shows that the device is unlocked! The file created has 65KB size but it is filed with zeros. The interesting part e if I try to use it to verify, it verifies ok.

    I tried to program a blank chip and protected it. After that I unlocked it and tried to export the contents and again got a 65KB file filed with zeros. Maybe I am inserting the start address and length in a wrong format? Maybe it is a bug with the Uniflash?
  • Nick,

    It's working fine for me.  I happen to be using F2808 and not F2802, but that doesn't matter.  I am using Uniflash v3.4.0.00002.  A data dump of the F2802 flash contents would be entered as follows in Uniflash:

    I also tested.  If I lock the CSM and do the dump, I get a file with all 0's for data.  When I successfully unlock the CSM in Uniflash and do the dump, the data file is then correct.  Also, if I enter the wrong password and try to unlock the CSM in Uniflash, it correctly reports an error unlocking it.

    I assume you are using Program->Save/Export_Memory to do the dump in Uniflash, right?

    You said you programmed a blank chip, then unlocked it, then did a dump, and saw all zeros.  What if you erase the flash in that chip, re-program it with code that DOES NOT lock the CSM (i.e., do not program the CSM passwords), and then do a dump.  Does it work now?

    - David

  • Hello David,

    Thanks again for replying. Seems I am entering the adresses like you did and yes, I am using the Save/Export_Memory in Uniflash. So this is not the problem. The difference is that I am using the XDS100 V3 emulator. Next week I will be back to the office and check the Uniflash version I am using and try to program a code that does not lock the CSM to see what happens.


    I was thinking now, is it possible that after unlocking the CSM in Uniflash, the code running inside the device could lock it again? Or after an unlock the CSM the code execution is halted?

    Regards,

    Nick
  • Nick,

    Once you unlock the CSM, it should stay unlocked unless your code is deliberately locking it (which I doubt it does). I also don't think the XDS100v3 is the problem. You are seemingly connecting up with the emulator. Beyond that, the emulator doesn't matter. If you can connect and flash the device, it should be able to dump the data no problem.

    Definitely try a test case with the CSM unlocked. The symptom you're getting of having all 0x0000 in the dump file is what would happen if the CSM were locked when the dump was done. I tested this out earlier today.

    - David
  • I wrote a code to dump the flash addresses. Problem solved. Thanks