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.

TMS320F280049C: Jtag error(Blocked) after Flash_api Erase secotor 0x084000

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE,

Hi All,

I am designing a simple Bootloader and I am using the TI Flash_ROM API ti\c2000\C2000Ware_4_01_00_00\libraries\flash_api\f28004x\lib\F021_ROM_API_F28004x_FPU32.lib

for Erasing and programming new Firmware at the FLASH_BANK_0.

I am able to erase all the following sectors in the BANK_0  without an issue except sector 0x084000.

flash_erase( ( uint32_t* ) 0x082000 );
flash_erase( ( uint32_t* ) 0x083000 );
//flash_erase( ( uint32_t* ) 0x084000 ); // here
flash_erase( ( uint32_t* ) 0x085000 );
flash_erase( ( uint32_t* ) 0x086000 );
flash_erase( ( uint32_t* ) 0x087000 );
flash_erase( ( uint32_t* ) 0x088000 );
flash_erase( ( uint32_t* ) 0x089000 );
flash_erase( ( uint32_t* ) 0x08a000 );
flash_erase( ( uint32_t* ) 0x08b000 );
flash_erase( ( uint32_t* ) 0x08c000 );

TI CCS- JTag has no access the TMS320F280049C memory or to the device after erasing sector 0x084000.

I don't know if the device is now locked because of DCSM security or the TMS320F280049C  is completely defect because of this.

I am getting the following error when trying to reload a new code via TI CCS

PSN: No DCSM  password config, just default values in CCS.

Thanks for your support and feedback.

  • Hi Dennis,

    I don't think erase of that sector has anything to do with this JTAG issue.

    How are your boot mode pins configured?  Try wait boot.

    Did you check if the power supply is stable in operating spec (as per datasheet) during the erase process?

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Thanks for your response.

    Yea I thought so too. So today I decided to take another device and try it. I was able to flash new firmware with no Erase function in it.

    After that I activated the erase block in the above code and the issue happened again.

    We are using a custom board and the JTAG Interface board for the XDS110Probe works with other TI devices.

    This is why i went to the office today to get new device and this happened again.

    Unfornately Hardware colleague cannot help since is a software issue.

  • Is there a possibility to factory reset the core? Because this issue only happens when I run this particular code on the controller.

    It is strange but I cannot explain the exact cause.

    This only code I have left is 

    do
    {
    
        // delay after sector erase
        for ( uint16_t i = 0; i < timeout; i += 1 )
        {
            asm(" RPT #80 || NOP");
        }
        
        //btlr_put_str( "Main Bootloader APP With No User APP\r\n" );
    }while (true);
    

    From my understanding even if I erase everything and the TI core jump to a wrong instruction I still should be able to reprogram the TI core again with a JTAG.

  • I did a little quick test now.

    I removed the FFC cable which connect XDS110Probe with the Programming interface.

    And I got the same error:

    Error connecting to the target:
    (Error -2131 @ 0x0)
    Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
    (Emulation package 9.7.0.00213)

    This proofs your theory that the power to the device is not working.

    2. test:

    I connected the FFC cable back and tried to measure VDD on the TI core and I got 3.3v there.

    I still cannot explain how this piece of code can disable everything.

    Is the TI core defected now or there is something I can possibly do? Because I have 2 TMS320F280049C cores not responding

  • Hi Dennis,

    Thank you for the info.

    I will be able to look at your replies on August 11th and reply to you.

    Thanks and regards,
    Vamsi

  • Dennis,

    Please don't reply before 11th.  That helps to keep the thread in pause until then.

    Thanks and regards,
    Vamsi

  • Dennis,

    Why do you have that delay loop after erase?

    Does your application wait until the erase operation is over?  Or does it exit after a timeout value?  Good to have a timeout - but, is that timeout value matching the datasheet spec for erase or not?

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    I did a few tricks based on your first comment and I was able to fix the issue. On our custom board is boot-pins fix 1-1 Flash mode. I had to ask the hardware gut to make some few jumpers on the board for me and was able to get the Jtag back active by trying to pull the one of the Jumpers from Parellel -IO boot mode to Boot wait mode. It was a struggle but it worked.

    I reproduced the error to find out why by using the CCS to reset the target after a simple hello world erase and it turns out it runs to a state unknown and disables JTAG. I don't know why and can't explain it. Only at the memory sector.

    Does your application wait until the erase operation is over?  Or does it exit after a timeout value? 

    I did not use wait before or so but now check the return value after each erase to find out if it was successful.

    Thanks for the support.

  • Now I have another problem at after programming the flash and resetting the cpu or power cycle it, the CPU_1 (cpu28) is not able to execute the code.

    I checked the same code programmed by CCS and mine and is the same code after file compare.

    I mem-dump the memory after programming to compare.

    I guess I have to create another ticket for it.

  • Hi Dennis,

    Yes, please open a new post.  I am closing this thread.

    Thanks and regards,

    Vamsi