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.

TMS320F2812 device locked?

Other Parts Discussed in Thread: TMS320F2812, TMS320F28027, LAUNCHXL-F28027F, BOOSTXL-DRV8301

Hello,

We are using a TMS320F2812 on Code Composer 4.2.3.004  using a Spectrum Digital xds510 USB Emulator.

This is a project that was migrated from Code Composer 3.3.

In the flash settings of the debug properties for the poroject I have set up the code security password. However, when I launch the debug session, or load a new program I get a series of error that begins with:

"c28xx Flash Programmer: Error erasing flash memory. Device is locked or not connected. Operation Cancelled"
If I first unlock the device, erase seciton "A", I can then programme the memory.

I had thought that the debugger would be able to use the code security password and unlock th ememory before it tries to load a new programme.

My question is: Is there something I should be considering in my debugger set up?

 

  • Larissa Swanland said:
    If I first unlock the device, erase seciton "A", I can then programme the memory.



    When you say, "if I first unlock the device", how are you actually unlocking the device?

    I'm not sure if specifying the code security password in the debug properties should automatically unlock the device before erasing/programming, I would need to check into this.  I assume it works if you do this manually - (ie) after launching the debug session (not hitting "Debug Active Project", but right-clicking on the .ccxml file and selecting Launch Selected Configuration), go to menu Tools->On-Chip Flash and unlock the device from there. Can you confirm that this works?

  • Since customer mentions that it works in CCS3.3, the first post I referenced below may have clues. CCSv4 semi-hides the flash settings and may need to be reconfigured when creating a new project (especially oscillator settings).

    The issue could be due to the version of CCS or some setting when importing from CCS3.3 to CCSv4 or the CSM being locked. The following posts address this question, so please point customer to this (Also posting this to see if Aarti may get some clues into this issue):
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/112597/399630.aspx#399630
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/115770/410654.aspx#410654
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/64711/233283.aspx#233283
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/31619/109989.aspx#109989
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/66777/286817.aspx#286817

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/88390/305793.aspx#305793


    Some questions:
    1. Is this an issue just with one particular device or multiple devices with similar CCS import?
    2. Are they using their own custom board or using a Spectrum Digital/TI reference EVM?
    http://www.spectrumdigital.com/product_info.php?cPath=31_85&products_id=138&osCsid=c7369f35c29fea32fd5a1dede7058b01

     

  • Hi Aarti,

    Currently yes, that is how we are unlocking the device.
    It is Step 1 the overall 3 steps to re-prgramme the DSP.

    Is that normal?

     

    When he does: "Target--> Load Programme" The same error occurs weather it's been unlocked or not.

     

  • Hi Larissa,

    Looking over the implementation, it looks like this is the expected behaviour. We currently do not try to unlock the device before executing the Flash operation, and therefore, you will need to unlock and erase sector A before executing any Flash operation.

    But I do agree this might not be very user friendly. Therefore, we will look into adding an extra unlock step for most Flash operations if the device is currently locked; we will need to evaluate when we can include this feature in CCS.

     

    In the mean time, please continue using the 3 step workaround. Sorry for the inconvenience.

    Ricky.

  • Ricky, you help me last year on some problems with a F28027. I'm currently trying to bring up a new board with another F28027 uC and having a tough time. I'm using the J2 header on a TI docking station to provide the USB to JTAG "break out" for my board. I keep getting warnings like those listed below. I went to the simplest example among the "canned" examples to test the communication link (2802xGpioToggle) and there is no joy--I can't get the RAM examples to behave, let alone the ROM examples. I even "upgraded' to the latest CCS4--version 4.2.4.00033 in an effort to get over this hurdle. The problems I'm seeing are similar to some of the problem seen in this thread, but I'm not sure what to do about it. I checked the "On-Chip Flash" tab of the debugger and the settings look sane, but neither of the two boards I've tried will load a program.

    The last messages generated below was my attempt to reset the uC, Target -> Reset -> Reset CPU. The tool claims the device is locked. In my ccxml file I selected <Experimenter's KIt - Piccolo F28027>--i also tried <controlSTICK - Piccolo F28027> and  <TMS320F28027>. Nothing doing . . .

    What am I missing here?

    David Ehrenberg

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.

    C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: File Loader: Data verification failed at address 0x00008000 Please verify target memory and memory map.

    Error found during data verification.Ensure the linker command file matches the memory map.

    C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: Starting device unlocking...

    C28xx: Flash Programmer: Error unlocking flash memory. Device is still locked

    C28xx: Starting device unlocking...

    C28xx: Flash Programmer: Error unlocking flash memory. Device is still locked

  • David,

    I can help answer some of the questions, but I might need to bring in the C2000 team for help with resolving a few of the issues.

    1. The warning message:

    "C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file."

    This looks like it is due to the detected device (which is determine by reading the PartID information on the device) is returning empty (or not matching any known entries in the system). I'm not sure why this is happening (maybe because you are using a custom board?), but if you are sure you are using a F28027 device, you can safely ignore the warning.

    2. The error messages that indicate 'the device is locked' could indicate that you hare programmed the password on the device, or it has accidentally been programmed. You can verify this by using the Memory view to read Flash memory. If the Flash is locked, the memory should appear as 0000 in the memory view, and you will not be able to program the Flash memory until you unlock the device.

    3. But even if the Flash is locked, it should not affect the RAM programming functionality. So, can you let me know what the exact problem you are seeing from loading the RAM example program?


    Thanks.

    Ricky

  • Ricky, the two attempts to load the simple RAM routine <Example_2802xGpioToggle> resulted in these messages. The second attempt was on a boad with only the F28027, three power supply bypass caps, and the the JTAG header. The messages are slightly different. See below.

    I took another look at the F28027 "stick" (mates with docking station) and I notice that GPIO34 and GPIO37 are pulled high with external resistors. However, according to Boot Rom literature (Sprufn6a, page 17) the Emulation Mode is controlled by TRSTn, a signal on the JTAG header and GPIO34 and 37 are don't cares. I'll try soldering pullup on these pins and see if that fixes the communication problem. When I plug the stick into the docking station, it works as expected.

    For my ribbon connected boards, using a scope, I see activity on the XRSn line that looks like the uC is being continuously reset. This is output from the watchdog and according to the literature the watchdog defaults <off> at power up.

    DE

    //**********************************************************************

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.

    C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: Flash Programmer: Error erasing flash memory. Device is locked or not connected. Operation cancelled

    C28xx: Flash Programmer: Error erasing Flash memory.

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

    C28xx: Trouble Writing Memory Block at 0x3f65d8 on Page 0 of Length 0x16

    Cannot write to target

    //*****************************************************************************

    I tried a second board with the GpioToggle (non-flash) routine, slightly different message—same result:

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.

    C28xx: Failed Software Reset: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading PC Register: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: GEL: Error while executing OnReset(1): Target failed to read the register ST1.

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Failed Software Reset: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading PC Register: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: GEL: Error while executing OnReset(1): Target failed to read the register ST1.

    C28xx: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x2: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    Cannot write to target

     

  • Ricky, the TI boot code literature says I can ignore the state of GPIO34 and GPIO37, but I'm desparate to get these boards working. As per the F28027 stick, I added pullup res

    istors (1k to 3v3) to both GPIOs and also added a pullup (2.2K to 3v3) on XRSn. No joy. I'm still getting the same error messages--device held in reset.

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    I'm beginning to suspect I have a bad bunch of uCs.

    I have been stalled for an entire week . . .

    David Ehrenberg

  • David,

    This is Manoj, C2000 Applications Engineer. I did read through the messages you had been posting on the forums. I need some clarifications to better help you.

    • I believe you are using TI Docking station and Piccolo A control card (with F28027) device. Is this right? (This includes both 1st board and 2nd board you are referring too)
    • How have you configured your Target configuration file? Can you send us the snapshot of the configuration?
    • Based on the messages, it looks like you are able to get connected to the device through JTAG on one of the control cards (1st board, I believe). Can you send us the snapshot the contents of 0x3F7FF8 to 0x3F7FFF and 0x3D7FFF?
    • On the 2nd board (with device held in RESET problem). Did you try probing for XRSn signal on the device pin? (The XRSn should stay high when powered up)

    Regards,

    Manoj

  • Manoj, I'm using a docking station as a USB to JTAG breakout board. The docking station's J2 is connected via a ribbon cable to a 14-pin header on a board I'm developing. I have stuffed two of my board, one completely, and one with only the F28027 uC and several power supply bypass caps. The target configuation file:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
            <instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Emulator_0" href="connections\TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Emulator_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
            <connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Emulator_0">
                <instance XML_version="1.2" href="drivers\tixds100c28x.xml" id="drivers" xml="tixds100c28x.xml" xmlpath="drivers"/>
                <platform XML_version="1.2" id="platform_0">
                    <instance XML_version="1.2" desc="Experimenter's Kit - Piccolo F28027_0" href="boards\expkitF28027.xml" id="Experimenter's Kit - Piccolo F28027_0" xml="expkitF28027.xml" xmlpath="boards"/>
                </platform>
            </connection>
        </configuration>
    </configurations>


    I also tried other configurations from the ccxml menu, <controlSTICK - Piccolo F280127> and <TMS320F28027>, neither changed the outcome.

    I probed the F28027 chip when I tried the connection to CCS4 and saw the TDO line (from the header connected to the docking station's FTDI 2232D) go low for 400ms and I see the XRSn line changing at 1.4kHz before establishing "connection" and 1.7kHz after I try connecting. I added pullups to GPIO34 and GPIO37 (1k to 3v3), and to XRSn (2.2k to 3v3). This is the configuration used on the F28027 stick. No joy, still no connection. I see a digital signal (3v3 swing) of 1.47kHz on XRSn when I power the board. The frequency increases (and the duty cycle decreases) to about 1.7kHz after I tried to launch the debugger. The signal on XRSn is a positive going pulse of 2-3us with a period of 588us. Both of my boards connected via the ribbon cable generate messages similar to:

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.

  • the tool truncated my response, the rest reads:

    The disassembly window on CCS4 gives:

    0x3F7FF8:   0BAD        DEC          @SP
    0x3F7FF9:   0BAD        DEC          @SP
    0x3F7FFA:   0BAD        DEC          @SP
    0x3F7FFB:   0BAD        DEC          @SP
    0x3F7FFC:   0BAD        DEC          @SP
    0x3F7FFD:   0BAD        DEC          @SP
    0x3F7FFE:   0BAD        DEC          @SP
    0x3F7FFF:   0BAD        DEC          @SP
    0x3F8000:   0BAD        DEC          @SP
    0x3F8001:   0BAD        DEC          @SP
    0x3F8002:   0BAD        DEC          @SP
    0x3F8003:   0BAD        DEC          @SP

    I don't think the connection is suffficiency robust to allow a reliable look into the device. The fact that there is activity on the XRSn indicates soemthing is wrong with the device--like the watch dog has deviated from the default--disabled--condition.

    Others at TI have suggested I buy a stand alone emulator, which I might do, but I suspect it won't help. I use nearly the identical setup on a F28030 board I developed--a 2232D connected to the uC's JTAG port--and it worked just fine. I'm having a hard time believing 2" of ribbon cable is causing the interface to fail. I buzzed out the JTAG connections on my board and I can't spot any problems--the signals are routed correctly and are not shorted to ground or 3v3. The F28027 stick in the docking station's socket works as expected. I'm thinking of swapping the uCs on the F28027 stick with one of the dozen (and very difficult to obtain) F28027 I have and trying the stick in the docking station--I hate to risk destroying the stick, but it would be the definitive test . . .

    David Ehrenberg

  • David,

    Instead of using the ribbon cable to the 14 pin header, can use XDS510USB emulator on the 14 pin header? Have you check this before?

    -Manoj

  • David,

    Have you tried other F28027 control cards / docking stations?

    As you suggested, if you have other F28027 units, try replacing the parts that atleast would give you an idea whether the problem was in control card (or) docking station (or) ribbon cable to external 14 pin JTAG connections.

    Regards,

    Manoj

  • Manoj, the question I need answered is what is the signal sequence on the JTAG pins when I connect CCS4? Also, my expectation for XRSn is it should be quiet and high. Can some strange timing behavior on the JTAG interface have the pin changing as I described?

    Has anyone else seen this low duty cycle waveform on XRSn? What conditions would bring it on? It appears the uC is continually being reset. This is not normal behavior. How have I gotten the uC into this state--on two instances of my new PWB?

    DE

  • Manoj, the saga continues . . .

    At the suggestion of Billy Owen, I ordered a stand-alone emulator from Spectrum Digital (model XDS100v2) and tried using it instead of the docking station's JTAG header--STILL NOT WORKING. I get these messages (very similar to the messages seen three weeks ago):

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.

    C28xx: Failed Software Reset: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading PC Register: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: GEL: Error while executing OnReset(1): Target failed to read the register ST1.

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Failed Software Reset: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading PC Register: (Error -1137 @ 0x0) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: Trouble Reading Register ST1: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    C28xx: GEL: Error while executing OnReset(1): Target failed to read the register ST1.

    C28xx: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x2: (Error -1137 @ 0x6) Device is held in reset. Take the device out of reset, and retry the operation. (Release 5.0.429.0)

    Cannot write to target

    C28xx: Error: (Error -150 @ 0x0) This utility failed to operate the adapter for a custom emulator. The adapter returned an error for unknown reasons. (Release 5.0.429.0)

     I made one change to the emulator, I white wire the 3.3V supply to pin 5 of the JTAG header to power the target uC (the target board has only the F28207 and several bypass caps—along with pullups on XDSn, GPIO34, and GPIO37).

    Because I’m desperate to get this working, I swapped out one of the new uC for the old model on the F28027 stick. The stick works with the new unit when plugged into the docking station.

    DE

     

     

  • Manoj, Tim Love finally ran this to ground--after having me suspecting the CCS4 version, the cables, the docking station, Spectrum Digital's XDS100v2, my new PC board, and the batch of F28027s I'm using and waiting nearly a month for the answer. The problem stems from the 0.1uf bypass caps on pins 32 and 43 (48-pin package). They are too small. I replaced them with the recommended 1.0uf and the chip behave properly and comes out of reset at power up. Apparently the 360mV ripple I observed on the core supply with the smaller bypass caps was enough to trip the power supply "watchdog" unit.

    If you see Ricky Lau, please give him this information. I've been stalled for nearly amonth chasing this problem. Hopefully the next guy will get a quicker answer.

    DE

     

  • Great ! Good to know the problem has been resolved.

    -Manoj

  • Hello,
    I´m having the similar Problem with LAUNCHXL-F28027F board, it was working properly, but after connecting BOOSTXL-DRV8301 on it after some time I got this message:

    C28xx: Flash Programmer: Warning: The configured device (TMS320F28027), does not match the detected device (). Flash Programming operations could be affected. Please consider modifying your target configuration file.
    C28xx: GEL Output:
    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: GEL Output:
    Device Calibration not complete, check if device is unlocked and recalibrate.C28xx: Flash Programmer: Device is locked or not connected. Operation cancelled.

    and since then I can`t establish Connection with LAUNCHXL-F28027F board. I didn`t turn off Switch S4 on LAUNCHXL-F28027F board because I wanted to have SPI interface with SciLab. Could that be the reason for this Problem? I already bought new LAUNCHXL-F28027F board, but same Thing happend..How could I solve this Problem?
    Kind regards,
    Said