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.

TMS320F28335 Will not Program in Flash

Other Parts Discussed in Thread: TMS320F28335, UNIFLASH

I am using the TMS320F28335 and I currently cannot program to my device. It has worked fine previously, but currently I am not able to program to it. I am not sure if I have permanently damaged the device. I get the following error shown in the attachment. I would appreciate any device. Thanks so much. 

  • Hi,

    Please try unlocking the device using CCS Uniflash and then try programming. Do let me know your observations.

    Regards,

    Gautam

  • Hi, Gautam. Thank you for the advice. I have tried to unlock the device, but now I get another error, which is shown in the attachment. Is there an issue with my setup. It is the second attachment. 

  • Hi,

    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,

    Gautam

  • I think it is the first issue. I guess I will have to get a new board. How can I prevent this from happening. My board was working fine up until I got that error. Is there someway to prevent this from happening. Perhaps it was the files I was using. They are a set of examples I found for flash programming for my board. Should I just stick with using control suite examples. I would appreciate any advice. Thanks so much. 

    PS

    The name of the set of files I was using is called F28335 Example BIOS Flash

    Julius 

  • Julius, this happens generally when while programming the flash, CCS gets stuck or the emulator gets disconnected in between. Secondly, while configuring the cmd file you've to be careful.

    Regards,

    Gautam

  • Hi,


    I've had this issue before on several targets during flash programming. In my case the supply voltage dropped too low resetting my board during programming. This made the targets unusable and had to replace them. Often this comes with a message that the CPU had been reset or that programming failed.

    Best regards,

    Tjarco

  • Thanks for your advice. I got new controllers and ready to start programming again. Just to be sure is there any kind of reset I could perform to fix the controllers that will not program. If not it's fine as I have purchased new ones, but I was just curious. Thanks again and sorry for the late response.