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.

CCS/TMS320F28069M: C18xx: Flash programmer: Error unlocking flash memory. Device is still locked.

Part Number: TMS320F28069M

Tool/software: Code Composer Studio

Hi all,

I've a strange problem with custom board mounting TMS320F28069M MCU. I try to program it with XDS110 (from Launchpad F280049C).

I tryed to create from scratch a new project using DEV USER GUIDE indications.

All work fine, compile ok. I've "test.out" binary ready to be loaded into MCU. I would use standard JTAG connection and made this schematic:

This is my "ccxml" configuration:

If i click "Test Connection" all seems to be fine:

[Start: Texas Instruments XDS110 USB Debug Probe_0]

Execute the command:

%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -S integrity

[Result]


-----[Print the board config pathname(s)]------------------------------------

C:\Users\STUDIO~1\AppData\Local\TEXASI~1\
    CCS\ti\0\0\BrdDat\testBoard.dat

-----[Print the reset-command software log-file]-----------------------------

This utility has selected a 100- or 510-class product.
This utility will load the adapter 'jioxds110.dll'.
The library build date was 'Apr 30 2019'.
The library build time was '14:17:18'.
The library package version is '8.1.0.00012'.
The library component version is '35.35.0.0'.
The controller does not use a programmable FPGA.
The controller has a version number of '5' (0x00000005).
The controller has an insertion length of '0' (0x00000000).
This utility will attempt to reset the controller.
This utility has successfully reset the controller.

-----[Print the reset-command hardware log-file]-----------------------------

The scan-path will be reset by toggling the JTAG TRST signal.
The controller is the XDS110 with USB interface.
The link from controller to target is direct (without cable).
The software is configured for XDS110 features.
The controller cannot monitor the value on the EMU[0] pin.
The controller cannot monitor the value on the EMU[1] pin.
The controller cannot control the timing on output pins.
The controller cannot control the timing on input pins.
The scan-path link-delay has been set to exactly '0' (0x0000).

-----[Perform the Integrity scan-test on the JTAG IR]------------------------

This test will use blocks of 64 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG IR Integrity scan-test has succeeded.

-----[Perform the Integrity scan-test on the JTAG DR]------------------------

This test will use blocks of 64 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG DR Integrity scan-test has succeeded.

[End: Texas Instruments XDS110 USB Debug Probe_0]

...I can read memory from MCU and dump it to file:

...but I've a warning about "Device Calibration".

If I try to enter debug session I can connect to MCU and view status but when I try to debug/donwload the code CCS send the error: C18xx: Flash programmer: Error unlocking flash memory. Device is still locked. MCU can not be unlocked and erased. The key pass is all set to 0xFFFF.

I tested:

1) Power supply. All are 3.3V stable;

2) Gound connections; All ok;

3) Error in mounting components. All ok;

4) JTAG pin connection;

I've tryed:

1) Replacing MCU with new one --> Still the same error;

2) Changing much connection configurations --> Still the same error;

I don't understand this behavior.

Anyone can help me please?

Best regards,

  • I try to program it with XDS110 (from Launchpad F280049C).

    The above is not clear. Are you using the JTAG circuitry on the 280049 Launchpad and physically connecting it to your 28069 board? Or are you saying you copied the XDS110 circuitry from the 280049 Launchpad and used it on your 28069 board? I presume it is the latter.


    When you connected to the device using CCS, did you examine the password locations in flash to verify they contain 0xFFFF?

    Have you looked at www.ti.com/.../spracf0.pdf ?
  • Hi Hareesh,
    thx for the support. The XDS working fine. I can program/debug other custom PCBs with other TI MCUs.
    I don't understand what's happening to my TMS320F28069M.
    I checked the password locations area and it's all 0x0000. :-(
    I changeed the MCU with new one, then I tryed to program only once and now I have all 0x0000 again.
    What is happening? Are there any conditions that cause MCU auto-lock by itself? Should I look in some initialization files (*.cmd, *.gel)?
    Best regards,
  • Stefano,
    It looks like there is an error in your schematic, pin VDD3VFL is not powered. This is the flash power pin and should be ganged with the VDDIO supply(3V3_F in your schematic).

    There is a decouping cap to ground, so it shouldn't be too hard to jump a wire from C90 to C86 to get this at the correct voltage. I'd go ahead and replace the 100nF with the same 2.2uF you have on the other power pins as well.

    This would explain why the flash is "locked" since it is reading back all 0x0000. Device Cal is located in OTP, which is also powered from this pin.

    Best,
    Matthew
  • Wow, thx Matthew.

    Really good bedug! Now I try your solution and then update the forum.

    Best regards,

  • Hi Matthew,
    regarding the first problem, now I've MCU working ok but the VDD3VFL pin absorb 35mA constantly. The MCU goes a little hot. I'm tring to run my firmware from Flash. Can be a software configuration problem?

    My InitFlash() is set like this:
    /****************************************/
    FlashRegs.FOPT.bit.ENPIPE = 1;
    FlashRegs.FBANKWAIT.bit.PAGEWAIT = 3;
    FlashRegs.FBANKWAIT.bit.RANDWAIT = 3;
    FlashRegs.FOTPWAIT.bit.OTPWAIT = 5;
    /****************************************/

    Clock:
    ExtOsc [20MHz] * PLL [8] / DIVSEL [2] = 80MHz

    Code main.c:
    #pragma CODE_SECTION(InitFlash, "ramfuncs");

    void main(void)
    {

    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32) &RamfuncsLoadSize);
    InitFlash();
    ...
    ...
    while(1){
    ...
    ...
    }
    }

    Code F28069M.cmd:
    ...
    SECTIONS
    {

    /* Allocate program areas: */
    .cinit : > FLASHA_B, PAGE = 0
    .pinit : > FLASHA_B, PAGE = 0
    .text : > FLASHA_B, PAGE = 0
    codestart : > BEGIN, PAGE = 0
    ramfuncs : LOAD = FLASHD,
    RUN = RAML0,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    PAGE = 0
    ...
    ...

    Best regards,
  • VDD3VFL pin will consume 35 mA of current. This is clearly shown in the datasheet (see Table 5-1).

     

    “little hot” is very subjective. It is normal for a device to feel warm to the touch, since it is dissipating energy.