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.

TM320F2812 C28xx: Flash Programmer: Device is locked or not connected. Operation cancelled.

Other Parts Discussed in Thread: UNIFLASH

I working on a new Rev of a board and am unable to program the firmware.  I keep getting the following error:

C28xx: Flash Programmer: Device is locked or not connected. Operation cancelled.

I see that a few people have had this issue in the past, but I can't seem to find the source of my issue.

I'm using Code Composer 5.4.0
I'm using the XDS510 USB to program/debug.

I saw one reference to bad power but the power is cleaner on this board than it was on the last. 

We've used thousands of these 2812 parts and never come across this issue before.

I also same reference to the boot mode pins and there was a change made here but the main change was that GPIOF4 is now unconnected and I have confirmed that it is pulled high which should mean that we are booting to the internal flash which is what I want.

I can't see how the part could be locked as it is a brand new part.  

I tried a second board and the result was the same.

I tried to do just an erase with the UniFlash software but I get the same error.

I can program the old Rev board without any issue so it must be something that was changed, but the JTAG interface was not changed at all.

What am I missing?

Is there something I can do to give me some more details as to why the program/erase is not working?

  • Hi,

    Are you able to connect to device via JTAG using CCS? Is yes then I would suggest to check the Flash content via CCS memory watch view. If it's all 0x0 then device might have been locked. If you see the values all_1 (0xFFFF) then device is good. Try changing the boot-mode pin to some other value and see if that helps. Do you know what was the value driven on GPIOF4 on previous boards?

    Regards

    Vivek Singh
  • Vivek,

    Yes I am using CCS to connect. The problem is that I can't connect to the CPU so how can I examine memory?

    On the previous board the GPIOF4 pin was connected to RS232 transceiver. The input on this has no pullup/pulldown so the pullup internal to the CPU pulled the line high.

    Ed
  • Vivek,

    In addition I have compared the signals on the JTAG interface with an oscilloscope between the two revs of boards and they look consistent, besides the fact the activity stops quickly on the new board. There is data on both the TDI and TDO lines so we do have some communications.

    One difference on this board is that there is a watchdog chip which will be toggling the reset line once a second, but I don't think this should affect the programmer. In addition I disable this on one board and it did not seem to have any affect.

    Is there any chance that the part came from the factory with the security programmed?

    Ed
  • I also tried tying GPIOF4 both high and Low with the exactly the same result.
    Ed
  • Hi Ed,

    On CCS connect, instead of loading the program only try to connect. Basically right click on the CPU (in Target Configuration) and click on connect.

    One difference on this board is that there is a watchdog chip which will be toggling the reset line once a second, but I don't think this should affect the programmer. In addition I disable this on one board and it did not seem to have any affect.

    After you disabled this on one of the board, did you check the status of XRSn pin?

    Is there any chance that the part came from the factory with the security programmed?

    It's very unlikely.

    What is the value driven on EMU0/EMU1 pins?

    Regards,

    Vivek Singh

  • Vivek,

    Thanks, finally some progress.  I did what you suggest and managed to read some data from the chip, see the screen capture below.  The highlighted data is the chip PARTID and REVID which matches what is on the data sheet.I can also read from the program memory.  When I read from 0x8000 I get all data as 0000. Does this mean the device is locked?  Should this not be all FFFF?

    Is there some this specific that I can look at that will give me a clue as to why this is happening?

    Note this is with the Watchdog chip enabled so I don't think that is our issue.

    I did measure the EMU0/EMU1 pins and they appear to stay high.

    Ed

  • Hi,

    Good that you could connect to CCS.

     When I read from 0x8000 I get all data as 0000.

    That's RAM location. Please check the value at Flash address locations.

    Regards,

    Vivek Singh

  • Vivek,

    Ops, misread the datasheet.  I tried address 0x3d8000 which should be the start of the flash and I still got all 0000.

    See screen capture below

    Ed

  • I also checked the XRS (reset) line while I am connected and confirmed that the watchdog is still toggling this line once a second. On both boards that I have tried I have tried to program then with this watchdog enabled. I only disabled the watchdog after I tried to program the part. Is it possible trying to program the part with the XRS line toggling could cause the chip to get locked?

    Ed
  • Hi,

    Ok, from this it look like device is locked.

     I only disabled the watchdog after I tried to program the part. Is it possible trying to program the part with the XRS line toggling could cause the chip to get locked?

    Yes, a reset from outside will disrupt the Flash operation and that could leave the flash in clear state, making device permanently locked. If you have another board, where you have not tried programming operation, please connect to CCS and check the value at flash address location. If values are 0xFFFF then it's good and you should disable the external watchdog (please check the XRSn pin on scope to make sure it's indeed disabled) and then only try to program the device.

    Let us know how it goes.

    Regards,

    Vivek Singh

  • Vivek,

    That was it. I made sure to disable the watchdog before the part was programmed and it all worked as expected.
    Thanks for your help.

    Ed
  • Glad to know issue is resolved.