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.

TMMS320F2808 locked by csm

Other Parts Discussed in Thread: UNIFLASH

Hello,

I´m facing a big problem while I am programming the 2808. In my project i have to adapt a c code from an avr microcontroller to my 2808. After I adapt that code with code composer i started debugging. The something really surprising happend. While I was debugging I mentioned that die CSM Modul in the DSP was set Secure bit = 1. Of course I didn´t set the bit by myself. The problem is I can´t debug because the DSP is self locking. Is there any chance to deactivate the csm so that i can find out how this can happen? I can´t locate if PWL0-PWL7 are all 0 (DSP lockes forever) or if my c code writes random values in the register (i guess this is what happens). Perhaps anyone can help my solving this hard problem?

  • Hi,

    Easiest way to unlock your controller is using CCS Uniflash. Download it and there's an unlock option available in the software.

    Regards,

    Gautam

  • Perhaps I made something wrong, but I can´t unlock my DSP with this software.

  • Can you attach the screenshot with the error CCS Uniflash flashes? 

    Regards,

    Gautam

  • Hi Gautam, i don´t know if I explained the problem clearly. My DSP Code ist locking my DSP. (CSM) I understand that uniflash can unlock my DSP even when it is locked by the code security modul? All atempts to unlock it with uniflash failed.

  • Ohhk... now it seems to be a serious issue. We need TI's help now. 

    Regards,

    Gautam

  • Sebastien,

    From your screen shot, the CSM module on your device appears to be locked.  There are two possibilities here that could do this.  First, you may have inadventently programmed the CSM passwords in the flash, perhaps by some erroneously linked code.  If you've done that and you don't know what the passwords are (which I'm sure you don't or you wouldn't be asking for help on this forum), you are stuck.  The CSM cannot be unlocked unless you know the passwords.  All you can do is replace the device on your board.

    The second possibility is that the passwords in flash are not programmed (they are still 0xFFFF), but the code you have in flash is setting the FORCESEC bit in the CSMSCR register (see F280x Sys Ctrl User's Guide, SPRU712G, p.33).  In this case, you want to keep your code from running.  Temporarily rig the bootmode pins on your board so that the device does NOT use jump-to-flash mode.  Pick some other mode, say SCI-A boot (this is the easiest since only one pin is different from jump-to-flash mode.  See device datasheet SPRS230n, p.35).  After jumpering the bootmode, power-cycle the device and then you should be able to connect with CCS.  Once connected, you can use CCS to erase the flash and get rid of the problematic code.  You then need to find the problem in your code or this will keep happening.

    Personally, my money would be on the CSM passwords being programmed in flash (my first possibility above).  It is pretty unlikely that your code is accidentally writing to the FORCESEC bit.  I suppose you never know.  I'd be curious - post back here and tell us what you find.

    Regards,

    David

  • Thanks David for a brief description!

    Regards,

    Gautam